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

Error in res_pjsip_header_funcs.c for after Alert-Info

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Asterisk Version:
      16.0.9
    • Distro Version:
      15

      Description

      We don't use any of Alert-Info options (e.g. on Inbound Routes Alert-Info is None, RFC7462=No all other options regarding Alert-Info is in default state).

      But on every outbound call from internal extenstion to trunk we see following error:

      [15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:1] NoOp("PJSIP/375445454057-000005de", "Applying SIP Headers to channel PJSIP/375445454057-000005de") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:2] Set("PJSIP/375445454057-000005de", "TECH=PJSIP") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:3] Set("PJSIP/375445454057-000005de", "SIPHEADERKEYS=Alert-Info") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/375445454057-000005de", "1") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:5] Set("PJSIP/375445454057-000005de", "sipheader=unset") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/375445454057-000005de", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack
      [2020-09-16 15:33:14] ERROR[30132] res_pjsip_header_funcs.c: No headers had been previously added to this session.
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:7] ExecIf("PJSIP/375445454057-000005de", "0?Set(PJSIP_HEADER(add,Alert-Info)=unset)") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:8] EndWhile("PJSIP/375445454057-000005de", "") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:4] While("PJSIP/375445454057-000005de", "0") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:9] Return("PJSIP/375445454057-000005de", "") in new stack
      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] app_stack.c: Spawn extension (from-pstn, 98296521507, 1) exited non-zero on 'PJSIP/375445454057-000005de'

       

      I assume that this is caused by this string:

      [2020-09-16 15:33:14] VERBOSE[15879][C-000002e6] pbx.c: Executing [s@func-apply-sipheaders:6] ExecIf("PJSIP/375445454057-000005de", "1?Set(PJSIP_HEADER(remove,Alert-Info)=)") in new stack

      which is defined in 

      isecfreepbx*CLI> dialplan show func-apply-sipheaders
      [ Context 'func-apply-sipheaders' created by 'pbx_config' ]

      6. ExecIf($["${sipheader}" = "unset" & "${TECH}" = "PJSIP"]?Set(PJSIP_HEADER(remove,${sipkey})=)) [extensions_additional.conf:3831]

       

      So it tries to remove nonexistent header thus res_pjsip_header_funcs gives error about that.

      Can this code be fixed, e.g. include header presence check before removing 

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                barzog Oleg Gawriloff
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:

                  NextupJiraPlusStatus

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