Hello, <br><br>Tried that too, but it reports cause 16 in all 3 cases, which means &quot;normal clearing&quot;. <br><br>Thanks, <br>Best regards, <br>Tobias<br><br>Date: Mon, 17 Mar 2008 15:54:47 +0100<br>From: &quot;Arjan Kroon | Mobillion&quot; &lt;<a href="mailto:Arjan.Kroon@mobillion.nl">Arjan.Kroon@mobillion.nl</a>&gt;<br>
Subject: Re: [asterisk-users] Handling 3 different call ending causes<br>To: &quot;Asterisk Users Mailing List - Non-Commercial Discussion&quot;<br>&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a>&gt;<br>
Message-ID:<br>&nbsp;&nbsp;&nbsp; &lt;<a href="mailto:5E4CB0091A9AC94C92E74371A9C5022A01856277@ED-COPERNICUS01.mobillion.local">5E4CB0091A9AC94C92E74371A9C5022A01856277@ED-COPERNICUS01.mobillion.local</a>&gt;<br>&nbsp;&nbsp;&nbsp; <br>Content-Type: text/plain; charset=&quot;us-ascii&quot;<br>
<br><a href="http://www.voip-info.org/tiki-index.php?page=Asterisk+variable+hangupcau">http://www.voip-info.org/tiki-index.php?page=Asterisk+variable+hangupcau</a><br>se<br><br>&nbsp;<br><br>&nbsp;<br><br>________________________________<br>
<br>From: <a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a><br>[mailto:<a href="mailto:asterisk-users-bounces@lists.digium.com">asterisk-users-bounces@lists.digium.com</a>] On Behalf Of Tobias Ahlander<br>
Sent: maandag 17 maart 2008 15:35<br>To: <a href="mailto:asterisk-users@lists.digium.com">asterisk-users@lists.digium.com</a><br>Subject: Re: [asterisk-users] Handling 3 different call ending causes<br><br>&nbsp;<br><br>Alex Balashov wrote:<br>
&gt;&gt; Hello List,<br>&gt;&gt;<br>&gt;&gt; I&#39;m using a dialstring like the one below. I want to have three <br>&gt;&gt; different things happening depending on exit cause.<br>&gt;&gt; <br>&gt;&gt; Dial(SIP/${phonenumber},20,gL(20000[:5000][:5000]))<br>
&gt;&gt; <br>&gt;&gt; These 3 things could happen:<br>&gt;&gt; 1, Caller hangs up<br>&gt;&gt; 2, Callee hangs up<br>&gt;&gt; 3, The 20 seconds is up and call is terminated from Asterisk.<br>&gt;&gt; <br>&gt;&gt; Is there a way to separate these 3?<br>
&gt;<br>&gt;You can handle the &#39;h&#39; extension in the dial plan, which will supply<br>the ${CHANNEL} that was hung up, and possibly some additional dial plan variables as well:<br>&gt;<br>&gt;<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>
&gt;<br>&gt;Using these, you can piece together who hung up on whom, etc.<br>&gt;<br>&gt;#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&#39;&#39;ve tried to use the h extension in combination with the ${CHANNEL} in the dialplan as suggested on the wiki page, but I haven&#39;t had any luck with it. <br><br>For this test I have a Sipura phone with number 1003 and a X-lite with 1203. If I let the time go by (the 20 seconds defined in the Dial<br>
Command) I get the following: <br>-- Executing [h@hangupcause:1] NoOp(&quot;SIP/1003-08a491b8&quot;, &quot;Channel hungup is SIP/1003-08a491b8&quot;) in new stack<br><br>If I let the Sipura hang up I get:<br>-- Executing [h@hangupcause:1] NoOp(&quot;SIP/1003-08a491b8&quot;, &quot;Channel hungup is SIP/1003-08a491b8&quot;) in new stack<br>
<br>Lastly if I let the X-lite hang up I get:<br>-- Executing [h@hangupcause:1] NoOp(&quot;SIP/1003-08a491b8&quot;, &quot;Channel hungup is SIP/1003-08a491b8&quot;) in new stack<br><br>Yes they are all the same :(<br><br>
Perhaps there&#39;s something wrong with my code? Its just a small context with the following for this test:<br>[hangupcause]<br>exten =&gt; s,1,Dial(SIP/1203,30,gL(10000[:5000][:5000]))<br>exten =&gt; h,1,NoOp(Channel hungup is ${CHANNEL})<br>
<br>Have I missed something basic here or what? <br><br>Thanks again,<br>Best regards,<br>Tobias<br><br>