[SR-Users] Get the SDP IP in Kamailio

Daniel-Constantin Mierla miconda at gmail.com
Mon Feb 9 14:47:16 CET 2015


Hello,

I will look at the code, apparently this is from fix_nated_sdp() -- even
there is supposed to be no NAT in IPv6, this function can be used to
update the IP in SDP independent of the NAT detection function,
therefore shoudl work with ipv6 addresses.

Detecting IPv6 can be done by search_body(), there should be something like:

c=IN IP6 ...

There are some transformations that can extract lines based on matching
rules -- they can be useful when needing to extract the address.

Cheers,
Daniel

On 02/02/15 12:50, Sebastian Damm wrote:
> Hi,
>
> since we integrated IPv6 into our existing routing logic, in some
> cases "fix_nated_sdp" gets called for IPv6 calls, too. (Actually, this
> just happens because of the mistakenly detected NAT.) But that ends up
> with a an error in the log.
>
> ERROR: nathelper [nathelper.c:1685]: replace_sdp_ip(): not an IPv4
> address in 'c=' SDP
>
> So I'm looking for a way to exempt IPv6 calls from that. But I can't
> find a pseudovariable which carries the SDP contact IP. I guess I
> could take some function from the sdpops module, but is there a more
> convenient way to get just the contact IP?
>
> Best Regards,
> Sebastian
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, May 27-29, 2015
Berlin, Germany - http://www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20150209/389e3f91/attachment.html>


More information about the sr-users mailing list