[OpenSIPS-Users] Query ..
Patrick Wakano
pwakano at gmail.com
Wed Dec 2 11:55:18 CET 2015
Hi,
Maybe you can perform a string transformation to extract the substring with
only the IP.
Should be something like this:
$var(c_line) = $(rb{sdp.line,c,1}{s.substr,9,0}); #skips the "c=IN IP4 "
characters
You can also play with the s.select transformation to do something similar.
Check: http://www.opensips.org/Documentation/Script-Tran-1-11#toc1
Patrick
On Wed, Dec 2, 2015 at 6:20 AM, Sasmita Panda <spanda at 3clogic.com> wrote:
> Hi All ,
>
>
> I am trying to find the C line of the sdp of a INVITE request .
>
> if (is_method("INVITE"))
>
> {
> $var(aline) = $(rb{sdp.line,a,1});
> xlog("The second a line in the SDP body is $var(aline)\n");
> }
>
> I got the entire C line in this case as "c=IN IP4 x.x.x.x". But
> if I wanted to get the IP of the C line then what should I do . Is there
> any comparison to get get the IP only . Please help me . Any kind of help
> is appreciated .
>
>
> *Thanks & Regards*
> *Sasmita Panda*
> *Network Testing and Software Engineer*
> *3CLogic , ph:07827611765*
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20151202/70e7b97a/attachment.htm>
More information about the Users
mailing list