The following does work:
$avp(s:caller) = "00" + $fU;
This will suffice for now, since I'm not doing anything to $avp(s:caller) before
executing this statement.
-----Original Message-----
From: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
On Behalf Of Grant Bagdasarian
Sent: Tuesday, December 10, 2013 11:26 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] how to string concatination
I've already tried that. It can't parse the config file:
Not starting Kamailio: invalid configuration file!
-e
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 267, column 32-39: syntax error
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 267, column 32-39: '('')' expected
(function call)
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 267, column 32-39: bad command
0(3558) : <core> [cfg.y:3411]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 267, column 40: bad command
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 271, column 32-39: syntax error
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 271, column 32-39: '('')' expected
(function call)
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 271, column 32-39: bad command
0(3558) : <core> [cfg.y:3411]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 271, column 40: bad command
0(3558) : <core> [cfg.y:3408]: yyerror_at(): parse error in config file
/etc/kamailio/kamailio.cfg, line 275, column 3-20:
ERROR: bad config file (9 errors)
-----Original Message-----
From: sr-users-bounces(a)lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org]
On Behalf Of Juha Heinanen
Sent: Tuesday, December 10, 2013 11:19 AM
To: Kamailio (SER) - Users Mailing List
Subject: [SR-Users] how to string concatination
Grant Bagdasarian writes:
How do I concatenate a string to an avp variable?
$avp(s:caller) = $fU;
if($(avp(s:caller){s.substr,0,2}) != "00") {
$avp(s:caller) = "00$avp(s:caller)"; }
try "00" + avp(s:caller)
-- juha
_______________________________________________
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
_______________________________________________
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