Awesome, and I assume to recover the integer value, I need sth like, as
well:
$var(param1) = $(var(param1){s.int});
Thanks very much,
Alireza
On Fri, Aug 15, 2014 at 2:48 PM, Alex Balashov <abalashov(a)evaristesys.com>
wrote:
On 08/15/2014 02:43 PM, AliReza Khoshgoftar Monfared
wrote:
Thanks very much Alex and Hugh,
I think what Hugh mentioned is the best way to process text in Kamailio
without relying on an external tool and it's good to know it, and Alex's
suggestion is great for transferring a single number.
It does not have to be a single number. A header can have any value you
like, e.g.
X-AliReza-Custom-Header: param1=x;param2=y;param3=z
Which you could then extract with string transformations[1]:
$var(param1) = $(hdr(X-AliReza-Custom-Header){s.select,0,;});
$var(param2) = $(hdr(X-AliReza-Custom-Header){s.select,1,;});
$var(param3) = $(hdr(X-AliReza-Custom-Header){s.select,2,;});
-- Alex
[1]
http://www.kamailio.org/wiki/cookbooks/4.1.x/
transformations#sselect_index_separator
--
Alex Balashov - Principal
Evariste Systems LLC
Tel: +1-678-954-0670
Web:
http://www.evaristesys.com/,
http://www.alexbalashov.com/
Please be kind to the English language:
http://www.entrepreneur.com/article/232906
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users(a)lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users