[Asterisk-Users] Fun with CAPI

Gavin Hamill gdh at laterooms.com
Thu Mar 24 07:19:20 MST 2005


Hullo :) Can someone help me untangle a bit of a mess?

I'm trying to set up a demo * server to show off how useful it can be to our 
business (as an IVR system and VoIP backup if our ISDN30s fail). I've not 
been able to get NT mode working with our InterTel Axxess PBX, so I've 
resorted to using normal TE mode and working on the basis the people dial one 
of the ISDN BRI extension numbers.. get a dialtone and then dial onward from 
there...

So, they dial 1201, * picks up and gives a dialtone. Great. Now I want the 
dialtone to go away after their first keypress and then process the "first 
number + rest of the number" as if it'd come in from an IAX / SIP client 
(which works well....)

OUTBOUND=IAX2/ourproviderdetails_which work fine :)

[default]
exten => _120.,1,NoOp( incoming call from ISDN )
exten => _120.,2,Answer
exten => _120.,3,PlayTones(dial)                ; Give the caller a familiar 
noise.

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,5    ; Increase the 'finished 
dialing' timeout to 5 seconds
exten => s-gathermoredigits,3,WaitExten(8)      ; and give the caller 8 
seconds overall to do their thing

exten => _X.,1,NoOp(${TIMESTAMP} ok, now we're going to dial PART1${Predigits} 
PART2${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 => _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

Unfortunately this isn't doing as I'd hoped..

     -- creating pipe for PLCI=0x103 msn = *
       > sent ALERT_REQ PLCI = 0x103
    -- Executing NoOp("CAPI[contr3/1201]/0", " incoming call from ISDN ") in 
new stack
    -- Executing Answer("CAPI[contr3/1201]/0", "") in new stack
    -- CAPI Answering for MSN 1201
    -- Executing Playtones("CAPI[contr3/1201]/0", "dial") in new stack
   -- started pbx on channel (callgroup=0)!
    -- Setting up echo canceller (PLCI=0x103, function=1, options=2, tail=64)
       > sent FACILITY_REQ (PLCI=0x103)
    -- Echo canceller successfully set up (PLCI=0x103)

* answers, gives a dialtone, but none of the digits I press on the handset 
cause any action.. and the dialtone never stops :)

Any ideas would be most welcome!

Cheers,
Gavin.




More information about the asterisk-users mailing list