Hi.<div id="yMail_cursorElementTracker_1602601341814">Thanks for your response. I went through the uri transformation page, tried it but no luck.</div><div id="yMail_cursorElementTracker_1602601375632"><br></div><div id="yMail_cursorElementTracker_1602601376263">Is there any other method to slice the string from +34xxxxxxxxx@sub.domain.com to +34??</div><div id="yMail_cursorElementTracker_1602601433107"><br></div><div id="yMail_cursorElementTracker_1602601435022">Regards<br><br><div id="ymail_android_signature"><a id="ymail_android_signature_link" href="https://go.onelink.me/107872968?pid=InProduct&c=Global_Internal_YGrowth_AndroidEmailSig__AndroidUsers&af_wl=ym&af_sub1=Internal&af_sub2=Global_YGrowth&af_sub3=EmailSignature">Sent from Yahoo Mail on Android</a></div> <br> <blockquote style="margin: 0 0 20px 0;"> <div style="font-family:Roboto, sans-serif; color:#6D00F6;"> <div>On Tue, Oct 13, 2020 at 17:30, Henning Westerholt</div><div><hw@skalatan.de> wrote:</div> </div> <div style="padding: 10px 0 0 20px; margin: 10px 0 0 0; border-left: 1px solid #6D00F6;"> <div id="yiv7346137936"><style>#yiv7346137936 #yiv7346137936 --
 
 _filtered {}
 _filtered {}
#yiv7346137936  
#yiv7346137936 p.yiv7346137936MsoNormal, #yiv7346137936 li.yiv7346137936MsoNormal, #yiv7346137936 div.yiv7346137936MsoNormal
        {margin:0cm;font-size:11.0pt;font-family:sans-serif;}
#yiv7346137936 a:link, #yiv7346137936 span.yiv7346137936MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv7346137936 span.yiv7346137936E-MailFormatvorlage18
        {font-family:sans-serif;color:windowtext;}
#yiv7346137936 .yiv7346137936MsoChpDefault
        {font-family:sans-serif;}
 _filtered {}
#yiv7346137936 div.yiv7346137936WordSection1
        {}
#yiv7346137936 </style><div>
<div class="yiv7346137936WordSection1">
<p class="yiv7346137936MsoNormal"><span style="">Hello,</span></p> 
<p class="yiv7346137936MsoNormal"><span style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">have a look to the transformations for URIs:
<a rel="nofollow" shape="rect" target="_blank" href="https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transformations">
https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transformations</a></span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">There is one to get parameters as well.</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">$shm variables are shared in shared memory, so you can share them in other calls. The $avp/$xavp are shared between processes, but belongs to the SIP transaction.</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">Cheers,</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">Henning</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">-- 
</span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">Henning Westerholt –
</span><span style=""><a rel="nofollow" shape="rect" target="_blank" href="https://skalatan.de/blog/"><span lang="EN-GB" style="color:#0563C1;">https://skalatan.de/blog/</span></a></span><span lang="EN-GB" style=""></span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">Kamailio services –
</span><span style=""><a rel="nofollow" shape="rect" target="_blank" href="https://gilawa.com/"><span lang="EN-GB" style="color:#0563C1;">https://gilawa.com</span></a></span><span style="">
<span lang="EN-GB"></span></span></p> 
<p class="yiv7346137936MsoNormal"><span lang="EN-GB" style="">  </span></p> 
<div class="yiv7346137936yqt4565540151" id="yiv7346137936yqt91721"><div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm;">
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;"><b>From:</b> sr-users <sr-users-bounces@lists.kamailio.org>
<b>On Behalf Of </b>sai sudheer<br clear="none">
<b>Sent:</b> Tuesday, October 13, 2020 12:44 PM<br clear="none">
<b>To:</b> sr-users@lists.kamailio.org; sr-dev@lists.kamailio.org<br clear="none">
<b>Subject:</b> [SR-Users] how to get a value from SIP INVITE Header</p> 
</div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
<blockquote style="margin-left:0cm;margin-right:0cm;margin-bottom:15.0pt;">
<div style="border:none;border-left:solid #6D00F6 1.0pt;padding:0cm 0cm 0cm 15.0pt;margin-top:7.5pt;">
<div id="yiv7346137936yMail_cursorElementTracker_1602585772493">
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">Hii</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+<a rel="nofollow" shape="rect" ymailto="mailto:341930203454@sub.domain.com" target="_blank" href="mailto:341930203454@sub.domain.com">341930203454@sub.domain.com</a>;myid=+<a rel="nofollow" shape="rect" ymailto="mailto:34@sub.domain.com" target="_blank" href="mailto:34@sub.domain.com">34@sub.domain.com</a>
 SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">     $var(uri) = $sel(ruri);</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">     xavp_params_explode("$(var(uri){s.unbracket})", "uri");</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">     xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">I tried above and it prints +<a rel="nofollow" shape="rect" ymailto="mailto:34@sub.domain.com" target="_blank" href="mailto:34@sub.domain.com">34@sub.domain.com</a> But i want to just save +34 into a variable to further check the prefix based routing from the database.</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">1) Could you please help how to get it or If there is any alternate/single line approach to get this value?</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?</p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">  </p> 
</div>
<div>
<p class="yiv7346137936MsoNormal" style="margin-left:35.4pt;">Please help, thanks in advance.</p> 
</div>
</div>
</blockquote></div>
</div>
</div></div> </div> </blockquote></div>