[asterisk-dev] MeetMe in Macro
Miguel Molina
mmolina at millenium.com.co
Tue Sep 15 17:17:38 CDT 2009
Anahi Ludueña escribió:
> Hi people, I have the following context in my dialplan:
>
> [macro-meetme-part]
> exten => s,1,Set(PART_OPT=${ARG1})
> exten => s,n,Set(CONFNRO=${ARG2})
> exten => s,n,GotoIf($[${ISNULL(${ARG3})}]?start:rec)
> exten => s,n(rec),Set(MEETME_RECORDINGFILE=${ARG3}-${CONFNRO})
> exten => s,n(start),MeetMe(${CONFNRO},${PART_OPT})
> exten => s,n,Noop(Next Line)
>
> The problem I have is that after the user hangs up the phone, the dial
> plan doesn't go to the next line, but it shows the message:
> /" Spawn extension (macro-meetme-part, s, 5) exited non-zero on
> 'SIP/2001-083238e8' in macro 'meetme-part'"/
>
> Why does it happen? Is it right? Or I'm wrong?
>
> Thanks a lot...
No, when a hangup occurs, going to the next line is not the default
behavior on the dialplan. If there's a hangup that's where the channel
ends just like the message reads and the CDR is proof of that. The only
exception is when you define the special 'h' extension, which is
executed after the channel is hungup, but I'm not sure if the 'h'
extension works within a Macro. On that case I would play it safe and
define it in a normal context. It is known that some special extensions,
like the 'i' one, doesn't work within a Macro. That's one of the many
reasons why the use of Gosub() as a replacement for Macro() is encouraged.
Cheers,
--
Ing. Miguel Molina
Grupo de Tecnología
Millenium Phone Center
PBX: (+57 1)6500800 ext. 1201
Fax: (+57 1)6500816
Móvil: (+57)3138873587
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090915/dec39a05/attachment-0001.htm
More information about the asterisk-dev
mailing list