[OpenSIPS-Users] Is a STUN module necessary, when peers are exchanging ICE messagens?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Fri Nov 20 18:27:20 CET 2015




Dear OpenSIPS-users,


I'm very beginner to the subjects about STUN, ICE and PJSIP.

Currently I'm working in a project with OpenSIPS, PJSIP and softphones. When a softphone 'A' calls another softphone 'B',  'A' will provide early media to 'B' as  depicted in the diagram below. At least it is what we intend to do.


So, the diagram below doesn't represent what we have implemented already. It just represents what we think we can do with PJSIP and OpenSIPS, without using STUN module (OpenSIPS is in the meddle but not shown), in a overview. That is, this diagram is the representation of what could be our final solution, if the answers for the following questions will be yes.



              Softphone A (UAC)                                                                                    Softphone B (UAC)

          |-------------------------------------- |                                                           |---------------------------------|

          |                                                 |                                                           |    - Is behind NAT         |
          |                                                 |                                                           |    - Run PJSIP + ICE    |
          | - Has public IP:port              |                                                           |                                         |
          | - Run PJSIP in a softphone|                                                           |--------------------------------|
          | - PJSIP + ICE                        |                                                                                      |
          |                                                 |                                                                                       |
          |---------------------------------------|                                                                                       |
                       |                                                                                                                            |
                       | ----------------------------------------ICE message ------------------------------------>|
                       |                                                                                                                            |
                       |                                                                                                                            |
                       |<----------------------------------------ICE message -------------------------------------|
                       |                                                                                                                            |
                       |                                                                                                                            |
                       | ----------------------------------------SIP INVITE --------------------------------------->|
                       |                                                                                                                           |
                       |                                                                                                                           |
                       |<----------------------------------------SIP 183 --------------------------------------------|
                       |                                                                                                                           |
                       |                                                                            .                                              |
                       |                                                                            .                                              |
                       |                                                                            .                                              |
                       |                                           .                                                                               |
                       |-----------------------------------Early media--------------------------------------------->|
                       |                                                                                                                            |


In our solution, one softphone will always has a public IP : PORT. Such softphone 'A' will always be the provider of early media. The softphone 'B' behind NAT will always be the consumer of the early media. The caller will be 'A' and the callee will be 'B', always. With this scenario I ask:


1 - Is it necessary to use a STUN module, to the SIP 183 message carries the correct IP address and port, where 'A' should send its media?



2 - By doing a test of this scenario and using WireShark, we can see some ICE messages being exchanged between 'A' and 'B'. We run this test without a STUN module.

I guess that for this specific scenario a STUN module will not be necessary, because I guess the peers using PJSIP are exchanging information about IP addresses, via ICE, what in some way is substituting a STUN work. Am I correct?


P.S.: our test was executed in a LAN, without route to Internet. So, any STUN server was unreachable. Sorry If I am misunderstanding something.



Any hint will be very helpful!


Best regards.




RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151120/4b9b6921/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ATT00001.txt
URL: <http://lists.opensips.org/pipermail/users/attachments/20151120/4b9b6921/attachment-0001.txt>


More information about the Users mailing list