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

Carlos Eduardo kaduww at gmail.com
Thu Mar 31 16:43:59 CEST 2016


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>:

> 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 RAMAL 979
>
> _______________________________________________
> Users mailing list
> 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 <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/6c81c8b6/attachment.htm>


More information about the Users mailing list