Skip to content
Snippets Groups Projects
  1. Feb 23, 2021
  2. Feb 19, 2021
    • George Joseph's avatar
      res_pjsip_refer: Always serialize calls to refer_progress_notify · dbd8908f
      George Joseph authored
      refer_progress_notify wasn't always being called from the progress
      serializer.  This could allow clearing notification->progress->sub
      in one thread while another was trying to use it.
      
      * Instances where refer_progress_notify was being called in-line,
        have been changed to use ast_sip_push_task().
      
      Change-Id: Idcf1934c4e873f2c82e2d106f8d9f040caf9fa1e
      dbd8908f
  3. Feb 18, 2021
    • Kevin Harwell's avatar
      AST-2021-002: Remote crash possible when negotiating T.38 · fad0cf12
      Kevin Harwell authored
      When an endpoint requests to re-negotiate for fax and the incoming
      re-invite is received prior to Asterisk sending out the 200 OK for
      the initial invite the re-invite gets delayed. When Asterisk does
      finally send the re-inivite the SDP includes streams for both audio
      and T.38.
      
      This happens because when the pending topology and active topologies
      differ (pending stream is not in the active) in the delayed scenario
      the pending stream is appended to the active topology. However, in
      the fax case the pending stream should replace the active.
      
      This patch makes it so when a delay occurs during fax negotiation,
      to or from, the audio stream is replaced by the T.38 stream, or vice
      versa instead of being appended.
      
      Further when Asterisk sent the re-invite with both audio and T.38,
      and the endpoint responded with a declined T.38 stream then Asterisk
      would crash when attempting to change the T.38 state.
      
      This patch also puts in a check that ensures the media state has a
      valid fax session (associated udptl object) before changing the
      T.38 state internally.
      
      ASTERISK-29203 #close
      
      Change-Id: I407f4fa58651255b6a9030d34fd6578cf65ccf09
      fad0cf12
    • Alexander Traud's avatar
      rtp: Enable srtp replay protection · 703158b9
      Alexander Traud authored
      Add option "srtpreplayprotection" rtp.conf to enable srtp
      replay protection.
      
      ASTERISK-29260
      Reported by: Alexander Traud
      
      Change-Id: I5cd346e3c6b6812039d1901aa4b7be688173b458
      703158b9
    • Ivan Poddubnyi's avatar
      res_pjsip_diversion: Fix adding more than one histinfo to Supported · 2770cc58
      Ivan Poddubnyi authored
      New responses sent within a PJSIP sessions are based on those that were
      sent before. Therefore, adding/modifying a header once causes it to be
      sent on all responses that follow.
      
      Sending 181 Call Is Being Forwarded many times first adds "histinfo"
      duplicated more and more, and eventually overflows past the array
      boundary.
      
      This commit adds a check preventing adding "histinfo" more than once,
      and skipping it if there is no more space in the header.
      
      Similar overflow situations can also occur in res_pjsip_path and
      res_pjsip_outbound_registration so those were also modified to
      check the bounds and suppress duplicate Supported values.
      
      ASTERISK-29227
      Reported by: Ivan Poddubny
      
      Change-Id: Id43704a1f1a0293e35cc7f844026f0b04f2ac322
      2770cc58
    • Sean Bright's avatar
      res_rtp_asterisk.c: Fix signed mismatch that leads to overflow · 5a6f2f91
      Sean Bright authored
      ASTERISK-29205 #close
      
      Change-Id: Ib7aa65644e8df76e2378d7613ee7cf751b9d0bea
      5a6f2f91
    • Joshua C. Colp's avatar
      pjsip: Make modify_local_offer2 tolerate previous failed SDP. · acb7ce4f
      Joshua C. Colp authored
      If a remote side is broken and sends an SDP that can not be
      negotiated the call will be torn down but there is a window
      where a second 183 Session Progress or 200 OK that is forked
      can be received that also attempts to negotiate SDP. Since
      the code marked the SDP negotiation as being done and complete
      prior to this it assumes that there is an active local and remote
      SDP which it can modify, while in fact there is not as the SDP
      did not successfully negotiate. Since there is no local or remote
      SDP a crash occurs.
      
      This patch changes the pjmedia_sdp_neg_modify_local_offer2
      function to no longer assume that a previous SDP negotiation
      was successful.
      
      ASTERISK-29196
      
      Change-Id: I22de45916d3b05fdc2a67da92b3a38271ee5949e
      acb7ce4f
  4. Feb 17, 2021
    • Ben Ford's avatar
      core_unreal: Fix T.38 faxing when using local channels. · 62e2dd48
      Ben Ford authored
      After some changes to streams and topologies, receiving fax through
      local channels stopped working. This change adds a stream topology with
      a stream of type IMAGE to the local channel pair and allows fax to be
      received.
      
      ASTERISK-29035 #close
      
      Change-Id: Id103cc5c9295295d8e68d5628e76220f8f17e9fb
      62e2dd48
  5. Feb 12, 2021
    • Boris P. Korzun's avatar
      format_wav: Support of MIME-type for wav16 · 57d130d3
      Boris P. Korzun authored
      Provided a support of a MIME-type for wav16. Added new MIME-type
      for classic wav.
      
      ASTERISK-29275 #close
      
      Change-Id: I749bda287ba1ab20c1e0af5e4c0153817d47873b
      57d130d3
    • Alexander Traud's avatar
      chan_sip: Allow [peer] without audio (text+video). · 45e48e38
      Alexander Traud authored
      Two previous commits, 620d9f47 and 6d980de2, allow to set up a call
      without audio, again. That was introduced originally with commit f04d5fb8
      but changed and broke over time. The original commit missed one
      scenario: A [peer] section in sip.conf, which does not allow audio at
      all. In that case, chan_sip rejected the call, although even when the
      requester offered no audio. Now, chan_sip does not check whether there
      is no audio format but checks whether there is no format in general. In
      other words, if there is at least one format to offer, the call succeeds.
      
      However, to prevent calls with no-audio, chan_sip still rejects calls
      when both call parties (caller = requester of the call *and* callee =
      [peer] section in sip.conf) included audio. In such a case, it is
      expected that the call should have audio.
      
      ASTERISK-29280
      
      Change-Id: I0fb74faf51ef22a60c10b467df6a4d1c1943b73e
      45e48e38
  6. Feb 09, 2021
    • George Joseph's avatar
      chan_iax2.c: Require secret and auth method if encryption is enabled · 28f187d6
      George Joseph authored
      If there's no secret specified for an iax2 peer and there's no secret
      specified in the dial string, Asterisk will crash if the auth method
      requested by the peer is MD5 or plaintext.  You also couldn't specify
      a default auth method in the [general] section of iax.conf so if you
      don't have static peers defined and just use the dial string, Asterisk
      will still crash even if you have a secret specified in the dial string.
      
      * Added logic to iax2_call() and authenticate_reply() to print
        a warning and hanhup the call if encryption is requested and
        there's no secret or auth method.  This prevents the crash.
      
      * Added the ability to specify a default "auth" in the [general]
        section of iax.conf.
      
      ASTERISK-29624
      Reported by: N A
      
      Change-Id: I5928e16137581f7d383fcc7fa04ad96c919e6254
      28f187d6
  7. Feb 04, 2021
  8. Feb 03, 2021
    • Alexander Traud's avatar
      chan_sip: Set up calls without audio (text+video), again. · 87ad1138
      Alexander Traud authored
      The previous commit 6d980de2 fixed this issue in the core of Asterisk.
      With that, each channel technology can be used without audio
      theoretically. Practically, the channel-technology driver chan_sip
      turned out to have an invalid check preventing that. chan_sip tested
      whether there is at least one audio format. However, chan_sip has to
      test whether there is at least one format. More cannot be tested while
      requesting chan_sip because only the [general] capabilities but not the
      [peer] caps are known yet. And the [peer] caps might not be a subset or
      show any intersection with the [general] caps. This change here fixes
      this.
      
      The original commit f04d5fb8, thirteen years ago, contained a software
      bug as it passed ANY audio capability to the channel-technology driver.
      Instead, it should have passed NO audio format. Therefore, this
      addressed issue here was not noticed in Asterisk 1.6.x and Asterisk 1.8.
      Then, Asterisk 10 changed that from ANY to NO, but nobody reported since
      then.
      
      ASTERISK-29265
      
      Change-Id: Ic16a3bf13cd1b5c4fc4041ed74961177d96b600f
      87ad1138
  9. Jan 27, 2021
    • Dan Cropp's avatar
      chan_pjsip, app_transfer: Add TRANSFERSTATUSPROTOCOL variable · 08881628
      Dan Cropp authored
      When a Transfer/REFER is executed, TRANSFERSTATUSPROTOCOL variable is
      0 when no protocl specific error
      SIP example of failure, 3xx-6xx for the SIP error code received
      
      This allows applications to perform actions based on the failure
      reason.
      
      ASTERISK-29252 #close
      Reported-by: Dan Cropp
      
      Change-Id: Ia6a94784b4925628af122409cdd733c9f29abfc4
      08881628
    • roadkill's avatar
      res/res_pjsip.c: allow user=phone when number contain *# · 176274ca
      roadkill authored
      if From number contain * or # asterisk will not add user=phone
      
      Currently only number that uses AST_DIGIT_ANYNUM can have "user=phone" but the validation should use AST_DIGIT_ANY
      this is a problem when you want to send call to ISUP
      as they will disregard the From header and either replace From with anonymous or with p-asserted-identity
      
      ASTERISK-29261
      Reported by: Mark Petersen
      Tested by: Mark Petersen
      
      Change-Id: I3307bdbf757582740bfee4110e85f7b6c9291cc4
      176274ca
    • Alexander Traud's avatar
      channel: Set up calls without audio (text+video), again. · f64ddf3d
      Alexander Traud authored
      ASTERISK-29259
      
      Change-Id: Ib6a6550e0e08355745d66da8e60ef49e81f9c6c5
      f64ddf3d
    • Alexander Traud's avatar
      chan_sip: SDP: Reject audio streams correctly. · 4c154f34
      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
      4c154f34
    • Ivan Poddubnyi's avatar
      main/frame: Add missing control frame names to ast_frame_subclass2str · 7c0fbaf0
      Ivan Poddubnyi authored
      Log proper control frame names instead of "Unknown control '14'", etc.
      
      Change-Id: I1724f2f4d1b064b25a5c93a7da0cb03be5143935
      7c0fbaf0
  10. Jan 25, 2021
  11. Jan 18, 2021
  12. Jan 14, 2021
  13. Jan 13, 2021
    • Jean Aunis's avatar
      Stasis/messaging: tech subscriptions conflict with endpoint subscriptions. · c10557c4
      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
      c10557c4
    • Ivan Poddubnyi's avatar
      chan_pjsip: Assign SIPDOMAIN after creating a channel · c3fad2fd
      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
      c3fad2fd
    • Alexander Traud's avatar
      chan_sip: SDP: Sidestep stream parsing when its media is disabled. · ad606d4a
      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
      ad606d4a
  14. Jan 11, 2021
    • Ivan Poddubnyi's avatar
      chan_pjsip: Stop queueing control frames twice on outgoing channels · cc496044
      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
      cc496044
    • roadkill's avatar
      contrib/systemd: Added note on common issues with systemd and asterisk · cba8426b
      roadkill 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
      cba8426b
    • George Joseph's avatar
      Revert "res_pjsip_outbound_registration.c: Use our own scheduler and other stuff" · b3927ff8
      George Joseph authored
      This reverts commit 860e40dd.
      
      Reason for revert: Too many issues reported.  Need to research and correct.
      
      ASTERISK-29230
      ASTERISK-29231
      Reported by: Michael Maier
      
      Change-Id: I9011e2eecda4e91e1cfeeda6d1a7f1a0453eab41
      b3927ff8
  15. Jan 06, 2021
    • Jaco Kroon's avatar
      func_lock: fix multiple-channel-grant problems. · 3a230cc6
      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>
      3a230cc6
    • Jaco Kroon's avatar
      pbx_lua: Add LUA_VERSIONS environment variable to ./configure. · 49f625b8
      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>
      49f625b8
    • Dan Cropp's avatar
      chan_pjsip: Incorporate channel reference count into transfer_refer(). · fb23f985
      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
      fb23f985
    • Kevin Harwell's avatar
      app_mixmonitor: cleanup datastore when monitor thread fails to launch · 0e1ba9a7
      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
      0e1ba9a7
    • Sean Bright's avatar
      app_voicemail: Prevent deadlocks when out of ODBC database connections · 9ff548f1
      Sean Bright authored
      ASTERISK-28992 #close
      
      Change-Id: Ia7d608924036139ee2520b840d077762d02668d0
      9ff548f1
    • Kevin Harwell's avatar
      pbx_realtime: wrong type stored on publish of ast_channel_snapshot_type · d9aef0e6
      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
      d9aef0e6
    • Sean Bright's avatar
      asterisk: Export additional manager functions · 68d3d3af
      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
      68d3d3af
  16. Jan 04, 2021
    • Nick French's avatar
      res_pjsip: Prevent segfault in UDP registration with flow transports · 3c8598ff
      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
      3c8598ff
Loading