<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    <br>
    Your dial-plan could be like this,<br>
    <br>
    here you will dial<br>
    EXTEN =&gt; _X,1,NoOp<br>
    EXTEN =&gt; _X,n,Set(WHOHAVEHANGED=CALLER)<br>
    EXTEN =&gt; _X,n,Dial(ZAP/xyz)<br>
    if caller hanged below line will never be executed because control
    will go to h extension.<br>
    EXTEN =&gt; _X,n,Set(WHOHAVEHANGED=CALEE)<br>
    <br>
    <br>
    EXTEN =&gt; h,1,NoOp(${WHOHAVEHANGED} have hanged the call reason
    is  ${HANGUPCAUSE})
    <div class="moz-signature">
      <meta content="text/html; charset=UTF-8" http-equiv="content-type">
      <title>Signatures <a class="moz-txt-link-abbreviated" href="mailto:faisal@vopium.com">faisal@vopium.com</a></title>
      <p style="font-family: Verdana;" class="MsoNormal"><small><small><small><small><small><small><small><small><span
                          style="font-size: 10pt;">Regards,<o:p></o:p></span></small></small></small></small></small></small></small></small></p>
      <p style="font-family: Verdana;" class="MsoNormal"><small><small><small><small><small><small><small><small><span
                          style="font-size: 10pt;"><o:p></o:p>Faisal
                          Hanif<br>
                        </span></small></small></small></small></small></small></small></small><br>
      </p>
    </div>
    On 8/12/2010 12:29 AM, bruce bruce wrote:
    <blockquote
      cite="mid:AANLkTinjSyFCJ25WpqhEPfp9kxDAoeB1WQSFrArbZr_i@mail.gmail.com"
      type="cite">Sorry, I am not following:
      <div><br>
      </div>
      <div><b><i>"</i></b><span class="Apple-style-span"
          style="font-family: Verdana; border-collapse: collapse;"><b><i>read
              the value of var ${HANGUPCAUSE} next line to dial
              command."</i></b></span></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><br>
              </i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-weight: normal;
                  font-style: normal;">Where is that value? Next to dial
                  you mean right when the call was placed? or check next
                  few lines to find HANGUP cause?</span></i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-style: normal;
                  font-weight: normal;"><br>
                </span></i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-style: normal;
                  font-weight: normal;">Note: This is using ZAP
                  (analogue) and not PRI.</span></i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-style: normal;
                  font-weight: normal;"><br>
                </span></i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-style: normal;
                  font-weight: normal;">Thanks,</span></i></b></span></font></div>
      <div><font class="Apple-style-span" face="Verdana"><span
            class="Apple-style-span" style="border-collapse: collapse;"><b><i><span
                  class="Apple-style-span" style="font-style: normal;
                  font-weight: normal;">Bruce<br>
                </span></i></b></span></font><br>
        <div class="gmail_quote">On Wed, Aug 11, 2010 at 12:33 AM,
          Faisal Hanif <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:faisal@vopium.com">faisal@vopium.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000"> <font size="-1"><font
                  face="Verdana">read the value of var ${HANGUPCAUSE}
                  next line to dial command.</font></font><br>
              <div>
                <p style="font-family: Verdana;" class="MsoNormal"><small><small><small><small><small><small><small><small><span
                                    style="font-size: 10pt;">Regards,</span></small></small></small></small></small></small></small></small></p>
                <p style="font-family: Verdana;" class="MsoNormal"><small><small><small><small><small><small><small><small><span
                                    style="font-size: 10pt;">Faisal
                                    Hanif<br>
                                    <i>VoIP Manager<br>
                                    </i><b><span style="color: rgb(0,
                                        127, 0);"></span></b></span></small></small></small></small></small></small></small></small>Vopium

                  A/S<br>
                </p>
              </div>
              On 8/10/2010 9:51 PM, bruce bruce wrote:
              <blockquote type="cite">
                <p>Hi Everyone</p>
                <p>Asterisk 1.4.33 is running with Sangoma/Dahdi for
                  analogue lines to Bell Canada.</p>
                <p>User claims that call hangup without any interferance
                  to the phone set.</p>
                <p>Is there ANYWAY to find out which party hang-up the
                  call or if the call was cut-off due to other reasons?</p>
                <p>I checked the <strong>"asteriskcdrb"</strong> table
                  and it's pretty much useless in this case as it only
                  logs the duration and other properties but not cause
                  of the Hangup.</p>
                <p><br>
                </p>
                <p> /var/log/asterisk/full</p>
                <p>[Jul 10 10:37:02] VERBOSE[29366] logger.c:   ==
                  Manager 'admin' logged off from 127.0.0.1<br>
                  [Jul 10 10:37:09] VERBOSE[29348] logger.c:     --
                  Executing [h@macro-dialout-trunk:1]
                  Macro("SIP/1007-0000069a", "hangupcall|") in new stack<br>
                  [Jul 10 10:37:09] VERBOSE[29348] logger.c:     --
                  Executing [s@macro-hangupcall:1]
                  GotoIf("SIP/1007-0000069a", "1?skiprg") in new stack<br>
                  [Jul 10 10:37:09] VERBOSE[29348] logger.c:     -- Goto
                  (macro-hangupcall,s,4)</p>
                <p><br>
                </p>
                <p>Thanks,</p>
                <p>Bruce</p>
              </blockquote>
            </div>
            <br>
            --<br>
_____________________________________________________________________<br>
            -- Bandwidth and Colocation Provided by <a
              moz-do-not-send="true" href="http://www.api-digital.com"
              target="_blank">http://www.api-digital.com</a> --<br>
            New to Asterisk? Join us for a live introductory webinar
            every Thurs:<br>
                          <a moz-do-not-send="true"
              href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
            <br>
            asterisk-users mailing list<br>
            To UNSUBSCRIBE or update options visit:<br>
              <a moz-do-not-send="true"
              href="http://lists.digium.com/mailman/listinfo/asterisk-users"
              target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
  </body>
</html>