[sr-dev] subst() textops bug?

Cléviton Mendes de Araújo clevitonmendes at gmail.com
Mon Jul 10 17:42:36 CEST 2017


I try replace info PAI header by using subst() function in route block as
below:

route[3]
{
        ...
        $var(fromU) = 22227777;
        ...
        subst('/^P-Asserted-Identity:(.*)sip:[^@]*@([a-zA-Z0-9.:]+)(
.*)$/P-Asserted-Identity:\1sip:$var(fromU)@\2\3/ig');
        ...
        ...
        forward();
        exit;
}

but when I read ngrep command output I catch P-Asserted-Identity header as
below:

+++++++++++++++++++++++++++++++++++++++++++++++
before route[3] processing:
INVITE sip:99992222 at 15.113.132.21:5060 SIP/2.0.
...
P-Asserted-Identity: "Display Name 7777" <sip:7777 at 101.14.101.245>.
...

+++++++++++++++++++++++++++++++++++++++++++++++
after route[3] processing:
INVITE sip:99992222 at 15.113.132.21:5060 SIP/2.0.
...
P-Asserted-Identity: "Display Name 7777"
<sip:22227777 at 101.14.101.245>.P-Asserted-Identity:
"Display Name 7777" <sip:7777 at 101.14.101.245>.
...
+++++++++++++++++++++++++++++++++++++++++++++++

Is it normal or bug behaviors?



Regards
CMA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170710/0bced3b6/attachment.html>


More information about the sr-dev mailing list