Uploaded image for project: 'FreePBX'
  1. FreePBX
  2. FREEPBX-23853

Gosub error in dial one (at least)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Support
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: asterisk
    • Labels:
      None
    • Bug Tracker:
      Customer Issue
    • ToDo:
    • Asterisk Version:
      18.14.0
    • Distro Version:
      16.0.26
    • Distro:
      FreePBX Distro

      Description

      Hi,

      inserting an ExecIf+Gosub in hooks or manually in extensions_additional (tested in macro-dial-one as well as in macro-dialout-one-predial-hook, DIALEDNUMBER being a channel variable created on incoming call:

      {{same =
      n,ExecIf($["x${DIALEDNUMBER:-4}" = "x0089"]?Gosub(func-set-sipheader,s,1(Alert-Info,<http://www.notused.com>\;info=Private-DH\;x-line-id=0)))}}

      Give result

      == Channel 'Local/804@from-queue-00000027;2' jumping out of macro 'dialout-one-predial-hook'
      == Channel 'Local/804@from-queue-00000027;2' jumping out of macro 'dial-one'
      == Channel 'Local/804@from-queue-00000027;2' jumping out of macro 'exten-vm'
      – Executing [s@func-set-sipheader:1] NoOp("Local/804@from-queue-00000027;2", "Sip Add Header function called. Adding = HhTtrM(auto-blkvm)") in new stack
      – Executing [s@func-set-sipheader:2] Set("Local/804@from-queue-00000027;2", "HASH(__SIPHEADERS,)=HhTtrM(auto-blkvm)") in new stack
      – Executing [s@func-set-sipheader:3] Return("Local/804@from-queue-00000027;2", "") in new stack{{}}

      Notice the <Adding = HhTtrM(auto-blkvm)> which is not the awaited value

      as removing the ExecIf like

      {{same =
      n,Gosub(func-set-sipheader,s,1(Alert-Info,<http://www.notused.com>\;info=Private-DH\;x-line-id=0))}}

      give the correct result

      – Executing [s@macro-dial-one:51] Macro("Local/804@from-queue-0000002a;2", "dialout-one-predial-hook,") in new stack
      – Executing [s@macro-dialout-one-predial-hook:1] NoOp("Local/804@from-queue-0000002a;2", "DIALEDNUMBER=xxxxxxx0089") in new stack
      – Executing [s@macro-dialout-one-predial-hook:2] Gosub("Local/804@from-queue-0000002a;2", "func-set-sipheader,s,1(Alert-Info,<http://www.notused.com>;inf
      o=Private-DH;x-line-id=0)") in new stack
      – Executing [s@func-set-sipheader:1] NoOp("Local/804@from-queue-0000002a;2", "Sip Add Header function called. Adding Alert-Info = <http://www.notused.com
      >;info=Private-DH;x-line-id=0") in new stack
      – Executing [s@func-set-sipheader:2] Set("Local/804@from-queue-0000002a;2", "HASH(__SIPHEADERS,Alert-Info)=<http://www.notused.com>;info=Private-DH;x-lin
      e-id=0") in new stack
      – Executing [s@func-set-sipheader:3] Return("Local/804@from-queue-0000002a;2", "") in new stack{{}}

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tootai dash
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  NextupJiraPlusStatus

                  Error rendering 'slack.nextup.jira:nextup-jira-plus-status'. Please contact your Jira administrators.