Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:[email protected];[email protected] 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 [email protected]
But i want to just save +34
into a variable to further check the prefix based routing
from the database.
Could you please help how to get it or If there is any alternate/single line approach to get this value, please help.
thanks in advance.
I think something like this will work:
All above string operation is possible to put in one line, I used several lines just to show it in simple way.
In one line it should be something like below, but please do not quote me on this, but I hope you can get an idea