Hello,
How do I extract the value of “tel” from multiple P-Asserted-Identity headers?
Example:
P-Asserted-Identity: "Cullen Jennings" <sip:fluffy@cisco.com>
P-Asserted-Identity: tel:+14085264000
What I got so far is:
$var(p_asserted_identity) = $(hdr(P-Asserted-Identity)[*]);
$var(caller_id) = $var(p_asserted_identity){param.value,'tel',':'};
But this does not work. I keep getting parser errors when doing the transformation (2nd line of code example):
I’m not sure how to format the line of code. I tried multiple ways, but none work.
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 47: syntax error
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 47: bad command
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 47: bad command
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 53: '('')' expected (function call)
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 53: bad command: missing ';'?
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 59: '('')' expected (function call)
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 59: bad command: missing ';'?
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3365]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 60-64: bad command
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 65: bad command
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3365]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 400, column 66-68: bad command
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 408, column 6: syntax error
Apr 8 18:35:20 kamailio: : <core> [cfg.y:3368]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 408, column 6:
Regards,
Grant