you probably have to remove the $ at the end to allow for the ;paramsOn Tue, May 25, 2010 at 4:43 PM, RR <ranjtech@gmail.com> wrote:
Hi Anthony,this is what I see in the debug:Dialplan: sofia/external/16469NNNNNN Regex (FAIL) [DIDtest] ${sip_to_user}(011390NNNNNNNNNN;phone-context=+39) =~ /^(\+?|\+1?|1?|011?)(390NNNNNNNNNN).$/ break=on-falseand then it moves on to another dialplan xml file.please note that info app shows:variable_sip_to_user: [011390NNNNNNNNNN;phone-context=+39]
shouldn't this actually match??Oh and yes, the copy of FS is pretty old but this is a production system which gets 24 / 7 traffic so the upgrade is being pushed and pushed :(you think this is simply because it's an old build?
ThanksRROn Tue, May 25, 2010 at 4:49 PM, Anthony Minessale <anthony.minessale@gmail.com> wrote:
did you turn up the debug (press f8 or type console loglevel debug)The debug logs will show the data being passed into the regex and the results.P.S.I hope only your example is from years ago and not your copy of FS.--On Tue, May 25, 2010 at 3:40 PM, David Ponzone <david.ponzone@gmail.com> wrote:
Which means there is no @ in the sip: part of the SIP To field. Only in the phone-context part.FS uses the @ to split the strings into pieces, and then in your case, it fails as one is missing.David Ponzone Direction Techniqueemail: david.ponzone@ipeva.frtel: 01 74 03 18 97gsm: 06 66 98 76 34Service Client IPevatel: 0811 46 26 26Ce 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. IPeva 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.
Le 25/05/2010 à 22:28, RR a écrit :Hi Guys,Thanks for the quick feedbackDavid, no we're getting the full URI with the domain part intact, just nothing before the "<" bracesMichael, I already tried the info app and we getvariable_sip_to_user: [011390NNNNNNNNNN;phone-context=+39]variable_sip_to_uri: [011390NNNNNNNNNN;phone-context=+39@208.xx.xxx.xxx:5060]ThanksRR_______________________________________________On Tue, May 25, 2010 at 4:12 PM, Michael Collins <msc@freeswitch.org> wrote:
On Tue, May 25, 2010 at 12:48 PM, RR <ranjtech@gmail.com> wrote:
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.We have calls coming in with the following info in the INVITEFrom: "16469NNNNNN" <sip:16469NNNNNN;phone-context=+1@67.1x.xxx.xxx:5060;user=phone>;tag=SDru6fc01-gK0c10a887.(N and x are obviously being masked for privacy)I use this info in the dialplan like so<include><extension name="DIDtest"><condition field="ani" expression="^(\+?|\+1?|1?)(6469NNNNNN).*$" break="never"><action application="set" data="effective_caller_id_number=$2"/><action application="set" data="effective_caller_id_name=$2"/></condition><condition field="${sip_to_user}" expression="^(\+?|\+1?|1?|011?)(390NNNNNNNNNN).$" break="never"><action application="set" data="continue_on_fail=false"/><action application="set" data="hangup_after_bridge=true"/><action application="set" data="domain_name=$${domain}"/><action application="set" data="bypass_media=true"/><action application="bridge" data="{sip_invite_domain=${sip_from_host}}sofia/gateway/blade2/$2"/></condition></extension></include>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.What am I doing wrong?
Create a quick test extension that only does an info dump. (See 9992 in default.xml for an example.) Make a call, look at the info dump, and make sure that what you think you are getting is really what you are getting. :)
-MC
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Twitter: http://twitter.com/FreeSWITCH_wireGTALK/JABBER/PAYPAL:anthony.minessale@gmail.comIRC: irc.freenode.net #freeswitch pstn:+19193869900
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
Twitter: http://twitter.com/FreeSWITCH_wire
AIM: anthm
MSN:anthony_minessale@hotmail.com
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org
googletalk:conf+888@conference.freeswitch.org
pstn:+19193869900
_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org