[asterisk-users] understanding what h extension does [ISSUE
SOLVED]
Alan Chandler
alan at chandlerfamily.org.uk
Tue Apr 3 12:03:11 MST 2007
On Tuesday 03 April 2007 07:48, Alan Chandler wrote:
> 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.
>
OK, its a logic problem. If the caller hangs up before playback is
complete MACRO_RESULT has not been set, so the call is bridged and then
hung up. If I set MACRO_RESULT as the first action of the call macro,
then any interruption from the far end hanging up means that the
dialplan just continues without the call having been bridged.
--
Alan Chandler
http://www.chandlerfamily.org.uk
More information about the asterisk-users
mailing list