[Asterisk-Users] here's my IAX callthrough app and some questions
about problems I have.
Jess Coburn
jess.coburn at gmail.com
Mon Jan 17 18:22:30 MST 2005
Hello all,
What my app does is accepts a call in on a Dial-In Number (DID) via
IAX, and then prompts the caller for the top secret password (123) and
then authenticates the user and prompts them to dial in the number
they'd like to call. Once they press pound after dialing in the number
it will read it back to them, if they press pound it will attempt to
connect via the second IAX provider, if they press star it will allow
them enter in the number over again.
Now here's the problems and questions:
1. DTMF detection seems flawed, sometimes it's dead on but alot of
times it will see a single keypress as multiple keypresses. So I may
press 561 but it will see 566661 and all three keypresses are about
the same length. Is this unique to my case or do you others see this
too. I suspect it's due to either background noise or maybe
packetloss? Any ideas on how to clean this up?
2. The only way I can get the app to fire off is if I put the
extension mapping in as _NXXNXXXXXX,1,CMD I'd like to use s,1,CMD but
I don't know what I'm missing here or doing wrong.
Below are a copies of my extensions.conf file and my iax.conf file.
Regards,
Jess
extensions.conf
file---------------------------------------------------------------------
[general]
static=yes
writeprotect=no
[globals]
${OUTGOING-NUM}=XXXX
[arbitrary-in] ; <-- Should match the context you have
; under [incoming] in iax.conf
exten => _NXXNXXXXXX,1,Answer
exten => _NXXNXXXXXX,2,Background(vm-password)
exten => _NXXNXXXXXX,3,Authenticate(123)
exten => _NXXNXXXXXX,4,Playback(beep)
exten => _NXXNXXXXXX,5,SetVar(NR=)
exten => _NXXNXXXXXX,6,Goto(testdtmf|s|1)
;
; This context is used by the sample [arbitrary-name]
; context above to read back each digit you press.
;
[testdtmf]
exten => s,1,SetVar(NR=)
exten => s,2,Background(pls-entr-num-uwish2-call)
exten => s,3,Background(and-prs-pound-whn-finished)
exten => s,4,Background(beep)
exten => s,5,WaitExten(10)
exten => _x,1,SetVar(NR=${NR}${EXTEN})
exten => _x,2,NoOp(${NR})
exten => _x,3,Goto(testdtmf|s|5)
exten => _#,1,Goto(verifynumber|s|1)
exten => i,1,Goto(testdtmf|s|1)
exten => t,1,Hangup
[verifynumber]
exten => s,1,Background(you-dialed)
exten => s,2,SayDigits(${NR})
exten => s,3,Background(if-correct-press)
exten => s,4,Background(pound)
exten => s,5,Background(otherwise-press)
exten => s,6,Background(star)
exten => _#,1,Background(pls-wait-connect-call)
exten => _#,2,Dial(IAX2/${OUTGOING-NUM}@outgoing/${NR},30)
exten => _#,3,Background(something-terribly-wrong);
exten => _#,4,Background(goodbye)
exten => _#,5,Hangup
exten => _*,1,Goto(testdtmf|s|1)
iax.conf file --------------------------------------------------------------------------------------
; iax.conf
[general]
${INCOMING-USR}=SECRET-USERNAME
${INCOMING-PWD}=SECRET-PWD
${LIVEVOIP-SVR}=217.160.244.186
bandwidth=high
disallow=lpc10
jitterbuffer=yes
dropcount=2
maxjitterbuffer=500
maxexcessbuffer=80
minexcessbuffer=10
jittershrinkrate=1
register => ${INCOMING-USR}:${INCOMING-PWD}@${INCOMING-SVR}
tos=lowdelay
[incoming]
; this is the incoming IAX provider
type=user
secret=ITS-SECRET
deny=0.0.0.0/0.0.0.0
permit=217.160.244.186/255.255.255.0
context=arbitrary-in
[outgoing]
;this is the outgoing IAX provider
type=peer
host= 216.118.117.46
secret= ITS-SECRET
auth=md5
notransfer=yes
context=default
More information about the asterisk-users
mailing list