Alex Balashov wrote:<br>>> Hello List,<br>>><br>>> I'm using a dialstring like the one below. I want to have three <br>>> different things happening depending on exit cause.<br>>><br>>> Dial(SIP/${phonenumber},20,gL(20000[:5000][:5000]))<br>
>><br>>> These 3 things could happen:<br>>> 1, Caller hangs up<br>>> 2, Callee hangs up<br>>> 3, The 20 seconds is up and call is terminated from Asterisk.<br>>><br>>> Is there a way to separate these 3?<br>
><br>>You can handle the 'h' extension in the dial plan, which will supply <br>>the<br>${CHANNEL} that was hung up, and possibly some additional dial plan variables as well:<br>><br>><a href="http://www.voip-info.org/wiki/index.php?page=Asterisk+h+extension">http://www.voip-info.org/wiki/index.php?page=Asterisk+h+extension</a><br>
><br>>Using these, you can piece together who hung up on whom, etc.<br>><br>>#2 is handled by fallthrough in the dial plan that causes the <br>>instructions to continue executing to the next priority for that extension, whereas if the call completes (Dial() is successfully connected), this does not happen.<br>
<br>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?<br><br>Thanks, <br>Best regards, <br>
Tobias<br><br>