[sr-dev] Bug in subst() function
Daniel-Constantin Mierla
miconda at gmail.com
Tue Aug 15 09:30:33 CEST 2017
Can you paste to full incoming INVITE as well as full outgoing INVITE
taken with ngrep (use -W byline)?
Provide also the version for kamailio and details of the operating
system you use.
Cheers,
Daniel
On 05.08.17 00:20, Cléviton Mendes de Araújo wrote:
> Hi fulks
>
>
> I try changing info value in PAI header-field by using subst()
> function into 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
> <http://sip:99992222@15.113.132.21:5060> SIP/2.0.
> ...
> P-Asserted-Identity: "Display Name 7777"
> <sip:7777 at 101.14.101.245 <mailto:sip%3A7777 at 101.14.101.245>>.
> ...
>
> +++++++++++++++++++++++++++++++++++++++++++++++
> after route[3] processing:
> INVITE sip:99992222 at 15.113.132.21:5060
> <http://sip:99992222@15.113.132.21:5060> SIP/2.0.
> ...
> P-Asserted-Identity: "Display Name 7777"
> <sip:22227777 at 101.14.101.245
> <mailto:sip%3A22227777 at 101.14.101.245>>.P-Asserted-Identity:
> "Display Name 7777" <sip:7777 at 101.14.101.245
> <mailto:sip%3A7777 at 101.14.101.245>>.
> ...
> +++++++++++++++++++++++++++++++++++++++++++++++
>
> So, is it normal or bug behaviors?
>
>
>
> Regards
> CMA
>
>
>
>
>
> _______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
--
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20170815/f3c535d3/attachment-0002.html>
More information about the sr-dev
mailing list