Skip to content
Snippets Groups Projects
  1. Jan 27, 2021
    • Alexander Traud's avatar
      chan_sip: SDP: Reject audio streams correctly. · 4aff42b2
      Alexander Traud authored
      This completes the fix for ASTERISK_24543. Only when the call is an
      outgoing call, consult and append the configured format capabilities
      (p->caps). When all audio formats got rejected the negotiated format
      capabilities (p->jointcaps) contain no audio formats for incoming
      calls. This is required when there are other accepted media streams.
      
      ASTERISK-29258
      
      Change-Id: I8bab31c7f3f3700dce204b429ad238a524efebb9
      4aff42b2
    • Ivan Poddubnyi's avatar
      main/frame: Add missing control frame names to ast_frame_subclass2str · 05472da9
      Ivan Poddubnyi authored
      Log proper control frame names instead of "Unknown control '14'", etc.
      
      Change-Id: I1724f2f4d1b064b25a5c93a7da0cb03be5143935
      05472da9
  2. Jan 25, 2021
  3. Jan 18, 2021
  4. Jan 14, 2021
    • Robert Cripps's avatar
      res/res_pjsip_session.c: Check that media type matches in · 24e678b9
      Robert Cripps authored
      function ast_sip_session_media_state_add.
      
      Check ast_media_type matches when a ast_sip_session_media is found
      otherwise when transitioning from say image to audio, the wrong
      session is returned in the first if statement.
      
      ASTERISK-29220 #close
      
      Change-Id: I6f6efa9b821ebe8881bb4c8c957f8802ddcb4b5d
      24e678b9
  5. Jan 13, 2021
    • Jean Aunis's avatar
      Stasis/messaging: tech subscriptions conflict with endpoint subscriptions. · c5596678
      Jean Aunis authored
      When both a tech subscription and an endpoint subscription exist for a given
      endpoint, TextMessageReceived events are dispatched to the tech subscription
      only.
      
      ASTERISK-29229
      
      Change-Id: I9eac4cba5f9e27285a282509395347abc58fc2b8
      c5596678
    • Alexander Traud's avatar
      chan_sip: SDP: Sidestep stream parsing when its media is disabled. · 1c05667c
      Alexander Traud authored
      Previously, chan_sip parsed all known media streams in an SDP offer
      like video (and text) even when videosupport=no (and textsupport=no).
      This wasted processor power. Furthermore, chan_sip accepted SDP offers,
      including no audio but just video (or text) streams although
      videosupport=no (or textsupport=no). Finally, chan_sip denied the whole
      offer instead of individual streams when they had encryption (SDES-sRTP)
      unexpectedly enabled.
      
      ASTERISK-29238
      ASTERISK-29237
      ASTERISK-29222
      
      Change-Id: Ie49e4e2a11f0265f914b684738348ba8c0f89755
      1c05667c
    • Ivan Poddubnyi's avatar
      chan_pjsip: Assign SIPDOMAIN after creating a channel · f2aa6c70
      Ivan Poddubnyi authored
      session->channel doesn't exist until chan_pjsip creates it, so intead of
      setting a channel variable every new incoming call sets one and the same
      global variable.
      
      This patch moves the code to chan_pjsip so that SIPDOMAIN is set on
      a newly created channel, it also removes a misleading reference to
      channel->session used to fetch call pickup configuraion.
      
      ASTERISK-29240
      
      Change-Id: I90c9bbbed01f5d8863585631a29322ae4e046755
      f2aa6c70
  6. Jan 11, 2021
    • Ivan Poddubnyi's avatar
      chan_pjsip: Stop queueing control frames twice on outgoing channels · 134d2e72
      Ivan Poddubnyi authored
      The fix for ASTERISK-27902 made chan_pjsip process SIP responses twice.
      This resulted in extra noise in logs (for example, "is making progress"
      and "is ringing" get logged twice by app_dial), as well as in noise in
      signalling: one incoming 183 Session Progress results in 2 outgoing 183-s.
      
      This change splits the response handler into 2 functions:
       - one for updating HANGUPCAUSE, which is still called twice,
       - another that does the rest, which is called only once as before.
      
      ASTERISK-28016
      Reported-by: Alex Hermann
      
      ASTERISK-28549
      Reported-by: Gant Liu
      
      ASTERISK-28185
      Reported-by: Julien
      
      Change-Id: I0a1874be5bb5ed12d572d17c7f80de6e5e542940
      134d2e72
    • Jaco Kroon's avatar
      contrib/systemd: Added note on common issues with systemd and asterisk · 2d344177
      Jaco Kroon authored
      With newer version of linux /var/run/ is a symlink to /run/ that has
      been turned into tmpfs.
      
      Added note that if asterisk has to bind to a specific IP that
      systemd has to wait until the network is up.
      
      Added note on how to make sure that the environment variable
      HOSTNAME is included.
      
      ASTERISK-29216
      Reported by: Mark Petersen
      Tested by: Mark Petersen
      
      Change-Id: Ib3e560655befd3e99eec743687144f5569533379
      2d344177
    • George Joseph's avatar
      Revert "res_pjsip_outbound_registration.c: Use our own scheduler and other stuff" · 9a4486e9
      George Joseph authored
      This reverts commit 2fe76dd8.
      
      Reason for revert: Too many issues reported.  Need to research and correct.
      
      ASTERISK-29230
      ASTERISK-29231
      Reported by: Michael Maier
      
      Change-Id: I6453af680e17d8ffe7af2c5de7e1b2a58c8793cb
      9a4486e9
  7. Jan 06, 2021
    • Jaco Kroon's avatar
      func_lock: fix multiple-channel-grant problems. · c7975009
      Jaco Kroon authored
      
      Under contention it becomes possible that multiple channels will be told
      they successfully obtained the lock, which is a bug.  Please refer
      
      ASTERISK-29217
      
      This introduces a couple of changes.
      
      1.  Replaces requesters ao2 container with simple counter (we don't
          really care who is waiting for the lock, only how many).  This is
          updated undex ->mutex to prevent memory access races.
      2.  Correct semantics for ast_cond_timedwait() as described in
          pthread_cond_broadcast(3P) is used (multiple threads can be released
          on a single _signal()).
      3.  Module unload races are taken care of and memory properly cleaned
          up.
      
      Change-Id: I6f68b5ec82ff25b2909daf6e4d19ca864a463e29
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      c7975009
    • Jaco Kroon's avatar
      pbx_lua: Add LUA_VERSIONS environment variable to ./configure. · 4e038c1e
      Jaco Kroon authored
      
      On Gentoo it's possible to have multiple lua versions installed, all
      with a path of /usr, so it's not possible to use the current --with-lua
      option to determisticly pin to a specific version as is required by the
      Gentoo PMS standards.
      
      This environment variable allows to lock to specific versions,
      unversioned check will be skipped if this variable is supplied.
      
      Change-Id: I8c403eda05df25ee0193960262ce849c7d2fd088
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      4e038c1e
    • Kevin Harwell's avatar
      app_mixmonitor: cleanup datastore when monitor thread fails to launch · 3bcf4833
      Kevin Harwell authored
      launch_monitor_thread is responsible for creating and initializing
      the mixmonitor, and dependent data structures. There was one off
      nominal path after the datastore gets created that triggers when
      the channel being monitored is hung up prior to monitor starting
      itself.
      
      If this happened the monitor thread would not "launch", and the
      mixmonitor object and associated objects are freed, including the
      underlying datastore data object. However, the datastore itself was
      not removed from the channel, so when the channel eventually gets
      destroyed it tries to access the previously freed datastore data
      and crashes.
      
      This patch removes and frees datastore object itself from the channel
      before freeing the mixmonitor object thus ensuring the channel does
      not call it when destroyed.
      
      ASTERISK-28947 #close
      
      Change-Id: Id4f9e958956d62473ed5ff06c98ae3436e839ff8
      3bcf4833
    • Sean Bright's avatar
      app_voicemail: Prevent deadlocks when out of ODBC database connections · 44d68bd5
      Sean Bright authored
      ASTERISK-28992 #close
      
      Change-Id: Ia7d608924036139ee2520b840d077762d02668d0
      44d68bd5
    • Dan Cropp's avatar
      chan_pjsip: Incorporate channel reference count into transfer_refer(). · ffa87eca
      Dan Cropp authored
      Add channel reference count for PJSIP REFER. The call could be terminated
      prior to the result of the transfer. In that scenario, when the SUBSCRIBE/NOTIFY
      occurred several minutes later, it would attempt to access a session which was
      no longer valid.  Terminate event subscription if pjsip_xfer_initiate() or
      pjsip_xfer_send_request() fails in transfer_refer().
      
      ASTERISK-29201 #close
      Reported-by: Dan Cropp
      
      Change-Id: I3fd92fd14b4e3844d3d7b0f60fe417a4df5f2435
      ffa87eca
    • Kevin Harwell's avatar
      pbx_realtime: wrong type stored on publish of ast_channel_snapshot_type · 4274a4a7
      Kevin Harwell authored
      A prior patch segmented channel snapshots, and changed the underlying
      data object type associated with ast_channel_snapshot_type stasis
      messages. Prior to Asterisk 18 it was a type ast_channel_snapshot, but
      now it type ast_channel_snapshot_update.
      
      When publishing ast_channel_snapshot_type in pbx_realtime the
      ast_channel_snapshot was being passed in as the message data
      object. When a handler, expecting a data object type of
      ast_channel_snapshot_update, dereferenced this value a crash
      would occur.
      
      This patch makes it so pbx_realtime now uses the expected type, and
      channel snapshot publish method when publishing.
      
      ASTERISK-29168 #close
      
      Change-Id: I9a2cfa0ec285169317f4b9146e4027da8a4fe896
      4274a4a7
    • Sean Bright's avatar
      asterisk: Export additional manager functions · 1b74555f
      Sean Bright authored
      Rename check_manager_enabled() and check_webmanager_enabled() to begin
      with ast_ so that the symbols are automatically exported by the
      linker.
      
      ASTERISK~29184
      
      Change-Id: I85762b9a5d14500c15f6bad6507138c8858644c9
      1b74555f
  8. Jan 04, 2021
    • Nick French's avatar
      res_pjsip: Prevent segfault in UDP registration with flow transports · 505939c9
      Nick French authored
      Segfault occurs during outbound UDP registration when all
      transport states are being iterated over. The transport object
      in the transport is accessed, but flow transports have a NULL
      transport object.
      
      Modify to not iterate over any flow transport
      
      ASTERISK-29210 #close
      
      Change-Id: If28dc3a18bdcbd0a49598b09b7fe4404d45c996a
      505939c9
    • Alexander Traud's avatar
      codecs: Remove test-law. · 80c14f74
      Alexander Traud authored
      This was dead code, test code introduced with Asterisk 13. This was
      found while analyzing ASTERISK_28416 and ASTERISK_29185. This change
      partly fixes, not closes those two issues.
      
      Change-Id: I42d0daa37f6f334c7d86672f06f085858a3f3940
      80c14f74
    • Torrey Searle's avatar
      res/res_pjsip_diversion: prevent crash on tel: uri in History-Info · 51e2187a
      Torrey Searle authored
      Add a check to see if the URI is a Tel URI and prevent crashing on
      trying to retrieve the reason parameter.
      
      ASTERISK-29191
      ASTERISK-29219
      
      Change-Id: I0320aa205f22cda511d60a2edf2b037e8fd6cc37
      (cherry picked from commit a7aea71e)
      51e2187a
  9. Dec 31, 2020
  10. Dec 28, 2020
  11. Dec 23, 2020
  12. Dec 17, 2020
    • Sean Bright's avatar
      app_chanspy: Spyee information missing in ChanSpyStop AMI Event · 357510ce
      Sean Bright authored
      The documentation in the wiki says there should be spyee-channel
      information elements in the ChanSpyStop AMI event.
      
          https://wiki.asterisk.org/wiki/x/Xc5uAg
      
      However, this is not the case in Asterisk <= 16.10.0 Version. We're
      using these Spyee* arguments since Asterisk 11.x, so these arguments
      vanished in Asterisk 12 or higher.
      
      For maximum compatibility, we still send the ChanSpyStop event even if
      we are not able to find any 'Spyee' information.
      
      ASTERISK-28883 #close
      
      Change-Id: I81ce397a3fd614c094d043ffe5b1b1d76188835f
      357510ce
    • Sungtae Kim's avatar
      res_ari: Fix wrong media uri handle for channel play · 91fc57f5
      Sungtae Kim authored
      Fixed wrong null object handle in
      /channels/<channel_id>/play request handler.
      
      ASTERISK-29188
      
      Change-Id: I6691c640247a51ad15f23e4a203ca8430809bafe
      91fc57f5
    • George Joseph's avatar
      logger.c: Automatically add a newline to formats that don't have one · 7d4ae7dc
      George Joseph authored
      Scope tracing allows you to not specify a format string or variable,
      in which case it just prints the indent, file, function, and line
      number.  The trace output automatically adds a newline to the end
      in this case.  If you also have debugging turned on for the module,
      a debug message is also printed but the standard log functionality
      which prints it doesn't add the newline so you have messages
      that don't break correctly.
      
       * format_log_message_ap(), which is the common log
         message formatter for all channels, now adds a
         newline to the end of format strings that don't
         already have a newline.
      
      ASTERISK-29209
      Reported by: Alexander Traud
      
      Change-Id: I994a7df27f88df343b7d19f3e81a4b562d9d41da
      7d4ae7dc
    • Pirmin Walthert's avatar
      res_pjsip_nat.c: Create deep copies of strings when appropriate · 0b109958
      Pirmin Walthert authored
      In rewrite_uri asterisk was not making deep copies of strings when
      changing the uri. This was in some cases causing garbage in the route
      header and in other cases even crashing asterisk when receiving a
      message with a record-route header set. Thanks to Ralf Kubis for
      pointing out why this happens. A similar problem was found in
      res_pjsip_transport_websocket.c. Pjproject needs as well to be patched
      to avoid garbage in CANCEL messages.
      
      ASTERISK-29024 #close
      
      Change-Id: Ic5acd7fa2fbda3080f5f36ef12e46804939b198b
      0b109958
  13. Dec 16, 2020
  14. Dec 09, 2020
    • Joshua C. Colp's avatar
      pjsip: Match lifetime of INVITE session to our session. · 6475fe3d
      Joshua C. Colp authored
      In some circumstances it was possible for an INVITE
      session to be destroyed while we were still using it.
      This occurred due to the reference on the INVITE session
      being released internally as a result of its state
      changing to DISCONNECTED.
      
      This change adds a reference to the INVITE session
      which is released when our own session is destroyed,
      ensuring that the INVITE session remains valid for
      the lifetime of our session.
      
      ASTERISK-29022
      
      Change-Id: I300c6d9005ff0e6efbe1132daefc7e47ca6228c9
      6475fe3d
    • Sean Bright's avatar
      res_http_media_cache.c: Set reasonable number of redirects · 90fd1fd9
      Sean Bright authored
      By default libcurl does not follow redirects, so we explicitly enable
      it by setting CURLOPT_FOLLOWLOCATION. Once that is enabled, libcurl
      will follow up to CURLOPT_MAXREDIRS redirects, which by default is
      configured to be unlimited.
      
      This patch sets CURLOPT_MAXREDIRS to a more reasonable default (8). If
      we determine at some point that this needs to be increased on
      configurable it is a trivial change.
      
      ASTERISK-29173 #close
      
      Change-Id: I4925ebbcf0c7d728bb9252b3795b3479ae225b30
      90fd1fd9
    • lvl's avatar
      Introduce astcachedir, to be used for temporary bucket files · b0842713
      lvl authored
      As described in the issue, /tmp is not a suitable location for a
      large amount of cached media files, since most distributions make
      /tmp a RAM-based tmpfs mount with limited capacity.
      
      I opted for a location that can be configured separately, as opposed
      to using a subdirectory of spooldir, given the different storage
      profile (transient files vs files that might stay there indefinitely).
      
      This commit just makes the cache directory configurable, and changes
      the default location from /tmp to /var/cache/asterisk.
      
      ASTERISK-29143
      
      Change-Id: Ic54e95199405abacd9e509cef5f08fa14c510b5d
      b0842713
  15. Dec 03, 2020
  16. Dec 01, 2020
    • Stanislav's avatar
      res_pjsip_stir_shaken: Fix module description · ab7a08b4
      Stanislav authored
      the 'J' is missing in module description.
      "PSIP STIR/SHAKEN Module for Asterisk" -> "PJSIP STIR/SHAKEN Module for Asterisk"
      
      ASTERISK-29175 #close
      
      Change-Id: I17da008540ee2e8496b644d05f995b320b54ad7a
      ab7a08b4
    • Joshua C. Colp's avatar
      voicemail: add option 'e' to play greetings as early media · eda3679c
      Joshua C. Colp authored
      When using this option, answering the channel is deferred until
      all prompts/greetings have been played and the caller is about
      to leave their message.
      
      ASTERISK-29118 #close
      
      Change-Id: I41b9f0428783c0bd697c8c994f906d1e75ce9ddb
      eda3679c
Loading