[SR-Users] Need help in how to read INVITE packet SDP c line IP Address

Narsay, Deep deep.narsay at mezocliq.com
Fri Sep 12 21:05:29 CEST 2014


Varun,

You can use sdpops
<http://kamailio.org/docs/modules/4.1.x/modules/sdpops.html> module.

See details for this function:
 sdp_get_line_startswith(avpvar, string)

Sample code:
if(sdp_get_line_startswith("$avp(cline)", "c="))
{
xlog("connection-line: $avp(cline)\n");
}

http://kamailio.org/docs/modules/4.1.x/modules/sdpops.html


-Deep Narsay


On Fri, Sep 12, 2014 at 1:00 PM, varun pratapsingh <varunps2003 at gmail.com>
wrote:

> Hi All,
>
> Can anybody help me by telling how to read INVITE packet SDP c line IP
> address in Kamailio.cfg. For example a INVITE packet comes and its SDP
> contains the line
>
> v=0
> o=- 3619547086 3619547086 IN IP4 1.223.65.215
> s=pjmedia
> c=IN IP4 1.223.65.215
> t=0 0
> a=X-nat:0
>
>
> Now I want to read this SDP packet c line IP address and want to put the
> IP 1.223.65.215 in a variable.
>
> Can anybody please help me out in this.
>
>
> Regards
> Varun
>
> _______________________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20140912/d2cc1665/attachment.html>


More information about the sr-users mailing list