[OpenSIPS-Users] Query ..
Sasmita Panda
spanda at 3clogic.com
Wed Dec 2 12:19:31 CET 2015
Hi Patrick ,
I think in my case , the length of c line is varying . not constant in
all cases . so I need a general solution for this .
Of course your syntax is giving me actual result in this case . But i cant
be dependent on the length .
*Thanks & Regards*
*Sasmita Panda*
*Network Testing and Software Engineer*
*3CLogic , ph:07827611765*
On Wed, Dec 2, 2015 at 4:25 PM, Patrick Wakano <pwakano at gmail.com> wrote:
> 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
>>
>>
>
> _______________________________________________
> 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/e6b746db/attachment.htm>
More information about the Users
mailing list