<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">You mean the SIP TO you receive does not contain a @domain part ?<div><br></div><div>Hmmm, I am sure some guys around will have some comments to do about that :)</div><div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#1C00FF">David Ponzone </font><font class="Apple-style-span" color="#000000" size="3"><span class="Apple-style-span" style="font-size: 12px; ">Direction Technique</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">email: <a href="mailto:david.ponzone@ipeva.fr">david.ponzone@ipeva.fr</a></span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: 01 74 03 18 97</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">gsm: 06 66 98 76 34</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'"><br></font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">Service Client<span class="Apple-converted-space"> </span></font><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" color="#FF0000">IP</font></font><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'">eva</font></div><div><font class="Apple-style-span" color="#1C00FF" face="'Helvetica Neue'"><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; "><div><font class="Apple-style-span" face="'Helvetica Neue'"><font class="Apple-style-span" size="3"><span class="Apple-style-span" style="font-size: 13px; ">tel: 0811 46 26 26</span></font></font></div><div><font class="Apple-style-span" face="'Helvetica Neue'" size="3"><span class="Apple-style-span" style="font-size: 13px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span style="text-decoration: underline; "><a href="BLOCKED::http://www.ipeva.fr/">www.ipeva.fr</a></span><span style="color: rgb(101, 104, 149); "> - <span style="color: rgb(0, 34, 243); text-decoration: underline; "><a href="BLOCKED::http://www.ipeva-studio.com/">www.ipeva-studio.com</a></span></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span" style="text-decoration: underline; "><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Arial; color: rgb(0, 34, 243); "><span class="Apple-style-span"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; text-align: justify; font: normal normal normal 10px/normal Arial; color: rgb(192, 192, 192); "><i>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. </i><b><i>IPeva</i></b><i> 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.</i></div><div style="text-decoration: underline; text-align: justify; "><font class="Apple-style-span" color="#C0C0C0"><i><br></i></font></div></span></div></span></font></div></span></font></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br><div><div>Le 25/05/2010 à 21:48, RR a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite">Hello I want to follow up on this example from YEARS ago. I had tried using the variable "destination_number" but that didn't work, and I figured that it was because the To: header doesn't have the destination_number but has just the URI, so I thought I'd use sip_to_user instead.<div> <br></div><div>We have calls coming in with the following info in the INVITE</div><div><br></div><div>From: "16469NNNNNN" <<a href="sip:16469NNNNNN;phone-context=+1@67.1x.xxx.xxx:5060;user=phone">sip:16469NNNNNN;phone-context=+1@67.1x.xxx.xxx:5060;user=phone</a>>;tag=SDru6fc01-gK0c10a887.</div> <div>To: <<a href="sip:011390NNNNNNNNNN;phone-context=+39@xxx.xxx.xxx.xxx:5060;user=phone">sip:011390NNNNNNNNNN;phone-context=+39@xxx.xxx.xxx.xxx:5060;user=phone</a>>.</div><div>(N and x are obviously being masked for privacy)</div><div><br></div><div>I use this info in the dialplan like so</div><div> <br></div><div><div><include></div><div> <extension name="DIDtest"></div><div> <condition field="ani" expression="^(\+?|\+1?|1?)(6469NNNNNN).*$" break="never"></div> <div> <action application="set" data="effective_caller_id_number=$2"/></div><div> <action application="set" data="effective_caller_id_name=$2"/></div><div> </condition></div><div> <condition field="${sip_to_user}" expression="^(\+?|\+1?|1?|011?)(390NNNNNNNNNN).$" break="never"></div><div> <action application="set" data="continue_on_fail=false"/></div> <div> <action application="set" data="hangup_after_bridge=true"/></div><div> <action application="set" data="domain_name=$${domain}"/></div><div> <action application="set" data="bypass_media=true"/></div> <div> <action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$2"/></div><div> </condition></div><div> </extension></div><div></include></div> <div><br></div></div><div>However, the calls aren't passing the condition in this dialplan and thus not being forwarded to "blade2" server. In fact, even the 011 is not being stripped off. </div><div><br></div> <div>What am I doing wrong?</div><div><br></div><div>Thanks</div><div>\RR </div><div><br><br><div class="gmail_quote">On Thu, Nov 13, 2008 at 10:52 AM, Peter P GMX <span dir="ltr"><<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a>></span> wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thanks,<br> <br> this works<br> <div class="im"><br> Best regards<br> Peter<br> <br> Anthony Minessale schrieb:<br> </div><div class="im">> here's another hint.<br> ><br> > use field="${sip_to_user}"<br> ><br> ><br> > On Thu, Nov 13, 2008 at 3:43 AM, Peter P GMX <<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a><br> </div><div><div></div><div class="h5">> <mailto:<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a>>> wrote:<br> ><br> > I checked your hint. The variable sip_to_user has the right value<br> > - but<br> > it is evaluated as empty at the time it is parsed.<br> ><br> > Info gives me:<br> > .<br> > .<br> > variable_sip_to_user: [xxxxxxxxx8910]<br> > variable_sip_to_uri: [<a href="mailto:xxxxxxxxx8910@my.ip.addre.ss">xxxxxxxxx8910@my.ip.addre.ss</a>]<br> ><br> ><br> > Example1,:<br> > I check with condition field="destination_number"<br> > Match Result<br> > 2008-11-13 10:24:55 [DEBUG] mod_dialplan_xml.c:117 parse_exten()<br> > Regex:<br> > [Inbound QSC trunk] destination_number(xxxxxxxxx89) =~<br> > /^(xxxxxxxxx89)$/<br> > This works but gives only the DID of the trunk (10 is missing at<br> > the end).<br> ><br> > Example2:<br> > I check with condition field="sip_to_user"<br> > Match Result<br> > 2008-11-13 10:30:42 [DEBUG] mod_dialplan_xml.c:117 parse_exten()<br> > Regex:<br> > [Inbound QSC trunk] sip_to_user() =~ /^(xxxxxxxxx89[0-9.])$/<br> > 2008-11-13 10:30:42 [DEBUG] mod_dialplan_xml.c:119 parse_exten() Regex<br> > mismatch<br> > sip_to_user() is empty<br> > Example3:<br> > I check with condition field="variable_sip_to_user"<br> > Match Result<br> > 2008-11-13 10:39:53 [DEBUG] mod_dialplan_xml.c:117 parse_exten()<br> > Regex:<br> > [Inbound QSC trunk] variable_sip_to_user() =~ /^(xxxxxxxxx89[0-9.])$/<br> > 2008-11-13 10:39:53 [DEBUG] mod_dialplan_xml.c:119 parse_exten() Regex<br> > mismatch<br> > variable_sip_to_user() is empty<br> ><br> > So at the time of evaluation "sip_to_user" resp.<br> > "variable_sip_to_user"<br> > is empty.<br> ><br> > What can I do?<br> ><br> > Best regards<br> > Peter<br> ><br> ><br> > Anthony Minessale schrieb:<br> > > route the call to the "info" app and look for the one that has it.<br> > ><br> > ><br> > > On Wed, Nov 12, 2008 at 1:36 PM, Peter P GMX<br> > <<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a> <mailto:<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a>><br> </div></div>> > <mailto:<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a> <mailto:<a href="mailto:Prometheus001@gmx.net">Prometheus001@gmx.net</a>>>><br> <div><div></div><div class="h5">> wrote:<br> > ><br> > > Dear all,<br> > ><br> > > when I get an incoming call from my SIP provider I do receive an<br> > > invite<br> > > on the trunk number, e.g. in Germany 0xxxxx9. However I have an<br> > > extension block of 0xxxxx90 to 0xxxxx999.<br> > > In the dialplan I checked the condition<br> > field="destination_number" but<br> > > this compares to the number of the trunk 0xxxxx9, so I do<br> > not get the<br> > > direct inward dialling extensions.<br> > ><br> > > The SIP to-header contains the direct inward dialling number<br> > > 0xxxxx90 to<br> > > 0xxxxx999 but I have no success in accessing it in the dialplan.<br> > ><br> > > I tried sip_to_user, sip_to_uri, sip_req_user, sip_req_uri,<br> > but no<br> > > success. They are all empty.<br> > ><br> > > Any idea which variable to parse?<br> > ><br> > > Best regards<br> > > Peter<br> > ><br> > ><br> > ><br> > ><br> > ><br> > ><br> > > _______________________________________________<br> > > Freeswitch-users mailing list<br> > > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br> > <mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a>><br> > > <mailto:<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br> > <mailto:<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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> > ><br> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> > > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> > ><br> > ><br> > ><br> > ><br> > > --<br> > > Anthony Minessale II<br> > ><br> > > FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br> > > ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br> > ><br> > > AIM: anthm<br> > > <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br> > <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>><br> > > <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a><br> </div></div>> <mailto:<a href="mailto:MSN%25253Aanthony_minessale@hotmail.com">MSN%253Aanthony_minessale@hotmail.com</a>>><br> <div class="im">> > GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br> > <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>><br> > > <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a><br> </div>> <mailto:<a href="mailto:PAYPAL%25253Aanthony.minessale@gmail.com">PAYPAL%253Aanthony.minessale@gmail.com</a>>><br> <div class="im">> > IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> <<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>><br> > <<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>> #freeswitch<br> > ><br> > > FreeSWITCH Developer Conference<br> > > <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br> > <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>><br> > > <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a><br> </div>> <mailto:<a href="mailto:sip%25253A888@conference.freeswitch.org">sip%253A888@conference.freeswitch.org</a>>><br> <div class="im">> > <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br> > <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br> > > <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br> > > <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br> > <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br> > > <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a><br> </div>> <mailto:<a href="mailto:googletalk%25253Aconf%25252B888@conference.freeswitch.org">googletalk%253Aconf%252B888@conference.freeswitch.org</a>>><br> <div class="im">> > pstn:213-799-1400<br> > ><br> > ------------------------------------------------------------------------<br> > ><br> > > _______________________________________________<br> > > Freeswitch-users mailing list<br> > > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br> </div><div><div></div><div class="h5">> <mailto:<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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> > ><br> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> > > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> > ><br> ><br> > _______________________________________________<br> > Freeswitch-users mailing list<br> > <a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br> > <mailto:<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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> ><br> ><br> ><br> ><br> > --<br> > Anthony Minessale II<br> ><br> > FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br> > ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br> ><br> > AIM: anthm<br> > <a href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br> > <mailto:<a href="mailto:MSN%253Aanthony_minessale@hotmail.com">MSN%3Aanthony_minessale@hotmail.com</a>><br> > GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br> > <mailto:<a href="mailto:PAYPAL%253Aanthony.minessale@gmail.com">PAYPAL%3Aanthony.minessale@gmail.com</a>><br> > IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a> <<a href="http://irc.freenode.net" target="_blank">http://irc.freenode.net</a>> #freeswitch<br> ><br> > FreeSWITCH Developer Conference<br> > <a href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br> > <mailto:<a href="mailto:sip%253A888@conference.freeswitch.org">sip%3A888@conference.freeswitch.org</a>><br> > <a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br> > <<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">http://iax:guest@conference.freeswitch.org/888</a>><br> > <a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br> > <mailto:<a href="mailto:googletalk%253Aconf%252B888@conference.freeswitch.org">googletalk%3Aconf%2B888@conference.freeswitch.org</a>><br> > pstn:213-799-1400<br> > ------------------------------------------------------------------------<br> ><br> > _______________________________________________<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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> > UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> > <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> ><br> <br> _______________________________________________<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" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br> UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br> <a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br> </div></div></blockquote></div><br></div> _______________________________________________<br>FreeSWITCH-users mailing list<br><a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></div></body></html>