[asterisk-users] Overlap dialing via SIP
Gordon Henderson
gordon+asterisk at drogon.net
Tue Jul 22 05:41:45 CDT 2008
On Mon, 21 Jul 2008, Ben Thompson wrote:
> Hi
>
> I have set up an asterisk system which allows the use of Overlap Dialing from
> SIP handsets. In order to do this I had to list the various patterns of numbers
> which can be dialed in the UK. We also dial with a prefix of '9' for and outside
> line so much of my dialplan looks like this :-
>
> [084x]
> exten => _9084XXXXXXXX,1,Macro(dialout-pstn)
>
> [outbound-national]
> exten => _90[1-2]XXXXXXXXX,1,Macro(dialout-pstn)
You'd better learn more about the UK before going further...
Don't forget that we now have 03 numbers too.
And UK geographic numbers can be 10 or 11 digits long. Mine is 11 digits,
but the town down the road from me is 10 digits. (So locally, I can dial a
5 or 6 digit number!)
> [087x]
> exten => _9087XXXXXXXX,1,Macro(dialout-pstn)
>
> [0906]
> exten => _90906XXXXXXX,1,Macro(dialout-pstn)
york.ac.uk and you're allowing 0906 numbers? Where do I sign up ;-)
> I was able to download the mappings for 0800 numbers and other special ranges
> from the ofcom website and I have incorporated these. For international dialing
> I have not been able to find an easy way of doing this so I created the folling
> contexts whcih make use of the WaitExten feature :-
>
> [outbound-international]
> exten => _900XXXXXXXXXX,1,Set(oldexten=${EXTEN})
> exten => _900XXXXXXXXXX,2,Goto(international-number-length-check,s,1)
>
> [international-number-length-check]
> exten => s,1,Answer
> exten => s,2,WaitExten(8)
>
> exten => _X,1,Set(enddigits=${EXTEN})
> exten => _X,2,NoOp(${TIMESTAMP} ok 13 digits - we dial ${oldexten}${enddigits})
> exten => _X,3,Dial(${OUTBOUNDTRUNK}/${oldexten}${enddigits})
> exten => _X,4,Congestion()
> exten => _X,104,Busy()
>
> exten => _XX,1,Set(enddigits=${EXTEN})
> exten => _XX,2,NoOp(${TIMESTAMP} ok 14 digits - we dial ${oldexten}${enddigits})
> exten => _XX,3,Dial(${OUTBOUNDTRUNK}/${oldexten}${enddigits})
> exten => _XX,4,Congestion()
> exten => _XX,104,Busy()
>
> exten => _XXX,1,Set(enddigits=${EXTEN})
> exten => _XXX,2,NoOp(${TIMESTAMP} ok 15 digits - we dial ${oldexten}${enddigits})
> exten => _XXX,3,Dial(${OUTBOUNDTRUNK}/${oldexten}${enddigits})
> exten => _XXX,4,Congestion()
> exten => _XXX,104,Busy()
>
> exten => t,1,Dial(${OUTBOUNDTRUNK}/${oldexten})
> exten => t,2,Congestion()
> exten => t,102,Busy()
>
>
> This works fairly well but I have noticed that occasionally the WaitExten feature does
> not seem to catch the first digits if they are dialed too quickly. It is almost as if
> there is a some sort of delay and the thirteenth digit is sometimes missed.
> Can anyone suggest why WaitExten might be ocasionally missing a digit or can anyone think
> of a better way of doing this?
I'm sure there are some codes in Germany that are only about 7 digits
long... (My brothers is 9 digits though + 49 for the country takes it to
11 + 00 is 13) Where do you draw the line? I think it's always going to be
hard to guess every country (and our own!) dialling lengths...
Personally I think you're making life hard for yourself, although
potentially nice for the users, I guess.
Or maybe you want to look at the ! match pattern, or just give-up on
overlap dialling. I like to be able to 'edit' numbers on my phone before
hitting the 'send' button. Too used to doing in on mobiles and DECT
handsets or years now I guess, and this is what I teach my customers -
pretend the handset is a mobile, dial the number, push 'send' (or the
"green button", or the 'tick' key, or whatever the phone uses to transmit
the number)
So I have:
exten => _0.,1,Noop(Outside line request: Dialled 0... for ${EXTEN})
exten => _0.,n,Macro(dialOut,${EXTEN})
exten => _0.,n,Hangup()
; Dial 9 for an outside line:
exten => _9.,1,Noop(Outside line request: Dialled 9... for ${EXTEN:1})
exten => _9.,n,Macro(dialOut,${EXTEN:1})
exten => _9.,n,Hangup()
I make sure the SIP phones have early/overlap dial turned off, and it
"just works" for me...
(That Macro does other "stuff" for me, it might as well be a
Dial(${OUTBOUNDTRUNK}/${ARG1}) as far as this is concerned)
Gordon
More information about the asterisk-users
mailing list