<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"Préformaté HTML Car";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.PrformatHTMLCar
{mso-style-name:"Préformaté HTML Car";
mso-style-priority:99;
mso-style-link:"Préformaté HTML";
font-family:"Courier New";
mso-fareast-language:FR;}
p.HTMLPreformatted, li.HTMLPreformatted, div.HTMLPreformatted
{mso-style-name:"HTML Preformatted";
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Calibri",sans-serif;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle23
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle24
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle25
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle26
{mso-style-type:personal;
font-family:"Calibri",sans-serif;}
span.EmailStyle27
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;}
span.tlid-translation
{mso-style-name:tlid-translation;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style></head><body lang=FR link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt'>no worries, we are here to exchange<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;mso-fareast-language:EN-US'>Alain<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;mso-fareast-language:EN-US'><o:p> </o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>De : </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> au nom de Ben Newlin <Ben.Newlin@genesys.com><br><b>Répondre à : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date : </b>jeudi 13 décembre 2018 à 14:42<br><b>À : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Objet : </b>Re: [OpenSIPS-Users] convert from tel: to sip: on To header<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'><o:p> </o:p></span></p></div><p class=MsoNormal><span style='font-size:11.0pt'>Alain,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>Yes, I see now that is the case. My apologies for missing that. </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div><p class=MsoNormal><span style='font-size:11.0pt;color:black'>Ben Newlin </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>From: </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> on behalf of Alain Bieuzent <alain.bieuzent@free.fr><br><b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date: </b>Thursday, December 13, 2018 at 8:10 AM<br><b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Subject: </b>Re: [OpenSIPS-Users] convert from tel: to sip: on To header</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'>Thanks Ben,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>i see this function of uri module, but as I understand it convert only « tel » format on RURI and not on To (or From) header.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>Regards</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>De : </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> au nom de Ben Newlin <Ben.Newlin@genesys.com><br><b>Répondre à : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date : </b>jeudi 13 décembre 2018 à 14:04<br><b>À : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Objet : </b>Re: [OpenSIPS-Users] convert from tel: to sip: on To header</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'>Alain,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>The URI module also contains a tel2sip conversion function you may wish to use. It properly handles converting parameters from tel: to sip: format, which I don’t believe your solution does.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'><a href="https://opensips.org/html/docs/modules/2.4.x/uri.html#func_tel2sip">https://opensips.org/html/docs/modules/2.4.x/uri.html#func_tel2sip</a></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div><p class=MsoNormal><span style='font-size:11.0pt;color:black'>Ben Newlin </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>From: </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> on behalf of Alain Bieuzent <alain.bieuzent@free.fr><br><b>Reply-To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date: </b>Thursday, December 13, 2018 at 5:57 AM<br><b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Subject: </b>Re: [OpenSIPS-Users] convert from tel: to sip: on To header</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'>Reply to myself, perhaps it can help someone</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>##### if we receive a call with "tel:" in To header we remove it</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> $var(str) = 'tel:';</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> $var(tu) = $tu;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> if ($(var(tu){s.index, $var(str)}) >=0)</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> {</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> $var(reg) = "/tel://g";</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> $var(newtu) = $(var(tu){re.subst,$var(reg)});</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> uac_replace_to("","sip:$var(newtu)@$Ri");</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> }</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='color:black'>De : </span></b><span style='color:black'>Users <users-bounces@lists.opensips.org> au nom de Alain Bieuzent <alain.bieuzent@free.fr><br><b>Répondre à : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Date : </b>mercredi 12 décembre 2018 à 17:10<br><b>À : </b>OpenSIPS users mailling list <users@lists.opensips.org><br><b>Objet : </b>[OpenSIPS-Users] convert from tel: to sip: on To header</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:11.0pt'>Hi All,</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>what is the best way to convert « tel: » format to « sip: » on a To header.</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>For exemple : </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>INVITE sip:+33999999999@mydomain.com;user=phone SIP/2.0</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Via: SIP/2.0/UDP X.Y.Z.Z:5060;branch=z9hG4bKiqehr50040ilbvfkjfn0.1</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>To: <tel:+33999999999></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>From: "De 0888888888"<sip:+33888888888@otherdomain.com;user=phone>;tag=SDu2kba01-1653662573-1544626875515-</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Call-ID: SDu2kba01-1317d56f03e5fc6d6dc2136c0254bed0-v300g00</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>CSeq: 293066302 INVITE</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Max-Forwards: 67</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'>Content-Length: 255</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'> </span><o:p></o:p></p><pre><span style='font-size:11.0pt'>I want to convert :</span><span style='font-size:10.0pt;font-family:"Courier New"'> « To: <a href="tel:+33999999999">tel:+33999999999</a> » </span><span style='font-size:11.0pt'>to</span><span style='font-size:10.0pt;font-family:"Courier New"'> « To: <a href="sip:33999999999@A.B.C.D:5060">sip:33999999999@A.B.C.D:5060</a> »</span><o:p></o:p></pre><pre><span style='font-size:10.0pt;font-family:"Courier New"'> </span><o:p></o:p></pre><pre><span style='font-size:11.0pt'>Thanks for your help</span><o:p></o:p></pre><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Courier New"'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>_______________________________________________ Users mailing list Users@lists.opensips.org <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>_______________________________________________ Users mailing list Users@lists.opensips.org <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a> </span><o:p></o:p></p><p class=MsoNormal><span style='font-size:11.0pt'>_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users <o:p></o:p></span></p></div></body></html>