Skip to content
Snippets Groups Projects
  1. May 08, 2023
    • 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
  10. Feb 20, 2023
  11. Feb 13, 2023
    • Sean Bright's avatar
      app_queue: Reset all queue defaults before reload. · aef0c0ce
      Sean Bright authored
      Several queue fields were not being set to their default value during
      a reload.
      
      Additionally added some sample configuration options that were missing
      from queues.conf.sample.
      
      Change-Id: I3a88c7877af91752b1b46a0c087384f7eb9c47e4
      aef0c0ce
  12. Feb 07, 2023
    • Mike Bradeen's avatar
      res_pjsip: Upgraded bundled pjsip to 2.13 · 58636a6e
      Mike Bradeen authored
      Removed multiple patches.
      
      Code chages in res_pjsip_pubsub due to changes in evsub.
      
      Pjsip now calls on_evsub_state() before on_rx_refresh(),
      so the sub tree deletion that used to take place in
      on_evsub_state() now must take place in on_rx_refresh().
      
      Additionally, pjsip now requires that you send the NOTIFY
      from within on_rx_refresh(), otherwise it will assert
      when going to send the 200 OK. The idea is that it will
      look for this NOTIFY and cache it until after sending the
      response in order to deal with the self-imposed message
      mis-order. Asterisk previously dealt with this by pushing
      the NOTIFY in on_rx_refresh(), but pjsip now forces us
      to use it's method.
      
      Changes were required to configure in order to detect
      which way pjsip handles this as the two are not
      compatible for the reasons mentioned above.
      
      A corresponding change in testsuite is required in order
      to deal with the small interal timing changes caused by
      moving the NOTIFY send.
      
      ASTERISK-30325
      
      Change-Id: I50b00cac89d950d3511d7b250a1c641965d9fe7f
      58636a6e
  13. Jan 31, 2023
    • Sean Bright's avatar
      doxygen: Fix doxygen errors. · 96d9ad51
      Sean Bright authored
      Change-Id: Ic50e95b4fc10f74ab15416d908e8a87ee8ec2f85
      96d9ad51
    • Naveen Albert's avatar
      app_signal: Add signaling applications · 88b2c741
      Naveen Albert authored
      Adds the Signal and WaitForSignal
      applications, which can be used for inter-channel
      signaling in the dialplan.
      
      Signal supports sending a signal to other channels
      listening for a signal of the same name, with an
      optional data payload. The signal is received by
      all channels waiting for that named signal.
      
      ASTERISK-29810 #close
      
      Change-Id: Ic34439de3d60f8609357666a465c354d81f5fef3
      88b2c741
  14. Jan 30, 2023
    • Mike Bradeen's avatar
      app_directory: add ability to specify configuration file · 70856e86
      Mike Bradeen authored
      Adds option to app_directory to specify a filename from which to
      read configuration instead of voicemail.conf ie;
      
      same => n,Directory(,,c(directory.conf))
      
      This configuration should contain a list of extensions using the
      voicemail.conf format, ie;
      
      2020=2020,Dog Dog,,,,attach=no|saycid=no|envelope=no|delete=no
      
      ASTERISK-30404
      
      Change-Id: Id58ccb1344ad1e563fa10db12f172fbd104a9d13
      70856e86
    • Naveen Albert's avatar
      func_json: Enhance parsing capabilities of JSON_DECODE · 8a45cd7a
      Naveen Albert authored
      Adds support for arrays to JSON_DECODE by allowing the
      user to print out entire arrays or index a particular
      key or print the number of keys in a JSON array.
      
      Additionally, adds support for recursively iterating a
      JSON tree in a single function call, making it easier
      to parse JSON results with multiple levels. A maximum
      depth is imposed to prevent potentially blowing
      the stack.
      
      Also fixes a bug with the unit tests causing an empty
      string to be printed instead of the actual test result.
      
      ASTERISK-29913 #close
      
      Change-Id: I603940b216a3911b498fc6583b18934011ef5d5b
      8a45cd7a
    • sungtae kim's avatar
      res_stasis_snoop: Fix snoop crash · f99849f8
      sungtae kim authored
      Added NULL pointer check and channel lock to prevent resource release
      while the chanspy is processing.
      
      ASTERISK-29604
      
      Change-Id: Ibdc675f98052da32333b19685b1708a3751b6d24
      f99849f8
    • Sean Bright's avatar
      pbx_ael: Global variables are not expanded. · 56051d1a
      Sean Bright authored
      Variable references within global variable assignments are now
      expanded rather than being included literally.
      
      ASTERISK-30406 #close
      
      Change-Id: I136e8d6395e90a4c92d9777a46a7bc3edb08d05d
      56051d1a
  15. Jan 26, 2023
    • Naveen Albert's avatar
      res_pjsip_session: Add overlap_context option. · a1da8042
      Naveen Albert authored
      Adds the overlap_context option, which can be used
      to explicitly specify a context to use for overlap
      dialing extension matches, rather than forcibly
      using the context configured for the endpoint.
      
      ASTERISK-30262 #close
      
      Change-Id: Ibbcd4a8b11402428a187fb56b8d4e7408774a0db
      a1da8042
  16. Jan 13, 2023
    • Sean Bright's avatar
      app_playback.c: Fix PLAYBACKSTATUS regression. · ef16eaee
      Sean Bright authored
      In Asterisk 11, if a channel was redirected away during Playback(),
      the PLAYBACKSTATUS variable would be set to SUCCESS. In Asterisk 12
      (specifically commit 7d9871b3) that
      behavior was inadvertently changed and the same operation would result
      in the PLAYBACKSTATUS variable being set to FAILED. The Asterisk 11
      behavior has been restored.
      
      Partial fix for ASTERISK~25661.
      
      Change-Id: I53f54e56b59b61c99403a481b6cb8d88b5a559ff
      ef16eaee
  17. Jan 12, 2023
Loading