<div dir="ltr">Please help to configure 

uri transformation page.<div><br></div><div>Thanks</div><div>Santanu</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Oct 14, 2020 at 1:08 PM Henning Westerholt <<a href="mailto:hw@skalatan.de">hw@skalatan.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="DE" style="overflow-wrap: break-word;">
<div class="gmail-m_-4745042440498081680WordSection1">
<p class="MsoNormal"><span>Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">can you share the error you have got? If you just want to get the substring of the +34xxxxx@domain URI, have a look to the string transformations on the same link.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">-- <u></u>
<u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt –
</span><span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services –
</span><span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a></span><span>
<span lang="EN-GB"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> sai sudheer <<a href="mailto:sudheer628@yahoo.com" target="_blank">sudheer628@yahoo.com</a>>
<br>
<b>Sent:</b> Tuesday, October 13, 2020 5:04 PM<br>
<b>To:</b> Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>; Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> RE: [SR-Users] how to get a value from SIP INVITE Header<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">Hi.<u></u><u></u></p>
<div id="gmail-m_-4745042440498081680yMail_cursorElementTracker_1602601341814">
<p class="MsoNormal" style="margin-left:35.4pt">Thanks for your response. I went through the uri transformation page, tried it but no luck.<u></u><u></u></p>
</div>
<div id="gmail-m_-4745042440498081680yMail_cursorElementTracker_1602601375632">
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div id="gmail-m_-4745042440498081680yMail_cursorElementTracker_1602601376263">
<p class="MsoNormal" style="margin-left:35.4pt">Is there any other method to slice the string from
<a href="mailto:+34xxxxxxxxx@sub.domain.com" target="_blank">+34xxxxxxxxx@sub.domain.com</a> to +34??<u></u><u></u></p>
</div>
<div id="gmail-m_-4745042440498081680yMail_cursorElementTracker_1602601433107">
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div id="gmail-m_-4745042440498081680yMail_cursorElementTracker_1602601435022">
<p class="MsoNormal" style="margin-right:0cm;margin-bottom:12pt;margin-left:35.4pt">
Regards<u></u><u></u></p>
<div id="gmail-m_-4745042440498081680ymail_android_signature">
<p class="MsoNormal" style="margin-left:35.4pt"><a 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" target="_blank">Sent from Yahoo Mail on Android</a><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<blockquote style="margin-left:0cm;margin-right:0cm;margin-bottom:15pt">
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-family:Arial,sans-serif;color:rgb(109,0,246)">On Tue, Oct 13, 2020 at 17:30, Henning Westerholt<u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><span style="font-family:Arial,sans-serif;color:rgb(109,0,246)"><<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<u></u><u></u></span></p>
</div>
</div>
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(109,0,246);padding:0cm 0cm 0cm 15pt;margin-top:7.5pt">
<div id="gmail-m_-4745042440498081680yiv7346137936">
<div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt">Hello,<u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"> <u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">have a look to the transformations for URIs:
<a href="https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transformations" target="_blank">
https://www.kamailio.org/wiki/cookbooks/devel/transformations#uri_transformations</a></span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">There is one to get parameters as well.</span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">$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><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">About routing calls by prefix – have a look to the lcr, carrierroute or drouting modules, for example.</span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">Cheers,</span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">Henning</span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">--
</span><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">Henning Westerholt –
</span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a><u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB">Kamailio services –
</span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a>
<u></u><u></u></p>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:35.4pt"><span lang="EN-GB"> </span><u></u><u></u></p>
<div id="gmail-m_-4745042440498081680yiv7346137936yqt91721">
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"><b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>sai sudheer<br>
<b>Sent:</b> Tuesday, October 13, 2020 12:44 PM<br>
<b>To:</b> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>;
<a href="mailto:sr-dev@lists.kamailio.org" target="_blank">sr-dev@lists.kamailio.org</a><br>
<b>Subject:</b> [SR-Users] how to get a value from SIP INVITE Header<u></u><u></u></p>
</div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
<blockquote style="margin:5pt 0cm 15pt">
<div style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(109,0,246);padding:0cm 0cm 0cm 15pt;margin-top:7.5pt">
<div id="gmail-m_-4745042440498081680yiv7346137936yMail_cursorElementTracker_1602585772493">
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">Hii<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">Please help me to get the a value from SIP INVITE header reached to kamailio like INVITE sip:+<a href="mailto:341930203454@sub.domain.com" target="_blank">341930203454@sub.domain.com</a>;myid=+<a href="mailto:34@sub.domain.com" target="_blank">34@sub.domain.com</a>
 SIP/2.0 and i want to save the myid value +34 into a variable, without the domain name.<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">     $var(uri) = $sel(ruri);<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">     xavp_params_explode("$(var(uri){s.unbracket})", "uri");<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">     xlog("L_INFO", "$var(uri) Received converted to $xavp(uri=>myid[0])\n");<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">I tried above and it prints +<a href="mailto:34@sub.domain.com" target="_blank">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.<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">1) Could you please help how to get it or If there is any alternate/single line approach to get this value?<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">2) $var & $xavp are process-local variables, and they cant be shared with other calls? Right<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">3) What is the best module to route calls based their prefix ? pstn_route or dynamic routing or any suggestions?<u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt"> <u></u><u></u></p>
</div>
<div>
<p class="gmail-m_-4745042440498081680yiv7346137936msonormal" style="margin-left:70.8pt">Please help, thanks in advance.<u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>