Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] how to match '#' in XML dialplan ?


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
wangdq.no1 at gmail.com
Guest





PostPosted: Sat Oct 10, 2009 5:01 am    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work
Back to top
testeador01 at gmail.com
Guest





PostPosted: Sat Oct 10, 2009 8:36 am    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

escape character is '\'try 
  <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/>
2009/10/10 daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)>
Quote:
hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
msc at freeswitch.org
Guest





PostPosted: Sat Oct 10, 2009 12:39 pm    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

Some characters need a backslash to match in a regular expression. However, # is not one of them. I think your regex is wrong:
<condition field="destination_number" expression="^1#(d+)#(d+)$"/>

It should probably be:
<condition field="destination_number" expression="^1#(\d+)#(\d+)$"/>

Note the backslashes in front of the d+ entries. \d means "match a digit" whereas a bare d means "make a lowercase d character".

Hope that helps.
-MC

P.S. - The * character does need to be escaped in regexes. See the default.xml dialplan file for some obvious examples.

On Sat, Oct 10, 2009 at 6:24 AM, Milena <testeador01@gmail.com (testeador01@gmail.com)> wrote:
Quote:
escape character is '\'try 
  <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/>

2009/10/10 daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)>
Quote:

hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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

Back to top
wangdq.no1 at gmail.com
Guest





PostPosted: Sat Oct 10, 2009 9:57 pm    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

it's work . Thank you very much .

2009/10/11 Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Quote:
Some characters need a backslash to match in a regular expression. However, # is not one of them. I think your regex is wrong:
<condition field="destination_number" expression="^1#(d+)#(d+)$"/>


It should probably be:
<condition field="destination_number" expression="^1#(\d+)#(\d+)$"/>


Note the backslashes in front of the d+ entries. \d means "match a digit" whereas a bare d means "make a lowercase d character".

Hope that helps.
-MC

P.S. - The * character does need to be escaped in regexes. See the default.xml dialplan file for some obvious examples.


On Sat, Oct 10, 2009 at 6:24 AM, Milena <testeador01@gmail.com (testeador01@gmail.com)> wrote:
Quote:
escape character is '\'try 
  <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/>

2009/10/10 daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)>
Quote:

hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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 (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

Back to top
red.rain.seven at gmai...
Guest





PostPosted: Sun Oct 11, 2009 5:25 am    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

Daqiang:


How do you make your IP phone not dial right after you press "#"? Usually the IP phone will dial the number already once you pushed "#"




On Sun, Oct 11, 2009 at 10:45 AM, daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)> wrote:
Quote:
it's work . Thank you very much .

2009/10/11 Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Quote:
Some characters need a backslash to match in a regular expression. However, # is not one of them. I think your regex is wrong:
<condition field="destination_number" expression="^1#(d+)#(d+)$"/>


It should probably be:
<condition field="destination_number" expression="^1#(\d+)#(\d+)$"/>


Note the backslashes in front of the d+ entries. \d means "match a digit" whereas a bare d means "make a lowercase d character".

Hope that helps.
-MC

P.S. - The * character does need to be escaped in regexes. See the default.xml dialplan file for some obvious examples.


On Sat, Oct 10, 2009 at 6:24 AM, Milena <testeador01@gmail.com (testeador01@gmail.com)> wrote:
Quote:
escape character is '\'try 
  <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/>

2009/10/10 daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)>
Quote:

hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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 (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 (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




--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant
Back to top
tculjaga at gmail.com
Guest





PostPosted: Sun Oct 11, 2009 12:04 pm    Post subject: [Freeswitch-users] how to match '#' in XML dialplan ? Reply with quote

this is up to your phone.... # means address complete and you phone sends the number you dialed into an INVITE message.

if you want to support FAC with # you should modify the phone's dialplan and make it expect more digits... for certain prefixes.

T.


On Sun, Oct 11, 2009 at 12:10 PM, Henry Huang <red.rain.seven@gmail.com (red.rain.seven@gmail.com)> wrote:
Quote:
Daqiang:


How do you make your IP phone not dial right after you press "#"? Usually the IP phone will dial the number already once you pushed "#"





On Sun, Oct 11, 2009 at 10:45 AM, daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)> wrote:
Quote:
it's work . Thank you very much .

2009/10/11 Michael Collins <msc@freeswitch.org (msc@freeswitch.org)>
Quote:
Some characters need a backslash to match in a regular expression. However, # is not one of them. I think your regex is wrong:
<condition field="destination_number" expression="^1#(d+)#(d+)$"/>


It should probably be:
<condition field="destination_number" expression="^1#(\d+)#(\d+)$"/>


Note the backslashes in front of the d+ entries. \d means "match a digit" whereas a bare d means "make a lowercase d character".

Hope that helps.
-MC

P.S. - The * character does need to be escaped in regexes. See the default.xml dialplan file for some obvious examples.


On Sat, Oct 10, 2009 at 6:24 AM, Milena <testeador01@gmail.com (testeador01@gmail.com)> wrote:
Quote:
escape character is '\'try 
  <condition field="destination_number" expression="^1\#(d+)\#(d+)$"/>

2009/10/10 daqiang wang <wangdq.no1@gmail.com (wangdq.no1@gmail.com)>
Quote:

hello every one :
   I want to match the # in XML dialplan , how to do  ?
   example :
      1#5555#6666 . how to do ?
     I do this :
     <condition field="destination_number" expression="^1#(d+)#(d+)$"/>
    but it's not work



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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 (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 (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 (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






--
Henry Huang
UniC Solution - Communication Unified
VoIP & Open Source software Consultant

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (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

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services