Varun,

You can use sdpops 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@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@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users