<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <br>
    <blockquote type="cite"
cite="mid:CAM0A2Z0j=JvN_wAoDWxjavKUXYcPu4-5AtPSwMd+puF4Wwtaug@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">On Fri, Feb 11, 2022 at 9:31 AM Jonas Kellens
          <<a href="mailto:jonas.kellens@telenet.be"
            moz-do-not-send="true">jonas.kellens@telenet.be</a>>
          wrote:<br>
        </div>
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div bgcolor="#FFFFFF">
              <p><font face="Helvetica, Arial, sans-serif">Hello</font></p>
              <p><font face="Helvetica, Arial, sans-serif"><br>
                </font></p>
              <p><font face="Helvetica, Arial, sans-serif">I notice a
                  major difference in what Asterisk console is telling
                  me (which seems correct) and what Asterisk Manager is
                  telling.</font></p>
              <p><br>
              </p>
              <p>A SIP user is called, and the phone does not ring. This
                is the situation.</p>
              <p><br>
              </p>
              <p>On Asterisk console I see (which seems to be in line
                with an unreachable phone) :</p>
              <p>[Feb 11 11:31:31] VERBOSE[15653][C-00000319]
                app_dial.c: Called SIP/mysipuser6<br>
                [Feb 11 11:31:37] VERBOSE[15653][C-00000319] app_dial.c:
                Everyone is busy/congested at this time (1:0/0/1)<br>
                [Feb 11 11:31:37] VERBOSE[15653][C-00000319] pbx.c:
                Executing [202@from-PBX:253]
                NoOp("SIP/mysipuser12-0000157d",
                "DIALSTATUS=CHANUNAVAIL") in new stack</p>
              <p>However on Asterisk Manager interface I see the event :</p>
              <p>11:31:31<br>
                Array<br>
                (<br>
                    [0] => Event: DeviceStateChange<br>
                    [1] => Privilege: call,all<br>
                    [2] => SystemName: voipserver1<br>
                    [3] => Device: SIP/mysipuser6<br>
                    [4] => State: RINGING<br>
                )</p>
              <p><br>
              </p>
              <p>I can reproduce this easily every time :</p>
              <p>[Feb 11 11:31:46] VERBOSE[15719][C-0000031a]
                app_dial.c: Called SIP/mysipuser6<br>
                [Feb 11 11:31:53] VERBOSE[15719][C-0000031a] app_dial.c:
                Everyone is busy/congested at this time (1:0/0/1)<br>
                [Feb 11 11:31:53] VERBOSE[15719][C-0000031a] pbx.c:
                Executing [202@from-PBX:253]
                NoOp("SIP/mysipuser12-0000157f",
                "DIALSTATUS=CHANUNAVAIL") in new stack</p>
              <p>11:31:46<br>
                Array<br>
                (<br>
                    [0] => Event: DeviceStateChange<br>
                    [1] => Privilege: call,all<br>
                    [2] => SystemName: voipserver1<br>
                    [3] => Device: SIP/mysipuser6<br>
                    [4] => State: RINGING<br>
                )</p>
              <p><br>
              </p>
              <p>Why is Asterisk Manager reporting a RINGING state if
                there is no SIP 180 RINGING received ?! When issuing a
                SIP DEBUG, I see a SIP INVITE but no response (so no SIP
                180 or 183).<br>
              </p>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>The answer seems to be, because that's the way chan_sip
            was written. As soon as an outgoing call is attempted it
            sets some internal state to ringing, which is then used when
            it reports device state information. DeviceStateChange is
            just reporting what chan_sip told it.</div>
        </div>
        <div><br>
        </div>
        -- <br>
        <div dir="ltr" class="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div style="font-family:tahoma,sans-serif"><font
                              color="#073763">Joshua C. Colp</font></div>
                          <div style="font-family:tahoma,sans-serif"><font
                              color="#073763">Asterisk Technical Lead</font></div>
                          <div style="font-family:tahoma,sans-serif"><font
                              color="#073763">Sangoma Technologies</font></div>
                          <div style="font-family:tahoma,sans-serif"><font
                              color="#073763">Check us out at <a
                                href="http://www.sangoma.com"
                                target="_blank" moz-do-not-send="true">www.sangoma.com</a>
                              and <a href="http://www.asterisk.org"
                                target="_blank" moz-do-not-send="true">www.asterisk.org</a></font><br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <br>
    So if "DeviceStateChange" is not reporting the real state of a SIP
    user/device (like 180-ringing), which event does ?!<br>
    <br>
    <br>
    <br>
    Kind regards.<br>
  </body>
</html>