[asterisk-users] IAX2: Incoming calls answered prematurely [RESOLVED]

Alan Lord alanslists at gmail.com
Fri Oct 19 17:09:16 CDT 2007


Eric "ManxPower" Wieling wrote:
> Voicemail will answer the line.  10 seconds is a pretty short timeout.
> 
> What you need to do is copy the CLI output of your failed calls from 
> BOTH servers and put them in this thread.  Then we can SEE what Asterisk 
> is ACTUALLY doing.
> 

Thanks for making me think :-)

My colleague was in this evening and we have sorted it out now.

I'm not quite sure how I was getting the results I did earlier as he 
thinks his Asterisk server had stopped running...

Anyway - we now have worked out a little solution which seems to work well.

At my end, the macro responsible for dialling sets the callerid(name) so 
we know the call comes from a user on the IVR selection, and it sets the 
callerid(number) to the current context so we can see which business the 
caller the wanted to get to.

At my partner's end, he uses a simple gotoif() function in his extension 
context to test for an "IVR" call (via the callerid(name)) and then will 
not go to local voicemail but simply hangup after 15 seconds.

If the call is from one of internal extensions, the callerid(name) is 
not set to "IVR" so he deals with that as a normal call and after the 
timeout, it goes to his local voicemail.

Thanks again for your help.

Here's some of the stuff just for reference if anyone else is 
interested. If anyone has any questions please ask.

[main_menu]
; Dialplan for all unknown number callers
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(digit)=5) ; Max time between digits
exten => s,n,Set(TIMEOUT(response)=15) ; Max time to wait
exten => s,n,Wait(1)
exten => s,n,Background(welcome-to-bell-lord)
exten => s,n(resume),Background(press-3-for-tolc) ; Short dialogues, 
easy to change
exten => s,n,Background(press-4-for-fondoo) ; rather than one long sentence
exten => s,n,Background(press-5-for-arrowtees) ; which might need to be 
changed
exten => s,n,Background(press-6-for-gen-enq) ; frequently.
exten => s,n,WaitExten()

exten => 3,1,Goto(tolc,s,1) ; Dial 3 For The Open Learning Centre
exten => 4,1,Goto(fondoo,s,1) ; Dial 4 for Fondoo Internet
exten => 5,1,Goto(arrowtees,s,1) ; Dial 5 for ArrowTees
exten => 6,1,Goto(gen_enq,s,1) ; For all other enquiries press 6

exten => i,1,Playback(pbx-invalid)
exten => i,n,Goto(resume)

exten => t,1,Playback(vm-goodbye)
exten => t,n,Hangup()

[tolc]
exten => s,1,Macro(belllord,${ALANL}&${ALANB},${CONTEXT}) ; Calls the 
belllord Macro with the channel(s) to dial and the current context 
(voicemail)

[fondoo]
exten => s,1,Macro(belllord,${ALANL}&${ALANB},${CONTEXT})

[arrowtees]
exten => s,1,Macro(belllord,${ALANL},${CONTEXT})

[gen_enq]
exten => s,1,Macro(belllord,${ALANL}&${ALANB},${CONTEXT})

; Call with Macro(belllord,channel,vmbox)
[macro-belllord] ; Uses macro and DIALSTATUS for local devices
exten => s,1,Set(CALLERID(all)=IVR <${ARG2}>)
exten => s,n,Dial(${ARG1},10,tr)
exten => s,n,Goto(s-${DIALSTATUS},1)
exten => s-NOANSWER,1,Voicemail(${ARG2}@business,u) ; business is the 
voicemail context, ${ARG2} is the context from which this call came
exten => s-BUSY,1,Voicemail(${ARG2}@business,b)
exten => _s-.,1,Goto(s-NOANSWER,1)




-- 
The way out is open!
http://www.theopensourcerer.com




More information about the asterisk-users mailing list