[asterisk-users] understanding what h extension does

Alan Chandler alan at chandlerfamily.org.uk
Mon Apr 2 23:48:37 MST 2007


I am trying to make a dialplan that when I dial 90 I can go round a 
whole set of extensions and leave them a short message, hangup and go 
on the next one.

I use the M facility of dial, with something like this 

[messages]

exten => 90,n(calcnextchan),Set(DIALCHAN=...)
exten => 90,n,Dial(${DIALCHAN},30,M(domessage))
exten => 90,n,Goto(calcnextchan)

[macro-domessage]

exten => s,1,Playback(message)
exten => s,n,Set(MACRO_RESULT=CONTINUE)

[There is actually more logic to check for busy dial channels and retry 
them later]

This seems to work fine until one of the callees hangs up before the 
message is played. at which point my call is terminated.

I was wondering if I should user the h extension here to pickup the 
hungup call from the callee and continue.  However I am worried that I 
might end up looping if I hang up my end of the call - since I want it 
to stop if I do that.

I can't find a definitive explanation of what causes the h extension to 
be called.  Can someone explain what what happen if I added something 
like

exten => h,1,Goto(90,calcnextchan)

to the [messages] context

-- 
Alan Chandler
http://www.chandlerfamily.org.uk


More information about the asterisk-users mailing list