[asterisk-users] Handling 3 different call ending causes
Tobias Ahlander
plyschen at gmail.com
Wed Mar 19 03:27:35 CDT 2008
Alex Balashov wrote:
>> Hello List,
>>
>> I'm using a dialstring like the one below. I want to have three
>> different things happening depending on exit cause.
>>
>> Dial(SIP/${phonenumber},20,gL(20000[:5000][:5000]))
>>
>> These 3 things could happen:
>> 1, Caller hangs up
>> 2, Callee hangs up
>> 3, The 20 seconds is up and call is terminated from Asterisk.
>>
>> Is there a way to separate these 3?
>
>You can handle the 'h' extension in the dial plan, which will supply
>the
${CHANNEL} that was hung up, and possibly some additional dial plan
variables as well:
>
>http://www.voip-info.org/wiki/index.php?page=Asterisk+h+extension
>
>Using these, you can piece together who hung up on whom, etc.
>
>#2 is handled by fallthrough in the dial plan that causes the
>instructions to continue executing to the next priority for that extension,
whereas if the call completes (Dial() is successfully connected), this does
not happen.
I still haven't gotten this to work... I'm thinking that perhaps this could
be solve with a macro? I haven't worked much with macros tho, anyone of you
think it might be possible?
Thanks,
Best regards,
Tobias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080319/fa23dea1/attachment.htm
More information about the asterisk-users
mailing list