-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does imsdroid support peer to peer communication? #631
Comments
Yes, it does but you need some method to exchange the full SIP uri (including the binding port) between the peers.
Once you get that, you can just call the other peer by calling its full SIP uri.
For example:
INVITE sip:[email protected]:45532
Regards.
Massimo
…-------- Messaggio originale --------
Da: basheerkohli <[email protected]>
Data: 04/06/20 03:17 (GMT+01:00)
A: DoubangoTelecom/imsdroid <[email protected]>
Cc: Subscribed <[email protected]>
Oggetto: [EXT] [DoubangoTelecom/imsdroid] Does imsdroid support peer to peer communication? (#631)
Hey folks,
Can anyone please let me know that does this imsdroid supports peer to peer communication.
Thanks .Cheers
-
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#631>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADK4QSDQZGRSD3LD6Q5R2CLRU3Y3ZANCNFSM4NSFLXGQ>.
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
Rispetta l'ambiente. Non stampare questa mail se non è necessario.
|
Hey Massimo, I appreciate the quick response. So moving forward I have another question. So is the NGNEngine and AVSESSION needs to be run in the background indefinitely in order to accept the incoming calls when the application is not in the running state? OR else is there is another way of detecting the incoming call? Say for supposing push notifications. Upon receiving the push notification one can then start the NGNEngine and AVSESSION to accept the incoming call? |
Hi.
Yes. Because of the connection-oriented nature of SIP, the current android-ngn-stack architecture relies on the idea that the Engine and the NativeService need to run in background indefinitely to get incoming calls.
Unfortunately this leads to battery drain issues that often causes the app to be killed by the power manager of certain devices (see https://dontkillmyapp.com/ for further details).
BTW, you can surely use push notifications to address this issue but this is not currently supported by doubango/ngn-stack and will need a custom development.
If you want to explore the key-points, the IETF has recently proposed a standard solution (https://tools.ietf.org/html/rfc8599) but I'm not aware of free or commercial implementation of either clients or servers that are currently adopting it, even if proprietary solutions are available.
Regards
Massimo
…-------- Messaggio originale --------
Da: basheerkohli <[email protected]>
Data: 10/06/20 06:58 (GMT+01:00)
A: DoubangoTelecom/imsdroid <[email protected]>
Cc: Messore Massimo <[email protected]>, Comment <[email protected]>
Oggetto: [EXT] Re: [DoubangoTelecom/imsdroid] Does imsdroid support peer to peer communication? (#631)
Hey Massimo,
I appreciate the quick response. So moving forward I have another question.
So is the NGNEngine and AVSESSION needs to be run in the background indefinitely in order to accept the incoming calls when the application is not in the running state?
OR else is there is another way of detecting the incoming call? Say for supposing push notifications. Upon receiving the push notification one can then start the NGNEngine and AVSESSION to accept the incoming call?
-
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#631 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADK4QSDOTQK5ASUOYAGPBHLRV4HGNANCNFSM4NSFLXGQ>.
Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle persone indicate. La diffusione, copia o qualsiasi altra azione derivante dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora abbiate ricevuto questo documento per errore siete cortesemente pregati di darne immediata comunicazione al mittente e di provvedere alla sua distruzione, Grazie.
This e-mail and any attachments is confidential and may contain privileged information intended for the addressee(s) only. Dissemination, copying, printing or use by anybody else is unauthorised. If you are not the intended recipient, please delete this message and any attachments and advise the sender by return e-mail, Thanks.
Rispetta l'ambiente. Non stampare questa mail se non è necessario.
|
Thanks for your support Massimo. We will look into the push notification development if needed. From the demo examples, it's clear that on invoking the below method I can get the NGNAVSession object which is used for managing Audio Video option and useful in initiating the call.
As the naming convention of the method itself says that this method is only used for creating an outgoing session. So in order to take an incoming call , I found another method ( takeIncomingSession ) from the same class [NgnAVSession.java]
Four parameters,
What if we have null as the values for 2 and 4 parameters? Thanks. Looking for your response. |
Hi, You can find a full example of how you can place outgoing calls here:
To accept incoming calls, once you retrieve the NgnAVSession you can just use the
Regards. |
Hey Massimo, Thanks for your support we are facing an issue while registration. The contact SIP header value is getting always mapped with a private I.P address. Which makes it's impossible to form a connection between two peers. Following the framework code, we just identified there are some flags and methods which enable the STUN server functionality of getting a public IP address from the given private address. The method used to enable STUN server : SIPStack.setStunServerEnabled(boolean enable); But unfortunately, the contact SIP header value is still mapped with a private I.P address. |
Hi. This is just an example and could not work in some networking scenarios. BTW for p2p communications across public networks, I guess webrtc/ice is the mainstream. I know doubango has added some support for it but I never really got into it. Regards |
Hi , Mentioned STUN server is working fine , it's providing public IP address as response .Tested the STUN server using a javascript library. But unfortunately it's not happening in Doungao SDK . Private IP adrees is still getting mapped to Contact header in the request . Iam just trying to understand the Doubango C library code for any help. Do you have any other information regarding sending of public address to contact header. Thanks.Cheers. |
Hi. Please also check if you enabled STUN for the MediaSessionMgr. Regards |
No luck, |
According to my observations what I found is, the IP address which is mapping to the Contact Header is the local IP of the mobile. I have attached a screenshot of my Status screen of the My Phone where you can see the IP addresses (IPv4 and IPv6). These IP addresses get changed if I switch to another network. Screenshot of Status Screen: Settings>About Phone > Status > IP Address. |
Hi. I just tried with an imsdroid-based android app and it works: I see my public IP address into the contact (87.14.x.y). What I've done was just setting the following into NgnConfigurationEntry.java:
I suggest you to clone and build the imsdroid project and try to set the proper STUN configuration and see if it works. Regards |
You should use Wireshark to check if there are stun requests. Also, the device logs should contain useful information |
I see you're using TCP as transport protocol. Maybe I'm wrong, but I remember I saw a comment somewhere in the code saying STUN is only supported when using UDP. Can you please try using UDP and see if something changes? Regards |
The Google stun server doesn't support tcp. |
also, tcp is only supported when ICE is used |
Hi Massimo, Whereas using UDP as transport protocol STUN server requests got captured and finally able to see the public address on the Contact header. Thanks for your support. |
Hi Massimo, Previously I was facing the same issue using TCP I was unable to send. Public IP address to the server. But then after changing it to UDP I can able to send public IP address in contact header and registration is working perfectly . But the problem comes while initiating the call , the invite packets were not receiving at the signalling server side. Checked with air traffic from the mobile end ,the invite packets has captured but unfortunately not being able to receive at the server side. This was not happening when using TCP protocol as network. @basheerkohli are you able to send invite packets to signalling server using UDP protocol please confirm the same. Best Regards, |
Hi @pradweep , |
Hi, it's hard to say without seeing any log or wireshark trace. Could be a packet fragmentation issue, since the INVITE generally carries much more data than the the REGISTER, but could be anything. Regards |
Hi Massimo, When coming to Wireshark trace the INVITE packets which were captured were more than this number they are 1509 bytes each. So I think it makes the issue, correct me if I am wrong, if not do we have methods or configurations provided by the SDK to remove unwanted headers in the SIP packets so that I can reduce the size of the packet. Thanks. Cheers. |
Hi Basheer, You can also try to remove unwanted/unused codecs (to reduce the SDP) using Regards. |
Hey folks,
Can anyone please let me know that, does this imsdroid supports peer to peer communication?
Thanks .Cheers
The text was updated successfully, but these errors were encountered: