[OpenSIPS-Users] Function add_isup_part() parsing error in opensips 3.0

sagar malam sagarmalam at gmail.com
Tue Jul 16 05:52:16 EDT 2019


Hello,
I am using  *add_isup_part([isup_msg_type][,extra_headers])*
function from request and failure route to local route  in *Opensips
3.0* version
script but I am getting parsing error as below . I AM NOT GETTING THIS
ERROR IN OPENSIPS 2.x. Please help me on this issue.
------------------------------------------------------------------------
Usage :

        if(!isflagset(11) && $avp(tsi_types)=="SIP-I" ) {
                $ru  = $ru + ";user=phone";
               xlog("L_INFO","Adding isup part ");

                if(add_isup_part("Initial address")) {
                        setflag(11);
                }

        } else {
                xlog("L_INFO","Removing isup part ");
                remove_body_part("application/sdp","revert");
        }
------------------------------------------------------------------------------
Error :
Jul 15 10:46:35 sbcsbc opensips: CRITICAL:core:yyerror: parse error in
/usr/local//etc/opensips/opensips.cfg:1282:28-29: *Command <add_isup_part>
cannot be used in the block#012*
Jul 15 10:46:35 sbcsbc opensips:                xlog("L_INFO","Adding isup
part ");
Jul 15 10:46:35 sbcsbc opensips:
Jul 15 10:46:35 sbcsbc opensips:       #011#011if(add_isup_part("Initial
address")) {
Jul 15 10:46:35 sbcsbc opensips:       #011#011^~
Jul 15 10:46:35 sbcsbc opensips: #011        #011setflag(11);
Jul 15 10:46:35 sbcsbc opensips: #011#011}
Jul 15 10:46:35 sbcsbc opensips: ERROR:core:parse_opensips_cfg: bad config
file (1 errors)
Jul 15 10:46:35 sbcsbc opensips: ERROR:core:main: failed to parse config
file (null)
Jul 15 10:46:35 sbcsbc opensips: NOTICE:core:main: Exiting....
----------------------------------------------------------------------------------


-- 
Thanks,

Sagar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20190716/1e5d6b21/attachment.html>


More information about the Users mailing list