<html xmlns:v="urn:schemas-microsoft-com:vml" 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 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\0027Helvetica Neue\0027";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple style='word-wrap: break-word;
-webkit-nbsp-mode: space;-webkit-line-break: after-white-space'>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks guys. That is exactly what I needed. I’m re-reading the
dial plan page to better understand pattern matching / substitutions.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks again!<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Ken<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> freeswitch-users-bounces@lists.freeswitch.org
[mailto:freeswitch-users-bounces@lists.freeswitch.org] <b>On Behalf Of </b>David
Ponzone<br>
<b>Sent:</b> Tuesday, April 20, 2010 12:23 PM<br>
<b>To:</b> freeswitch-users@lists.freeswitch.org<br>
<b>Subject:</b> Re: [Freeswitch-users] ANI / DNIS Number Translation<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Ken,<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>with FS, that's more than trivial.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>To strip a prefix from the dialed number for outbound calls,
the idea is to do this in your extension (syntax is not correct, I dont want to
spoil you from the pleasure to write it yourself :) ):<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>condition destination_number regexp ^9(\d+)$<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> bridge sofia/gateway/whatever/$1<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>-> $1 will contain what's between the () in the regexp<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>For inbound calls, what you want to do is the typical config
of FS (like in the default one) as all phones on FS use a 4 digits userid.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>So the idea is to do:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>condition destination_number regexp ^415917220(\d)$<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> bridge user/100$1<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>-> in this example, I consider you have 10 DIDs from
4159172200 to 4159172209 and that those DIDs are allocated to 10 users, from
1000 to 1009.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>That's really an example. Your mileage may vary.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";
color:#1C00FF'>David Ponzone </span><span class=apple-style-span><span
style='font-size:9.0pt;font-family:"'Helvetica Neue'","serif";color:black'>Direction
Technique</span></span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";
color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:10.0pt;
font-family:"'Helvetica Neue'","serif";color:black'>email: <a
href="mailto:david.ponzone@ipeva.fr">david.ponzone@ipeva.fr</a></span></span><span
style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:10.0pt;
font-family:"'Helvetica Neue'","serif";color:black'>tel: 01
74 03 18 97</span></span><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";
color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:10.0pt;
font-family:"'Helvetica Neue'","serif";color:black'>gsm: 06 66 98 76 34</span></span><span
style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";
color:black'><o:p> </o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";
color:#1C00FF'>Service Client<span class=apple-converted-space> </span></span><span
style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:red'>IP</span><span
style='font-size:10.5pt;font-family:"'Helvetica Neue'","serif";color:#1C00FF'>eva</span><span
style='font-size:10.5pt;font-family:"Helvetica","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal><span class=apple-style-span><span style='font-size:10.0pt;
font-family:"'Helvetica Neue'","serif";color:black'>tel:
0811 46 26 26</span></span><span style='font-size:10.5pt;font-family:
"Helvetica","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal><u><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0022F3'><a href="BLOCKED::http://www.ipeva.fr/">www.ipeva.fr</a></span></u><span
style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#656895'>
- </span><u><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0022F3'><a href="BLOCKED::http://www.ipeva-studio.com/">www.ipeva-studio.com</a></span></u><span
style='font-size:7.5pt;font-family:"Arial","sans-serif";color:#0022F3'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:#0022F3'><o:p> </o:p></span></p>
</div>
<div>
<p class=MsoNormal style='text-align:justify'><i><span style='font-size:7.5pt;
font-family:"Arial","sans-serif";color:silver'>Ce message et toutes les pièces
jointes sont confidentiels et établis à l'intention exclusive de ses
destinataires. Toute utilisation ou diffusion non autorisée est interdite. Tout
message électronique est susceptible d'altération. <b>IPeva</b> décline
toute responsabilité au titre de ce message s'il a été altéré, déformé ou
falsifié. Si vous n'êtes pas destinataire de ce message, merci de le détruire
immédiatement et d'avertir l'expéditeur.</span></i><span style='font-size:7.5pt;
font-family:"Arial","sans-serif";color:silver'><o:p></o:p></span></p>
<p class=MsoNormal style='text-align:justify'><u><span style='font-size:7.5pt;
font-family:"Arial","sans-serif";color:#0022F3'><o:p><span style='text-decoration:
none'> </span></o:p></span></u></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal><span style='font-size:10.5pt;font-family:"Helvetica","sans-serif";
color:black'><o:p> </o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<div>
<p class=MsoNormal>Le 20/04/2010 à 19:02, Ken Fulmer a écrit :<o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>For outbound calls to the PSTN, we might need to strip a leading
“9”. For inbound calls, we might need to convert 10 digit DID’s to internal 4
digit directory numbers.</span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Those are two of the most common examples we encounter.</span><span
style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks,</span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Ken</span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;
border-width:initial;border-color:initial'>
<div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";
color:black'>From:</span></b><span class=apple-converted-space><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'> </span></span><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:black'><a
href="mailto:freeswitch-users-bounces@lists.freeswitch.org">freeswitch-users-bounces@lists.freeswitch.org</a><span
class=apple-converted-space> </span>[<a
href="mailto:freeswitch-users-bounces@lists.freeswitch.org">mailto:freeswitch-users-bounces@lists.freeswitch.org</a>]<span
class=apple-converted-space> </span><b>On Behalf Of<span
class=apple-converted-space> </span></b>Brian West<br>
<b>Sent:</b><span class=apple-converted-space> </span>Tuesday, April 20,
2010 11:50 AM<br>
<b>To:</b><span class=apple-converted-space> </span><a
href="mailto:freeswitch-users@lists.freeswitch.org">freeswitch-users@lists.freeswitch.org</a><br>
<b>Subject:</b><span class=apple-converted-space> </span>Re:
[Freeswitch-users] ANI / DNIS Number Translation</span><span style='color:black'><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='color:black'>Can you provide some examples?
All of what you want is doable but use cases would be most helpful.<o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='color:black'>/b<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class=MsoNormal><span style='color:black'>On Apr 20, 2010, at 11:38 AM, Ken
Fulmer wrote:<o:p></o:p></span></p>
</div>
</div>
<div>
<p class=MsoNormal><span style='color:black'><br>
<br>
<br>
<o:p></o:p></span></p>
</div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:black'>Is it possible to translate the ANI or the DNIS using Freeswitch?</span><span
style='color:black'><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:black'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:black'>Thanks,</span><span style='color:black'><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:black'> </span><span style='color:black'><o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:black'>Ken Fulmer</span><span style='color:black'><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p>
</div>
</div>
</div>
<p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif";
color:black'>_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a
href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org">http://www.freeswitch.org</a><o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>