FreePBX
  1. FreePBX
  2. FREEPBX-4163

Queue module calls DEVSTATE instead of DEVICE_STATE on 1.6

    Details

    • Type: Bugs Bugs
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 2.7
    • Fix Version/s: None
    • Component/s: Queues
    • Labels:
      None
    • Backend Engine:
      All
    • Confirmation:
      Unreviewed

      Description

      when i call my extension when it has the fax enabled, something fatal occurs! No call is placed on my phone and the pbx ask the caller something that i don't understand:

      
          -- Executing [110@publicdomain:1] NoOp("SIP/111-000000ce", "Receiving Fax for: Simo Home (110), From: "device" <111>") in new stack
          -- Executing [110@publicdomain:2] Set("SIP/111-000000ce", "FAX_RX_EMAIL=xxx@xxx.it") in new stack
          -- Executing [110@publicdomain:3] Goto("SIP/111-000000ce", "s,receivefax") in new stack
          -- Goto (publicdomain,s,3)
          -- Executing [s@publicdomain:3] Macro("SIP/111-000000ce", "user-callerid,") in new stack
          -- Executing [s@macro-user-callerid:1] Set("SIP/111-000000ce", "AMPUSER=111") in new stack
          -- Executing [s@macro-user-callerid:2] GotoIf("SIP/111-000000ce", "0?report") in new stack
          -- Executing [s@macro-user-callerid:3] ExecIf("SIP/111-000000ce", "1?Set(REALCALLERIDNUM=111)") in new stack
          -- Executing [s@macro-user-callerid:4] Set("SIP/111-000000ce", "AMPUSER=111") in new stack
          -- Executing [s@macro-user-callerid:5] Set("SIP/111-000000ce", "AMPUSERCIDNAME=Simo Home") in new stack
          -- Executing [s@macro-user-callerid:6] GotoIf("SIP/111-000000ce", "0?report") in new stack
          -- Executing [s@macro-user-callerid:7] Set("SIP/111-000000ce", "AMPUSERCID=111") in new stack
          -- Executing [s@macro-user-callerid:8] Set("SIP/111-000000ce", "CALLERID(all)="Simo Home" <111>") in new stack
          -- Executing [s@macro-user-callerid:9] ExecIf("SIP/111-000000ce", "0?Set(CHANNEL(language)=)") in new stack
          -- Executing [s@macro-user-callerid:10] GotoIf("SIP/111-000000ce", "0?continue") in new stack
          -- Executing [s@macro-user-callerid:11] Set("SIP/111-000000ce", "__TTL=64") in new stack
          -- Executing [s@macro-user-callerid:12] GotoIf("SIP/111-000000ce", "1?continue") in new stack
          -- Goto (macro-user-callerid,s,19)
          -- Executing [s@macro-user-callerid:19] NoOp("SIP/111-000000ce", "Using CallerID "Simo Home" <111>") in new stack
          -- Executing [s@publicdomain:4] Set("SIP/111-000000ce", "QUEUESTAT=LOGGEDOUT") in new stack
          -- Executing [s@publicdomain:5] DeadAGI("SIP/111-000000ce", "queue_devstate.agi,getqueues,111") in new stack
      [Mar 25 14:09:04] WARNING[16128]: res_agi.c:3311 deadagi_exec: DeadAGI has been deprecated, please use AGI in all cases!
          -- Launched AGI Script /var/lib/asterisk/agi-bin/queue_devstate.agi
        == Manager 'admin' logged on from 127.0.0.1
          -- queue_devstate.agi,getqueues,111: Queue 0 has noone logged in
          -- queue_devstate.agi,getqueues,111: Finished sorting
          -- queue_devstate.agi,getqueues,111: Getting Queue Status for user 111 in queue 
          -- queue_devstate.agi,getqueues,111: Agent 111 is LOGGEDOUT
          -- <SIP/111-000000ce>AGI Script queue_devstate.agi completed, returning 0
        == Manager 'admin' logged off from 127.0.0.1
          -- Executing [s@publicdomain:6] GotoIf("SIP/111-000000ce", "1?activate") in new stack
          -- Goto (publicdomain,s,15)
          -- Executing [s@publicdomain:15] NoOp("SIP/111-000000ce", "Agent Logged In") in new stack
          -- Executing [s@publicdomain:16] Set("SIP/111-000000ce", "STATE=INUSE") in new stack
          -- Executing [s@publicdomain:17] Macro("SIP/111-000000ce", "toggle-add-agent,") in new stack
          -- Executing [s@macro-toggle-add-agent:1] Wait("SIP/111-000000ce", "1") in new stack
          -- Executing [s@macro-toggle-add-agent:2] Macro("SIP/111-000000ce", "user-callerid,SKIPTTL,") in new stack
          -- Executing [s@macro-user-callerid:1] Set("SIP/111-000000ce", "AMPUSER=111") in new stack
          -- Executing [s@macro-user-callerid:2] GotoIf("SIP/111-000000ce", "0?report") in new stack
          -- Executing [s@macro-user-callerid:3] ExecIf("SIP/111-000000ce", "0?Set(REALCALLERIDNUM=111)") in new stack
          -- Executing [s@macro-user-callerid:4] Set("SIP/111-000000ce", "AMPUSER=111") in new stack
          -- Executing [s@macro-user-callerid:5] Set("SIP/111-000000ce", "AMPUSERCIDNAME=Simo Home") in new stack
          -- Executing [s@macro-user-callerid:6] GotoIf("SIP/111-000000ce", "0?report") in new stack
          -- Executing [s@macro-user-callerid:7] Set("SIP/111-000000ce", "AMPUSERCID=111") in new stack
          -- Executing [s@macro-user-callerid:8] Set("SIP/111-000000ce", "CALLERID(all)="Simo Home" <111>") in new stack
          -- Executing [s@macro-user-callerid:9] ExecIf("SIP/111-000000ce", "0?Set(CHANNEL(language)=)") in new stack
          -- Executing [s@macro-user-callerid:10] GotoIf("SIP/111-000000ce", "1?continue") in new stack
          -- Goto (macro-user-callerid,s,19)
          -- Executing [s@macro-user-callerid:19] NoOp("SIP/111-000000ce", "Using CallerID "Simo Home" <111>") in new stack
          -- Executing [s@macro-toggle-add-agent:3] Set("SIP/111-000000ce", "CALLBACKNUM=111") in new stack
          -- Executing [s@macro-toggle-add-agent:4] GotoIf("SIP/111-000000ce", "0?invalid") in new stack
          -- Executing [s@macro-toggle-add-agent:5] AddQueueMember("SIP/111-000000ce", ",Local/111@from-queue/n,") in new stack
      [Mar 25 14:09:06] WARNING[16128]: app_queue.c:4943 aqm_exec: Unable to add interface to queue '': No such queue
          -- Executing [s@macro-toggle-add-agent:6] UserEvent("SIP/111-000000ce", "AgentLogin,Agent: 111") in new stack
          -- Executing [s@macro-toggle-add-agent:7] MacroExit("SIP/111-000000ce", "") in new stack
          -- Executing [s@publicdomain:18] Gosub("SIP/111-000000ce", "sstate,1") in new stack
          -- Executing [sstate@publicdomain:1] Set("SIP/111-000000ce", "DEVICES=111") in new stack
          -- Executing [sstate@publicdomain:2] GotoIf("SIP/111-000000ce", "0?return") in new stack
          -- Executing [sstate@publicdomain:3] Set("SIP/111-000000ce", "LOOPCNT=1") in new stack
          -- Executing [sstate@publicdomain:4] Set("SIP/111-000000ce", "ITER=1") in new stack
          -- Executing [sstate@publicdomain:5] Set("SIP/111-000000ce", "DEVSTATE(Custom:QUEUE111*)=INUSE") in new stack
      [Mar 25 14:09:06] ERROR[16128]: pbx.c:3386 ast_func_write: Function DEVSTATE not registered
          -- Executing [sstate@publicdomain:6] Set("SIP/111-000000ce", "ITER=2") in new stack
          -- Executing [sstate@publicdomain:7] GotoIf("SIP/111-000000ce", "0?begin") in new stack
          -- Executing [sstate@publicdomain:8] Return("SIP/111-000000ce", "") in new stack
          -- Executing [s@publicdomain:19] Playback("SIP/111-000000ce", "agent-loginok") in new stack
          -- <SIP/111-000000ce> Playing 'agent-loginok.gsm' (language 'en')
      [Mar 25 14:09:06] NOTICE[16128]: channel.c:3003 __ast_read: Dropping incompatible voice frame on SIP/111-000000ce of format g729 since our native format has changed to 0x4 (ulaw)
          -- Executing [s@publicdomain:20] SayDigits("SIP/111-000000ce", "111") in new stack
          -- <SIP/111-000000ce> Playing 'digits/1.gsm' (language 'en')
          -- <SIP/111-000000ce> Playing 'digits/1.gsm' (language 'en')
          -- <SIP/111-000000ce> Playing 'digits/1.gsm' (language 'en')
          -- Executing [s@publicdomain:21] Macro("SIP/111-000000ce", "hangupcall,") in new stack
          -- Executing [s@macro-hangupcall:1] GotoIf("SIP/111-000000ce", "1?skiprg") in new stack
          -- Goto (macro-hangupcall,s,4)
          -- Executing [s@macro-hangupcall:4] GotoIf("SIP/111-000000ce", "1?skipblkvm") in new stack
          -- Goto (macro-hangupcall,s,7)
          -- Executing [s@macro-hangupcall:7] GotoIf("SIP/111-000000ce", "1?theend") in new stack
          -- Goto (macro-hangupcall,s,9)
          -- Executing [s@macro-hangupcall:9] Hangup("SIP/111-000000ce", "") in new stack
        == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/111-000000ce' in macro 'hangupcall'
        == Spawn extension (publicdomain, s, 21) exited non-zero on 'SIP/111-000000ce'
          -- Executing [h@publicdomain:1] Macro("SIP/111-000000ce", "hangupcall,") in new stack
          -- Executing [s@macro-hangupcall:1] GotoIf("SIP/111-000000ce", "1?skiprg") in new stack
          -- Goto (macro-hangupcall,s,4)
          -- Executing [s@macro-hangupcall:4] GotoIf("SIP/111-000000ce", "1?skipblkvm") in new stack
          -- Goto (macro-hangupcall,s,7)
          -- Executing [s@macro-hangupcall:7] GotoIf("SIP/111-000000ce", "1?theend") in new stack
          -- Goto (macro-hangupcall,s,9)
          -- Executing [s@macro-hangupcall:9] Hangup("SIP/111-000000ce", "") in new stack
        == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/111-000000ce' in macro 'hangupcall'
        == Spawn extension (publicdomain, h, 1) exited non-zero on 'SIP/111-000000ce'
      
      

      if i disable fax to email on extension 110 it works ok (my phone rings!)

      PS: the right function name is DEVSTATE in Asterisk 1.4 and DEVICE_STATE in Asterisk 1.6

        Activity

        Hide
        Philippe Lindheimer added a comment -

        kopspa,

        you have me completely confused. What is that trace suppose to be? It looks like you've got some custom dialplan (publicdomain
        - not ours) and it doesn't look liek it has anything to do with calling an extension??? Did you paste the wrong thing?

        on a separate note, if you are getting the wrong DEVSTATE vs. DEVICE_STATE please file a separate bug, indicate what version of Asterisk you are running, and provide a snapshot of what feature you are dialing that has the wrong function call. The code is suppose to adjust for this but it's possible that something got missed somewhere.

        Show
        Philippe Lindheimer added a comment - kopspa, you have me completely confused. What is that trace suppose to be? It looks like you've got some custom dialplan (publicdomain - not ours) and it doesn't look liek it has anything to do with calling an extension??? Did you paste the wrong thing? on a separate note, if you are getting the wrong DEVSTATE vs. DEVICE_STATE please file a separate bug, indicate what version of Asterisk you are running, and provide a snapshot of what feature you are dialing that has the wrong function call. The code is suppose to adjust for this but it's possible that something got missed somewhere.
        Hide
        Philippe Lindheimer added a comment -

        Since I can't make any sense out of what is being reported here besides the last comment, I'll change the description to reflect that and you can open a new bug and better describe what ever issue you are having wrt to calling extensions.

        Show
        Philippe Lindheimer added a comment - Since I can't make any sense out of what is being reported here besides the last comment, I'll change the description to reflect that and you can open a new bug and better describe what ever issue you are having wrt to calling extensions.
        Hide
        Philippe Lindheimer added a comment -

        (In http://www.freepbx.org/trac/changeset/9395) fixes FREEPBX-4163 use DEVICE_STATE for 1.6+

        Show
        Philippe Lindheimer added a comment - (In http://www.freepbx.org/trac/changeset/9395 ) fixes FREEPBX-4163 use DEVICE_STATE for 1.6+
        Hide
        Philippe Lindheimer added a comment -

        (In http://www.freepbx.org/trac/changeset/9396) Merged revisions 9389-9395 via svnmerge from
        http://svn.freepbx.org/modules/branches/2.7

        ........

        (http://www.freepbx.org/trac/changeset/9395) | p_lindheimer | 2010-03-25 21:12:14 -0700 (Thu, 25 Mar 2010) | 1 line

        fixes FREEPBX-4163 use DEVICE_STATE for 1.6+

        ........

        Show
        Philippe Lindheimer added a comment - (In http://www.freepbx.org/trac/changeset/9396 ) Merged revisions 9389-9395 via svnmerge from http://svn.freepbx.org/modules/branches/2.7 ........ ( http://www.freepbx.org/trac/changeset/9395 ) | p_lindheimer | 2010-03-25 21:12:14 -0700 (Thu, 25 Mar 2010) | 1 line fixes FREEPBX-4163 use DEVICE_STATE for 1.6+ ........
        Hide
        kopspa added a comment -

        sorry, you see publicdomain because i have the custom context module enabled because i need to set permissions on outbound routes

        however, i have enabled all to 'allow' on my custom context except "ALL OUTBOUND ROUTES" and "ENTIRE Basic Dialplan" (from-internal-additional) so, maybe that it is a my misconfiguration problem

        Show
        kopspa added a comment - sorry, you see publicdomain because i have the custom context module enabled because i need to set permissions on outbound routes however, i have enabled all to 'allow' on my custom context except "ALL OUTBOUND ROUTES" and "ENTIRE Basic Dialplan" (from-internal-additional) so, maybe that it is a my misconfiguration problem
        Hide
        Philippe Lindheimer added a comment -

        well what ever the case, if you are having problems at this point open another ticket since I used this one for your DEVSTATE report and that has been fixed.

        Show
        Philippe Lindheimer added a comment - well what ever the case, if you are having problems at this point open another ticket since I used this one for your DEVSTATE report and that has been fixed.

          People

          • Assignee:
            Unassigned
            Reporter:
            kopspa
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development