[OpenSIPS-Users] Is it possible to change the "Body of Message Method" ???

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Oct 9 19:03:00 CEST 2014


Hi,

as the $rb variable is read-only, in order to push your new body you can 
do strip_body() + add_body() :
http://www.opensips.org/html/docs/modules/1.11.x/sipmsgops.html#id294226

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 09.10.2014 17:11, Venkatesh Macha wrote:
> Hi list,
>
>             Is it possible to change the body of Message method. here is the
> my SIP message
>
> U 192.168.1.126:54638 -> 192.168.1.100:5060
> MESSAGE sip:200 at 192.168.1.100 SIP/2.0.
> Via: SIP/2.0/UDP 192.168.1.126:54638;branch=z9hG4bK.HmddG7cOd;rport.
> From: <sip:100 at 192.168.1.100>;tag=qurOuaMoo.
> To: sip:200 at 192.168.1.100.
> CSeq: 20 MESSAGE.
> Call-ID: CXke2mLoD1.
> Max-Forwards: 70.
> Supported: outbound.
> Content-Type: text/plain.
> Content-Length: 29.
> Date: Thu, 9 Oct 2014 13:58:42 GMT.
> User-Agent: LinphoneAndroid/2.3.2 (belle-sip/1.3.2).
> .
> *msg,431,original message body*
>
> I want to change the body i.e *msg,431,original message body* to* original
> message body* is it possible ???
>
> I know about $rb ($rb - reference to message body) it contains the body of
> my message but if i try to change the Message body it is not Working... I am
> trying like this in opensips.cfg
> *$var(s)=$(rb{s.select,2,,});
> $rb = $var(s); *
>
> But not working.. here is the error message.
> CRITICAL:core:yyerror: parse error in config file
> /usr//etc/opensips/opensips.cfg, line 193, column 24-25: invalid left
> operand in assignment.
>
> Is there any other way to change the message body..
>
> Thank you in Advance
>
> Venkatesh Macha,
> Junior VOIP Engineer,
> @ sillycodes <http://sillycodes.com>
>
>
>
> --
> View this message in context: http://opensips-open-sip-server.1449251.n2.nabble.com/Is-it-possible-to-change-the-Body-of-Message-Method-tp7593914.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>




More information about the Users mailing list