Skip to content
Snippets Groups Projects
  1. May 08, 2023
    • Naveen Albert's avatar
      res_pjsip_stir_shaken: Fix JSON field ordering and disallowed TN characters. · 59c9e453
      Naveen Albert authored
      The current STIR/SHAKEN signing process is inconsistent with the
      RFCs in a couple ways that can cause interoperability issues.
      
      RFC8225 specifies that the keys must be ordered lexicographically, but
      currently the fields are simply ordered according to the order
      in which they were added to the JSON object, which is not
      compliant with the RFC and can cause issues with some carriers.
      
      To fix this, we now leverage libjansson's ability to dump a JSON
      object sorted by key value, yielding the correct field ordering.
      
      Additionally, telephone numbers must have any leading + prefix removed
      and must not contain characters outside of 0-9, *, and # in order
      to comply with the RFCs. Numbers are now properly formatted as such.
      
      ASTERISK-30407 #close
      
      Change-Id: Iab76d39447c4b8cf133de85657dba02fda07f9a2
      (cherry picked from commit 66a7cff57ecc4514c28071981037afa72ef0d4b9)
      59c9e453
    • Naveen Albert's avatar
      pbx_dundi: Add PJSIP support. · 99d17db9
      Naveen Albert authored
      Adds PJSIP as a supported technology to DUNDi.
      
      To facilitate this, we now allow an endpoint to be specified
      for outgoing PJSIP calls. We also allow users to force a specific
      channel technology for outgoing SIP-protocol calls.
      
      ASTERISK-28109 #close
      ASTERISK-28233 #close
      
      Change-Id: I2e28e5a5d007bd49e3df113ad567b011103899bf
      (cherry picked from commit b33f92cbb56fb848d2a0aaeb416b7cac4813f804)
      99d17db9
    • The_Blode's avatar
      install_prereq: Add Linux Mint support. · 81a912f3
      The_Blode authored
      ASTERISK-30359 #close
      
      Change-Id: I9c140c7f12ca7dafe65c317f2a26122cf2c72556
      (cherry picked from commit de9aaf7e97c711887d4bf77618677e2c3850d972)
      81a912f3
    • Henning Westerholt's avatar
      chan_pjsip: fix music on hold continues after INVITE with replaces · 51509309
      Henning Westerholt authored
      In a three party scenario with INVITE with replaces, we need to
      unhold the call, otherwise one party continues to get music on
      hold, and the call is not properly bridged between them.
      
      ASTERISK-30428
      
      Change-Id: I5675df11e739be5226b328f8828d4b8d81fbefb4
      (cherry picked from commit 1c5720b80226336f62359962850ffd0e5afd2ab7)
      51509309
    • Naveen Albert's avatar
      voicemail.conf: Fix incorrect comment about #include. · c9aa3b01
      Naveen Albert authored
      A comment at the top of voicemail.conf says that #include
      cannot be used in voicemail.conf because this breaks
      the ability for app_voicemail to auto-update passwords.
      This is factually incorrect, since Asterisk has no problem
      updating files that are #include'd in the main configuration
      file, and this does work in voicemail.conf as well.
      
      ASTERISK-30479 #close
      
      Change-Id: I3bf7d275849ab83f55f7fb6702a75a3077ee1df3
      (cherry picked from commit d0f39250eeb7e62496477fd4cf57827eb9a99624)
      c9aa3b01
    • Naveen Albert's avatar
      app_queue: Fix minor xmldoc duplication and vagueness. · 5e7d21e5
      Naveen Albert authored
      The F option in the xmldocs for the Queue application
      was erroneously duplicated, causing it to display
      twice on the wiki. The two sections are now merged into one.
      
      Additionally, the description for the d option was quite
      vague. Some more details are added to provide context
      as to what this actually does.
      
      ASTERISK-30486 #close
      
      Change-Id: I6706cea708b5cc781f59f8652c2cb377e55aed7e
      (cherry picked from commit bad5bda08cf4595ee80aa3dca418ccff6356c98c)
      5e7d21e5
    • George Joseph's avatar
      test.c: Fix counting of tests and add 2 new tests · d0ce6d4e
      George Joseph authored
      The unit test XML output was counting all registered tests as "run"
      even when only a subset were actually requested to be run and
      the "failures" attribute was missing.
      
      * The "tests" attribute of the "testsuite" element in the
        output XML now reflects only the tests actually requested
        to be executed instead of all the tests registered.
      
      * The "failures" attribute was added to the "testsuite"
        element.
      
      Also added 2 new unit tests that just pass and fail to be
      used for CI testing.
      
      Change-Id: Ia137814b5aeb0e1a44c75034bd3615c26021da69
      (cherry picked from commit a0fd95ef52593e4b7471d8045683f81b101d014a)
      d0ce6d4e
    • Jaco Kroon's avatar
      res_calendar: output busy state as part of show calendar. · 3a158c07
      Jaco Kroon authored
      
      Change-Id: I894e4ecc3e93db4ff7783d46266ba3c5e6ccda10
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      (cherry picked from commit 019dc51139a2a387fb1dc8aeef038f06afc948b3)
      3a158c07
    • Sean Bright's avatar
      loader.c: Minor module key check simplification. · 255565e2
      Sean Bright authored
      Change-Id: I65aefd4434a783096165c179b5f94f2e4810dffe
      (cherry picked from commit 6dab013e4991d604146e15f67554b6c1e22c4acc)
      255565e2
    • Sean Bright's avatar
      ael: Regenerate lexers and parsers. · 6ff3258c
      Sean Bright authored
      Various changes to ensure that the lexers and parsers can be correctly
      generated when REBUILD_PARSERS is enabled.
      
      Some notes:
      
      * Because of the version of flex we are using to generate the lexers
        (2.5.35) some post-processing in the Makefile is still required.
      
      * The generated lexers do not contain the problematic C99 check that
        was being replaced by the call to sed in the respective Makefiles so
        it was removed.
      
      * Since these files are generated, they will include trailing
        whitespace in some places. This does not need to be corrected.
      
      Change-Id: Ibbd343606fcf5c0d285b1599e6e8e59f514f2e4e
      (cherry picked from commit 34ff836db5679cb1dc6f9d5ba8809d1a437ec0e3)
      6ff3258c
    • Mike Bradeen's avatar
      bridge_builtin_features: add beep via touch variable · 2ac8388c
      Mike Bradeen authored
      Add periodic beep option to one-touch recording by setting
      the touch variable TOUCH_MONITOR_BEEP or
      TOUCH_MIXMONITOR_BEEP to the desired interval in seconds.
      
      If the interval is less than 5 seconds, a minimum of 5
      seconds will be imposed.  If the interval is set to an
      invalid value, it will default to 15 seconds.
      
      A new test event PERIODIC_HOOK_ENABLED was added to the
      func_periodic_hook hook_on function to indicate when
      a hook is started.  This is so we can test that the touch
      variable starts the hook as expected.
      
      ASTERISK-30446
      
      Change-Id: I800e494a789ba7a930bbdcd717e89d86040d6661
      (cherry picked from commit ffe346b2de8d175ba60e0860546c32c25cb88d9f)
      2ac8388c
    • Mike Bradeen's avatar
      res_mixmonitor: MixMonitorMute by MixMonitor ID · e00eaa74
      Mike Bradeen authored
      While it is possible to create multiple mixmonitor instances
      on a channel, it was not previously possible to mute individual
      instances.
      
      This change includes the ability to specify the MixMonitorID
      when calling the manager action: MixMonitorMute.  This will
      allow an individual MixMonitor instance to be muted via id.
      This id can be stored as a channel variable using the 'i'
      MixMonitor option.
      
      As part of this change, if no MixMonitorID is specified in
      the manager action MixMonitorMute, Asterisk will set the mute
      flag on all MixMonitor spy-type audiohooks on the channel.
      This is done via the new audiohook function:
      ast_audiohook_set_mute_all.
      
      ASTERISK-30464
      
      Change-Id: Ibba8c7e750577aa1595a24b23316ef445245be98
      (cherry picked from commit fa635a872ea410d656d1f912a49bae66e95f1ae9)
      e00eaa74
    • Mike Bradeen's avatar
      format_sln: add .slin as supported file extension · 3a4fd2fa
      Mike Bradeen authored
      Adds '.slin' to existing supported file extensions:
      .sln and .raw
      
      ASTERISK-30465
      
      Change-Id: Ice848addc03a64c8404b87cb5d3b13399c57e496
      (cherry picked from commit 8d2ffc8aa54315b937712bc725fd813a37e73158)
      3a4fd2fa
    • Sean Bright's avatar
      res_agi: RECORD FILE plays 2 beeps. · b376d16d
      Sean Bright authored
      Sending the "RECORD FILE" command without the optional
      `offset_samples` argument can result in two beeps playing on the
      channel.
      
      This bug has been present since Asterisk 0.3.0 (2003-02-06).
      
      ASTERISK-30457 #close
      
      Change-Id: I95e88aa59378784d7f0eb648843f090e6723b787
      (cherry picked from commit a3ec3efa02f1b40336f9192af0cb1e11f0b8bee8)
      b376d16d
    • Naveen Albert's avatar
      func_json: Fix JSON parsing issues. · e104bd08
      Naveen Albert authored
      Fix issue with returning empty instead of dumping
      the JSON string when recursing.
      
      Also adds a unit test to capture this fix.
      
      ASTERISK-30441 #close
      
      Change-Id: If0bde9f3fe84f7af485e0838205cc21e0f752a85
      (cherry picked from commit f9fd76677f20f9db05c26ac55cc064394feb8650)
      e104bd08
    • Naveen Albert's avatar
      app_senddtmf: Add SendFlash AMI action. · 3dcf6ddd
      Naveen Albert authored
      Adds an AMI action to send a flash event
      on a channel.
      
      ASTERISK-30440 #close
      
      Change-Id: I4707aeecb3cd8f3e63fd0c3fe009798943c369c9
      (cherry picked from commit 3556ca239aa4b48eb31df4e19f54571d1ab3bd14)
      3dcf6ddd
    • Naveen Albert's avatar
      app_dial: Fix DTMF not relayed to caller on unanswered calls. · 0dd0bc3e
      Naveen Albert authored
      DTMF frames are not handled in app_dial when sent towards the
      caller. This means that if DTMF is sent to the calling party
      and the call has not yet been answered, the DTMF is not audible.
      This is now fixed by relaying DTMF frames if only a single
      destination is being dialed.
      
      ASTERISK-29516 #close
      
      Change-Id: Iafd7430ac2915126d42dc48f0b73b262452ee027
      (cherry picked from commit 090ec448cffc4b73e7840347aa148b5fc9181e8a)
      0dd0bc3e
    • Fabrice Fontaine's avatar
      configure: fix detection of re-entrant resolver functions · bdd2bac0
      Fabrice Fontaine authored
      uClibc does not provide res_nsearch:
      asterisk-16.0.0/main/dns.c:506: undefined reference to `res_nsearch'
      
      Patch coded by Yann E. MORIN:
      http://lists.busybox.net/pipermail/buildroot/2018-October/232630.html
      
      
      
      ASTERISK-21795 #close
      
      Signed-off-by: default avatarBernd Kuhls <bernd.kuhls@t-online.de>
      [Retrieved from:
      https: //git.buildroot.net/buildroot/tree/package/asterisk/0005-configure-fix-detection-of-re-entrant-resolver-funct.patch]
      Signed-off-by: default avatarFabrice Fontaine <fontaine.fabrice@gmail.com>
      Change-Id: I79296f19e28ec764bbd1e991bf11c416d0b10563
      (cherry picked from commit cb0220dec20b988a8d9662dccb215e5a5382b132)
      bdd2bac0
    • Mike Bradeen's avatar
      cli: increase channel column width · 5a85b372
      Mike Bradeen authored
      For 'core show channels', the Channel name field is increased
      to 64 characters and the Location name field is increased to
      32 characters.
      
      For 'core show channels verbose', the Channel name field is
      increased to 80 characters, the Context is increased to 24
      characters and the Extension is increased to 24 characters.
      
      ASTERISK-30455
      
      Change-Id: Ibec3742ce360ffc93bc56e9984c2a21dabc4d5e1
      (cherry picked from commit 405211eff757c4e91477d4f6cc6727d3e81057ae)
      5a85b372
    • Jaco Kroon's avatar
      app_queue: periodic announcement configurable start time. · d6e733d4
      Jaco Kroon authored
      
      This newly introduced periodic-announce-startdelay makes it possible to
      configure the initial start delay of the first periodic announcement
      after which periodic-announce-frequency takes over.
      
      ASTERISK-30437 #close
      Change-Id: Ia79984b6377ef78f167ad9ea2ac084bec29955d0
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      (cherry picked from commit 3fd0b65bae4b1b14434737ffcf0da4aa9ff717f6)
      d6e733d4
    • George Joseph's avatar
      make_version: Strip svn stuff and suppress ref HEAD errors · bd1f8b89
      George Joseph authored
      * All of the code that used subversion has been removed.
      
      * When Asterisk is checked out from a tag or commit instead
        of one of the regular branches, git would emit messages like
        "fatal: ref HEAD is not a symbolic ref" which weren't fatal
        at all.  Those are now suppressed.
      
      Change-Id: I2a11bc9ebbaf6dfa50f53516ede50a6bac65ca3c
      (cherry picked from commit bbec5d1a9926c419265fc2382ce14b37a8ec142e)
      bd1f8b89
    • Holger Hans Peter Freyther's avatar
      res_http_media_cache: Introduce options and customize · 723c9093
      Holger Hans Peter Freyther authored
      Make the existing CURL parameters configurable and allow
      to specify the usable protocols, proxy and DNS timeout.
      
      ASTERISK-30340
      
      Change-Id: I2eb02ef44190e026716720419bcbdbcc8125777b
      (cherry picked from commit 8f088aa0f7ba5a4b955a20ad2854465af3522e84)
      723c9093
    • Fabrice Fontaine's avatar
      main/iostream.c: fix build with libressl · b17177c4
      Fabrice Fontaine authored
      Fix the following build failure with libressl by using SSL_is_server
      which is available since version 2.7.0 and
      https://github.com/libressl-portable/openbsd/commit/d7ec516916c5eaac29b02d7a8ac6570f63b458f7:
      
      iostream.c: In function 'ast_iostream_close':
      iostream.c:559:41: error: invalid use of incomplete typedef 'SSL' {aka 'struct ssl_st'}
        559 |                         if (!stream->ssl->server) {
            |                                         ^~
      
      ASTERISK-30107 #close
      
      Fixes: - http://autobuild.buildroot.org/results/ce4d62d00bb77ba5b303cacf6be7e350581a62f9
      Change-Id: Iea7f34970297f2fb50285d73462d0174ba7e9587
      (cherry picked from commit 030b7b900942df6c795fcabd112d08d1ed858467)
      b17177c4
    • Sean Bright's avatar
      contrib: rc.archlinux.asterisk uses invalid redirect. · 61c8f9b2
      Sean Bright authored
      `rc.archlinux.asterisk`, which explicitly requests bash in its
      shebang, uses the following command syntax:
      
        ${DAEMON} -rx "core stop now" > /dev/null 2&>1
      
      The intent of which is to execute:
      
        ${DAEMON} -rx "core stop now"
      
      While sending both stdout and stderr to `/dev/null`. Unfortunately,
      because the `&` is in the wrong place, bash is interpreting the `2` as
      just an additional argument to the `$DAEMON` command and not as a file
      descriptor and proceeds to use the bashism `&>` to send stderr and
      stdout to a file named `1`.
      
      So we clean it up and just use bash's shortcut syntax.
      
      Issue raised and a fix suggested (but not used) by peutch on GitHub¹.
      
      ASTERISK-30449 #close
      
      1. https://github.com/asterisk/asterisk/pull/31
      
      Change-Id: Ie279bf4efb4d95cbf507313483d316e977303d19
      (cherry picked from commit 46bdd5e3be425279052205e0ad2e688fae87db2a)
      61c8f9b2
  2. Apr 03, 2023
    • Asterisk Development Team's avatar
    • Mike Bradeen's avatar
      res_pjsip_pubsub: subscription cleanup changes · f8dfbaf2
      Mike Bradeen authored
      There are two main parts of the change associated with this
      commit. These are driven by the change in call order of
      pubsub_on_rx_refresh and pubsub_on_evsub_state by pjproject
      when an in-dialog SUBSCRIBE is received.
      
      First, the previous behavior was for pjproject to call
      pubsub_on_rx_refresh before calling pubsub_on_evsub_state
      when an in-dialog SUBSCRIBE was received that changes the
      subscription state.
      
      If that change was a termination due to a re-SUBSCRIBE with
      an expires of 0, we used to use the call to pubsub_on_rx_refresh
      to set the substate of the evsub to TERMINATE_PENDING before
      pjproject could call pubsub_on_evsub_state.
      
      This substate let pubsub_on_evsub_state know that the
      subscription TERMINATED event could be ignored as there was
      still a subsequent NOTIFY that needed to be generated and
      another call to pubsub_on_evsub_state to come with it.
      
      That NOTIFY was sent via serialized_pubsub_on_refresh_timeout
      which would see the TERMINATE_PENDING state and transition it
      to TERMINATE_IN_PROGRESS before triggering another call to
      pubsub_on_evsub_state (which now would clean up the evsub.)
      
      The new pjproject behavior is to call pubsub_on_evsub_state
      before pubsub_on_rx_refresh. This means we no longer can set
      the state to TERMINATE_PENDING to tell pubsub_on_evsub_state
      that it can ignore the first TERMINATED event.
      
      To handle this, we now look directly at the event type,
      method type and the expires value to determine whether we
      want to ignore the event or use it to trigger the evsub
      cleanup.
      
      Second, pjproject now expects the NOTIFY to actually be sent
      during pubsub_on_rx_refresh and avoids the protocol violation
      inherent in sending a NOTIFY before the SUBSCRIBE is
      acknowledged by caching the sent NOTIFY then sending it
      after responding to the SUBSCRIBE.
      
      This requires we send the NOTIFY using the non-serialized
      pubsub_on_refresh_timeout directly and let pjproject handle
      the protocol violation.
      
      ASTERISK-30469
      
      Change-Id: I05c1d91a44fe28244ae93faa4a2268a3332b5fd7
      f8dfbaf2
  3. Mar 20, 2023
  4. Mar 09, 2023
  5. Mar 02, 2023
  6. Mar 01, 2023
    • George Joseph's avatar
      res_pjsip: Replace invalid UTF-8 sequences in callerid name · ceda5a98
      George Joseph authored
      * Added a new function ast_utf8_replace_invalid_chars() to
        utf8.c that copies a string replacing any invalid UTF-8
        sequences with the Unicode specified U+FFFD replacement
        character.  For example:  "abc\xffdef" becomes "abc\uFFFDdef".
        Any UTF-8 compliant implementation will show that character
        as a � character.
      
      * Updated res_pjsip:set_id_from_hdr() to use
        ast_utf8_replace_invalid_chars and print a warning if any
        invalid sequences were found during the copy.
      
      * Updated stasis_channels:ast_channel_publish_varset to use
        ast_utf8_replace_invalid_chars and print a warning if any
        invalid sequences were found during the copy.
      
      ASTERISK-27830
      
      Change-Id: I4ffbdb19c80bf0efc675d40078a3ca4f85c567d8
      ceda5a98
  7. Feb 28, 2023
    • Sean Bright's avatar
      test.c: Avoid passing -1 to FD_* family of functions. · e5c5cd6e
      Sean Bright authored
      This avoids buffer overflow errors when running tests that capture
      output from child processes.
      
      This also corrects a copypasta in an off-nominal error message.
      
      Change-Id: Ib482847a3515364f14c7e7a0c0a4213851ddb10d
      e5c5cd6e
    • Naveen Albert's avatar
      chan_iax2: Fix jitterbuffer regression prior to receiving audio. · ede67a99
      Naveen Albert authored
      ASTERISK_29392 (a security fix) introduced a regression by
      not processing frames when we don't have an audio format.
      
      Currently, chan_iax2 only calls jb_get to read frames from
      the jitterbuffer when the voiceformat has been set on the pvt.
      However, this only happens when we receive a voice frame, which
      means that prior to receiving voice frames, other types of frames
      get stalled completely in the jitterbuffer.
      
      To fix this, we now fallback to using the format negotiated during
      call setup until we've actually received a voice frame with a format.
      This ensures we're always able to read from the jitterbuffer.
      
      ASTERISK-30354 #close
      ASTERISK-30162 #close
      
      Change-Id: Ie4fd1e8e088a145ad89e0427c2100a530e964fe9
      ede67a99
  8. Feb 27, 2023
    • Sean Bright's avatar
      test_crypto.c: Fix getcwd(…) build error. · 827222d6
      Sean Bright authored
      `getcwd(…)` is decorated with the `warn_unused_result` attribute and
      therefore needs its return value checked.
      
      Change-Id: Idcccb20a0abf293202c28633d0e9ee0f6a9dbe93
      827222d6
    • Nick French's avatar
      pjproject_bundled: Fix cross-compilation with SSL libs. · 200dc7d0
      Nick French authored
      Asterisk makefiles auto-detect SSL library availability,
      then they assume that pjproject makefiles will also autodetect
      an SSL library at the same time, so they do not pass on the
      autodetection result to pjproject.
      
      This normally works, except the pjproject makefiles disables
      autodetection when cross-compiling.
      
      Fix by explicitly configuring pjproject to use SSL if we
      have been told to use it or it was autodetected
      
      ASTERISK-30424 #close
      
      Change-Id: I8fe2999ea46710e21d1d55a1bed92769c6ebded9
      200dc7d0
    • Mike Bradeen's avatar
      app_read: Add an option to return terminator on empty digits. · 5c11d7ad
      Mike Bradeen authored
      Adds 'e' option to allow Read() to return the terminator as the
      dialed digits in the case where only the terminator is entered.
      
      ie; if "#" is entered, return "#" if the 'e' option is set and ""
      if it is not.
      
      ASTERISK-30411
      
      Change-Id: I49f3221824330a193a20c660f99da0f1fc2cbbc5
      5c11d7ad
    • cmaj's avatar
      res_phoneprov.c: Multihomed SERVER cache prevention · 5b0e3444
      cmaj authored
      Phones moving between subnets on multi-homed server have their
      initially connected interface IP cached in the SERVER variable,
      even when it is not specified in the configuration files. This
      prevents phones from obtaining the correct SERVER variable value
      when they move to another subnet.
      
      ASTERISK-30388 #close
      Reported-by: cmaj
      
      Change-Id: I1d18987a9d58e85556b4c4a6814ce7006524cc92
      5b0e3444
    • Mike Bradeen's avatar
      app_directory: Add a 'skip call' option. · 2308afed
      Mike Bradeen authored
      Adds 's' option to skip calling the extension and instead set the
      extension as DIRECTORY_EXTEN channel variable.
      
      ASTERISK-30405
      
      Change-Id: Ib9d9db1ba5b7524594c640461b4aa8f752db8299
      2308afed
    • Mike Bradeen's avatar
      app_senddtmf: Add option to answer target channel. · 98742388
      Mike Bradeen authored
      Adds a new option to SendDTMF() which will answer the specified
      channel if it is not already up. If no channel is specified, the
      current channel will be answered instead.
      
      ASTERISK-30422
      
      Change-Id: Iddcbd501fcdf9fef0f453b7a8115a90b11f1d085
      98742388
  9. Feb 23, 2023
    • Mike Bradeen's avatar
      res_pjsip: Prevent SEGV in pjsip_evsub_send_request · 37e558f6
      Mike Bradeen authored
      contributed pjproject - patch to check sub->pending_notify
      in evsub.c:on_tsx_state before calling
      pjsip_evsub_send_request()
      
      res_pjsip_pubsub - change post pjsip 2.13 behavior to use
      pubsub_on_refresh_timeout to avoid the ao2_cleanup call on
      the sub_tree. This is is because the final NOTIFY send is no
      longer the last place the sub_tree is referenced.
      
      ASTERISK-30419
      
      Change-Id: Ib5cc662ce578e9adcda312e16c58a10b6453e438
      37e558f6
Loading