I must be missing something obvious here.
I need a pattern that will match 1 or more digits, not characters.
I find it impossible to believe that there’s no way to do this.
Thanks!
I must be missing something obvious here.
I need a pattern that will match 1 or more digits, not characters.
I find it impossible to believe that there’s no way to do this.
Thanks!
???
explain more ?
_X. will match one or more digits
a few examples often help.
Ian
No it won’t. It will match one or more characters, including * and #. I need to match digits only.
then
if you dont know the digit string length then
_X
_XX
_XXX
etc etc
but if you want to limit the to digits then should also limt the length
Ian
Why?
I certainly don’t know the length of the longest telephone number anywhere in the world. Do you?
Hi
According to the ITU no more than 15 digits.
If this is for out dialing then why are you worried out about a * or #
For example in the UK a user would dial 00XX. for and international number and 0[1-2]X. would cat geographic numbers.
Its not realy good practice to expect one dialplan to cover all destinations.
you would want to split up international , Local , national , local and internal
Ian
Cool. I haven’t been able to find anything nearly that useful on their web site.
I want the person dialing the phone to be able to press # to indicate that they’re done dialing digits, rather than having to wait for the timeout.
[quote=“ianplain”]Its not realy good practice to expect one dialplan to cover all destinations.
you would want to split up international , Local , national , local and internal[/quote]
By one dialplan, I take it you mean context. I agree with you 100%, and that’s what I’ve done.
In fact, I’m setting up separate contexts for each country that we’re likely to call frequently. Those contexts will have specific match patterns that will allow Asterisk to know when the user is finished dialing and place the call immediately. (The ITU country codes are making getting to the proper context painful. I’m actually creating a digit-by-digit decision tree, with a separate context for each node.)
This question is for the “generic” international context, where Asterisk won’t know how many digits to expect. I’ve actually discovered the Read() application, which looks like it will allow me to do pretty much exactly what I want.
Hi
I assume from what you are saying is that you are using analog phones as the majority of IP sets also have an internal dialplan and dialing a # will need to be reconised by the phone if its an IP set .
Also expecting user to enter # at the end of dialing takes me right back to early 90’s ISDN panasonic systems
Ian
They are analog phones, but they’re connected to ATAs. The dial plans in the ATAs, however, are set to “hot dial” to Asterisk as soon as the phone goes off-hook.
Actually, I’m doing everything possible to avoid that requirement. Thus the digit-by-digit decision tree, so Asterisk will know how many digits to expect for those countries we call frequently. I just want to keep the “# to dial” option for everywhere else in the world, so that people calling those countries can avoid waiting through the timeout.
Hi
Users will accept it, they wont accept being expected to dial a #, This is how all PBX’s work its called the interdigit timeout.
Ian
The users in this case are myself, my wife, and my mother. I can assure that we won’t accept having to wait through the interdigit timeout (at least not for dialing patterns that we use frequently.).
sounds like your interdigit timeout is a bit too long… compared to the duration of an outdial ring, the 750ms on my phone doesn’t really bother me
How are you terminating the call?
In our case, the call is going out over our PSTN line. So after Asterisk recognizes that we’re done dialing, it still has to send the DTMF digits down the line before our telco can begin to place the call.
Regardless, I hope everyone can agree that it’s desirable for one’s system to recognize when the proper number of digits have been dialed whenever possible.
Hi
They do, But its down to the person programming the system, otherwise it uses the interdgit time.
Ian
PS Its not Just Asterisk that works this way, Its the norm, you will find Mitel Nortels etc all work the same.
As an aside, before BT (in the UK) went to System X, those in the know would often dial an extra digit on a number to get a faster connect, because the trunk exchange often knew maximum and minimum lengths for numbers with a particular prefix, but not the exact length, and used a four second timeout after a number that reached the minimum, but not maximum length.
I think you could get better (user experience) / results if you set your ATA to dial after # or 3 - 4 sec.
You also could make some speed dials - 2 - 3 digits …
Also - if you have tree - may be at the ends you could wait for digits - in that function, # is accepted as end of dial string.
You could make some AGI - and AGI will go through tree or accept #.