[SR-Users] Concatenating strings in $hdr

David Cunningham dcunningham at voisonics.com
Fri Jul 26 02:19:19 CEST 2019


Hi Alex,

Thank you, I got it working like that.


On Thu, 25 Jul 2019 at 18:54, Alex Balashov <abalashov at evaristesys.com>
wrote:

> Try:
>
> $var(x) = “x” + y + z;
> $hdr($var(x));
>
>> Sent from mobile, with due apologies for brevity and errors.
>
> On Jul 24, 2019, at 11:41 PM, David Cunningham <dcunningham at voisonics.com>
> wrote:
>
> Hello,
>
> I'm having an issue where this doesn't work:
>
> #!trydef PRODUCT "Foo"
>
> if( $hdr("X-" + PRODUCT + "-Transport") != "" ) {
>     add_uri_param( $hdr("X-" + PRODUCT + "-Transport") );
> }
>
> It seems Kamailio doesn't like the concatenation within the $hdr().
> Concatenation does work in other places though:
>
> append_hf( "X-" + PRODUCT + "-Transport: tcp\r\n" );
>
> Can anyone advise how to make the concatenation within $hdr() work?
> Thanking you in advance.
>
> --
> David Cunningham, Voisonics Limited
> http://voisonics.com/
> USA: +1 213 221 1092
> New Zealand: +64 (0)28 2558 3782
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
David Cunningham, Voisonics Limited
http://voisonics.com/
USA: +1 213 221 1092
New Zealand: +64 (0)28 2558 3782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190726/8d18b3a9/attachment.html>


More information about the sr-users mailing list