Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-11514

Channel arrays sip_h_* variables are not serialized properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 20.18.1
    • Fix Version/s: None
    • Component/s: mod_sofia
    • Labels:
      None
    • CPU Architecture:
      x86-64
    • Kernel:
      Linux
    • Userland:
      GNU/Linux
    • Distribution:
      Debian
    • Distribution Version:
      Debian 9 Stretch
    • Compiler:
      gcc
    • FreeSWITCH GIT Revision:
      102161e14d
    • GIT Master Revision hash::
      102161e14d

      Description

      When a sip header variable is defined as an array, it is not serialized correctly on the sip packet.

      For example, when we define:

      <action application="push" data="sip_h_Diversion,<sip:alice@sip.solutions>;reason=unconditional;counter=1"/>
      <action application="push" data="sip_h_Diversion,<sip:bob@sip.solutions>;reason=unconditional;counter=2;"/>

      The resulting SIP header is (all in one line):

      Diversion: ARRAY::<sip:alice@sip.solutions>;reason=unconditional;counter=1|:<sip:bob@sip.solutions>;reason=unconditional;counter=2;

      The array is serialized as a simple variable and its internal string representation is sent over the wire.

      The attached pull request serializes an array var into multiple consecutive headers of the same name. The previous example would then result in:

      Diversion: <sip:alice@sip.solutions>;reason=unconditional;counter=1
      Diversion: <sip:bob@sip.solutions>;reason=unconditional;counter=2;

        Attachments

          Activity

            People

            • Assignee:
              mikej Mike Jerris
              Reporter:
              vma vallimamod abdullah
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: