[OpenSIPS-Users] What is the module to fix SDP ?

Rodrigo Pimenta Carvalho pimenta at inatel.br
Thu Mar 31 19:09:41 CEST 2016


Hi Carlos.


That is what I'm looking for and now trying to understand if it is sufficient for may case.

With this function I will be able to fix IP. But I still have to fix Ports.


If there are NATs, so I suppose there is some kind of Ports mapping that has to be taken into account when solving the NAT traversal.  I and a coworker are investigating how to solve the port mapping. Maybe the solution will demand ICE and STUN. We can't use media proxy module, because our hardware will not be able to do media relay. So, We can have a media relay in the same place as OpenSIPs.



Thanks a lot.


RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200 RAMAL 979


________________________________
De: users-bounces at lists.opensips.org <users-bounces at lists.opensips.org> em nome de Carlos Eduardo <kaduww at gmail.com>
Enviado: quinta-feira, 31 de março de 2016 11:43
Para: OpenSIPS users mailling list
Assunto: Re: [OpenSIPS-Users] What is the module to fix SDP ?

Hello Rodrigo,

Maybe the function fix_nated_sdp, from nathelper module, would help.

1.5.2.  fix_nated_sdp(flags [, ip_address])

Alters the SDP information in orer to facilitate NAT traversal. What changes to be performed may be controled via the "flags" paramter.

Meaning of the parameters is as follows:

flags - the value may be a bitwise OR of the following flags:
0x01 - adds "a=direction:active" SDP line;
0x02 - rewrite media IP address (c=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address).
0x04 - adds "a=nortpproxy:yes" SDP line;
0x08 - rewrite IP from origin description (o=) with source address of the message or the provided IP address (the provide IP address take precedence over the source address).

ip_address - IP to be used for rewriting SDP. If not specified, the received signalling IP will be used. The parameter allows pseudo-variables usage. NOTE: For the IP to be used, you need to use 0x02 or 0x08 flags, otherwise it will have no effect.

This function can be used from REQUEST_ROUTE, ONREPLY_ROUTE, FAILURE_ROUTE, BRANCH_ROUTE.

Example:
if (search("User-Agent: Cisco ATA.*") {fix_nated_sdp("3");};


2016-03-30 14:57 GMT-03:00 Rodrigo Pimenta Carvalho <pimenta at inatel.br<mailto:pimenta at inatel.br>>:

Hi.


I have a case when a peer answering a call (INVITE) is behind a NAT.

So, in its SIP OK message I would like to see the SDP containing a valid IP and media Port valid to receive audio from the caller. That is, the caller need to know a valid IP and Port where he/she can send his/her audio packets.


1 - Is it possible to "fix" SDP content for such objective?

2 - Can OpenSIPS do something for this idea works or must I to use something more like a stun server?

3 - What is the OpenSIPS module that can help me with this task?


I guess I will have to fix 2 fiels in SDP:

    Media Description, name and address (m): audio 55142 RTP/AVP 8 101  ( to fix the port)
    Connection Information (c): IN IP4 192.168.100.156                                  ( to fix the IP)


P.S.: I have already a solution (opensips.cfg) that let SIP messages cross NATs without problems. Only SDP has to be fixed.


Any hint will be very helpful!

Best regards.



RODRIGO PIMENTA CARVALHO
Inatel Competence Center
Software
Ph: +55 35 3471 9200<tel:%2B55%2035%203471%209200> RAMAL 979

_______________________________________________
Users mailing list
Users at lists.opensips.org<mailto:Users at lists.opensips.org>
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Carlos E. Wagner
Tecnólogo em Telecomunicações, OCP, dCAA

Gnotel Tecnologia
E-mail: kaduww at gmail.com<mailto:kaduww at gmail.com>
Fone: +55 48 9981-0894
Skype: carlos.e.wagner
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160331/79efaad2/attachment.htm>


More information about the Users mailing list