SOLVED Re: [Asterisk-Users] Fun with CAPI
Gavin Hamill
gdh at laterooms.com
Thu Mar 24 08:17:40 MST 2005
On Thursday 24 March 2005 14:19, Gavin Hamill wrote:
> Hullo :) Can someone help me untangle a bit of a mess?
I solved my own problem as per usual - it seems this only happens after I post
to a busy mailing list...
For reference, here's "what works for me" ... I expect there are much more
elegant ways of doing this, and I'm very eager to hear them! :)
[default]
exten => _120.,1,Goto(s,1)
exten => s,1,NoOp( incoming call from ISDN )
exten => s,2,Answer
exten => s,3,PlayTones(dial) ; Give the caller a familiar noise.
exten => s,4,DigitTimeout(0.1)
exten => s,5,WaitExten(0.1)
exten => _X,1,NoOp( Got a digit! It was ${EXTEN})
exten => _X,2,StopPlaytones()
exten => _X,3,SetVar(Predigits=${EXTEN}) ; Put that digit aside for
use later...
exten => _X,4,Goto(s-gathermoredigits,1)
exten => s-gathermoredigits,1,NoOp( Now looking for the rest of the number)
exten => s-gathermoredigits,2,DigitTimeout,3
exten => s-gathermoredigits,3,WaitExten(7)
exten => _X.,1,NoOp(${TIMESTAMP} ok, now we're going to dial
${Predigits}${EXTEN})
exten => _X.,2,Goto(nationalcalls,${Predigits}${EXTEN},1)
exten => t,1,Goto(#,1) ; If they take too long, give up
exten => i,1,Playback(invalid) ; "That's not valid, try again"
[nationalcalls]
exten => _10XX,1,Dial(CAPI/1201:b${EXTEN},15)
exten => _10XX,2,Congestion
exten => _1701,1,Dial(IAX2/dom)
exten => _1701,2,Congestion
exten => _00.,1,Dial(${OUTBOUND}/${EXTEN})
exten => _00.,2,Congestion
exten => _01.,1,Dial(${OUTBOUND}/${EXTEN})
exten => _01.,2,Congestion
exten => _02.,1,Dial(${OUTBOUND}/${EXTEN})
exten => _02.,2,Congestion
exten => _07.,1,Dial(${OUTBOUND}/${EXTEN})
exten => _07.,2,Congestion
Cheers,
Gavin.
More information about the asterisk-users
mailing list