[OpenSIPS-Users] Manipulating sdp headers2

Chris Martineau chris at ghosttelecom.com
Wed Jul 13 16:49:40 CEST 2011


Thanks,

 

I have just figured that out and have got what I wanted to work.

 

Regards

 

Chris

 

From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of
duane.larson at gmail.com
Sent: 13 July 2011 14:54
To: OpenSIPS users mailling list
Subject: Re: [OpenSIPS-Users] Manipulating sdp headers2

 

In the documentation I think it says the first argument you give
replace_body has to be a regular expression. So you can't give it a
variable. 

Here are some examples 
http://opensips-open-sip-server.1449251.n2.nabble.com/Modify-SDP-td39454
62.html#a4014981 
http://opensips-open-sip-server.1449251.n2.nabble.com/Regular-expression
-problems-with-replace-body-td4116208.html 


On Jul 13, 2011 7:47am, Chris Martineau <chris at ghosttelecom.com> wrote: 
> Hi, Okay I am now accessing the headers in sdp but I cannot seem to
use a variable in the textops methods. If I do the following...
$var(line1)=$(rb{sdp.line,c,0});$var(line2)=$(rb{sdp.line,c,1});Xlog("$v
ar(line1)"); If ($var(line2)!=""){                Xlog("$var(line2)");
Replace_body("$var(line2)","");} I get line1 and line2 variables
printout but replace_body does nothing. If I just put in
Replace_body("c=IN IP4",""); it deletes the relevant part so the
function is working but it just won't except a variable as the search
term. Any help would be greatly appreciated. Regards Chris 
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110713/63a8d4f5/attachment-0001.htm>


More information about the Users mailing list