[SR-Users] how to get a value from SIP INVITE Header
sai sudheer
sudheer628 at yahoo.com
Tue Oct 13 12:44:03 CEST 2020
Hii
Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+341930203454 at sub.domain.com;myid=+34 at sub.domain.com SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.
$var(uri) = $sel(ruri);
xavp_params_explode("$(var(uri){s.unbracket})", "uri");
xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");
I tried above and it prints +34 at sub.domain.com But i want to just save +34 into a variable to further check the prefix based routing from the database.
1) Could you please help how to get it or If there is any alternate/single line approach to get this value?
2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right
3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?
Please help, thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20201013/f56d8aa2/attachment.htm>
More information about the sr-users
mailing list