Skip to content
Snippets Groups Projects
  1. Aug 16, 2021
    • Sean Bright's avatar
      mgcp: Remove dead debug code · 121860e3
      Sean Bright authored
      ASTERISK-20339 #close
      
      Change-Id: I36f364aaa1971241d8f3ea1a5909b463d185a2d5
      121860e3
    • Joshua C. Colp's avatar
      policy: Add deprecation and removal versions to modules. · 13fd0789
      Joshua C. Colp authored
      app_meetme is deprecated in 19, to be removed in 21.
      app_osplookup is deprecated in 19, to be removed in 21.
      chan_alsa is deprecated in 19, to be removed in 21.
      chan_mgcp is deprecated in 19, to be removed in 21.
      chan_skinny is deprecated in 19, to be removed in 21.
      res_pktccops is deprecated in 19, to be removed in 21.
      cdr_mysql was deprecated in 1.8, to be removed in 19.
      app_mysql was deprecated in 1.8, to be removed in 19.
      app_ices was deprecated in 16, to be removed in 19.
      app_macro was deprecated in 16, to be removed in 21.
      app_fax was deprecated in 16, to be removed in 19.
      app_url was deprecated in 16, to be removed in 19.
      app_image was deprecated in 16, to be removed in 19.
      app_nbscat was deprecated in 16, to be removed in 19.
      app_dahdiras was deprecated in 16, to be removed in 19.
      cdr_syslog was deprecated in 16, to be removed in 19.
      chan_oss was deprecated in 16, to be removed in 19.
      chan_phone was deprecated in 16, to be removed in 19.
      chan_sip was deprecated in 17, to be removed in 21.
      chan_nbs was deprecated in 16, to be removed in 19.
      chan_misdn was deprecated in 16, to be removed in 19.
      chan_vpb was deprecated in 16, to be removed in 19.
      res_config_sqlite was deprecated in 16, to be removed in 19.
      res_monitor was deprecated in 16, to be removed in 21.
      conf2ael was deprecated in 16, to be removed in 19.
      muted was deprecated in 16, to be removed in 19.
      
      ASTERISK-29548
      ASTERISK-29549
      ASTERISK-29550
      ASTERISK-29551
      ASTERISK-29552
      ASTERISK-29553
      ASTERISK-29554
      ASTERISK-29555
      ASTERISK-29557
      ASTERISK-29558
      ASTERISK-29559
      ASTERISK-29560
      ASTERISK-29561
      ASTERISK-29562
      ASTERISK-29563
      ASTERISK-29564
      ASTERISK-29565
      ASTERISK-29566
      ASTERISK-29567
      ASTERISK-29568
      ASTERISK-29569
      ASTERISK-29570
      ASTERISK-29571
      ASTERISK-29572
      ASTERISK-29573
      ASTERISK-29574
      
      Change-Id: Ic3bee31a10d42c4b3bbc913d893f7b2a28a27131
      13fd0789
  2. Jul 22, 2021
    • Kevin Harwell's avatar
      AST-2021-008 - chan_iax2: remote crash on unsupported media format · 2a141a58
      Kevin Harwell authored
      If chan_iax2 received a packet with an unsupported media format, for
      example vp9, then it would set the frame's format to NULL. This could
      then result in a crash later when an attempt was made to access the
      format.
      
      This patch makes it so chan_iax2 now ignores/drops frames received
      with unsupported media format types.
      
      ASTERISK-29392 #close
      
      Change-Id: Ifa869a90dafe33eed8fd9463574fe6f1c0ad3eb1
      2a141a58
  3. May 17, 2021
    • Naveen Albert's avatar
      chan_sip: Expand hook flash recognition. · 7b82587d
      Naveen Albert authored
      Some ATAs send hook flash events as application/hook-flash, rather than a DTMF
      event. Now, we also recognize hook-flash as a flash event.
      
      ASTERISK-29370
      
      Change-Id: I1c3b82a040dff3affcd94bad8ce33edc90c04725
      7b82587d
  4. May 13, 2021
  5. May 04, 2021
    • George Joseph's avatar
      Updates for the MessageSend Dialplan App · 40bdfff7
      George Joseph authored
      Enhancements:
      
       * The MessageSend dialplan application now takes an optional
         third argument that can set the message's "To" field on
         outgoing messages.  It's an alternative to using the
         MESSAGE(to) dialplan function.
      
         NOTE: No channel driver currently implements this field.  A
         follow-on commit for res_pjsip_messaging will implement it for
         the chan_pjsip channel driver.
      
       * To prevent confusion with the first argument, currently named
         "to", it's been renamed to "destination". Its function,
         creating the request URI, hasn't changed.
      
       * The documentation for MessageSend was updated to be
         more clear about the parameters and how they interact
         the MESSAGE() dialplan function.
      
       * With the rename of MessageSend's first parameter, and the fact
         that message.c references <info> elements in chan_sip.c,
         res_pjsip_messaging.c and res_xmpp, they each needed
         documentation updates to use MessageDestinationInfo instead of
         MessageToInfo.
      
       * appdocsxml.dtd was updated to include a missing element
         declaration for "dataType".  This was showing up as an error
         in Eclipse's dtd editor.
      
       * Despite the changes in this commit, there should be
         no impact to current users of MessageSend.
      
      Change-Id: I6fb5b569657a02866a66ea352fd53d30d8ac965a
      40bdfff7
  6. Mar 16, 2021
    • Joshua C. Colp's avatar
      xml: Embed module information into core XML documentation. · 60800b03
      Joshua C. Colp authored
      This change embeds the MODULEINFO block of modules
      into the core XML documentation. This provides a shared
      mechanism for use by both menuselect and Asterisk for
      information and a definitive source of truth.
      
      ASTERISK-29335
      
      Change-Id: Ifbfd5c700049cf320a3e45351ac65dd89bc99d90
      60800b03
  7. Mar 10, 2021
  8. Mar 02, 2021
  9. Feb 23, 2021
    • Alexander Traud's avatar
      chan_sip: Filter pass-through audio/video formats away, again. · 1adf9368
      Alexander Traud authored
      Instead of looking for pass-through formats in the list of transcodable
      formats (which is going to find nothing), go through the result which
      is going to be the jointcaps of the tech_pvt of the channel. Finally,
      only with that list, ast_format_cap_remove(.) is going to succeed.
      
      This restores the behaviour of Asterisk 1.8. However, it does not fix
      ASTERISK_29282 because that issue report is about chan_sip and PJSIP.
      Here, only chan_sip is fixed because PJSIP does not even call
      ast_rtp_instance_available_formats -> ast_translate_available_format.
      
      Change-Id: Icade2366ac2b82935b95a9981678c987da2e8c34
      1adf9368
  10. Feb 12, 2021
    • 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
  11. 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
  12. 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
  13. 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
    • 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
  14. Jan 18, 2021
    • Ben Ford's avatar
      chan_pjsip.c: Add parameters to frame in indicate. · 87a35f8e
      Ben Ford authored
      There are a couple of parameters (datalen and data) that do not get set
      in chan_pjsip_indicate which could cause an Invalid message to pop up
      for things such as fax. This patch adds them to the frame.
      
      Change-Id: Ia51be086a0708be905e73d1f433572c49c7e38f8
      87a35f8e
  15. Jan 13, 2021
    • 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
  16. 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
  17. Jan 06, 2021
    • 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
  18. Dec 31, 2020
  19. Dec 09, 2020
    • Joshua C. Colp's avatar
      pjsip: Match lifetime of INVITE session to our session. · 5b4e71fa
      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
      5b4e71fa
  20. Nov 19, 2020
    • Alexander Traud's avatar
      chan_sip: Remove unused sip_socket->port. · e884d935
      Alexander Traud authored
      12 years ago, with ASTERISK_12115 the last four get/uses of socket.port
      vanished. However, the struct member itself and all seven set/uses
      remained as dead code.
      
      ASTERISK-28798
      
      Change-Id: Ib90516a49eca3d724a70191278aaf2144fb58c59
      e884d935
  21. Nov 03, 2020
    • Alexander Traud's avatar
      Compiler fixes for GCC with -Og · e0ee53dc
      Alexander Traud authored
      ASTERISK-29144
      
      Change-Id: I2a72c072083b4492a223c6f9d73d21f4f424db62
      e0ee53dc
    • Alexander Traud's avatar
      Compiler fixes for GCC when printf %s is NULL · f86af1fb
      Alexander Traud authored
      ASTERISK-29146
      
      Change-Id: Ib04bdad87d729f805f5fc620ef9952f58ea96d41
      f86af1fb
    • Alexander Traud's avatar
      chan_sip: On authentication, pick MD5 for sure. · 5b25c75d
      Alexander Traud authored
      RFC 8760 added new digest-access-authentication schemes. Testing
      revealed that chan_sip does not pick MD5 if several schemes are offered
      by the User Agent Server (UAS). This change does not implement any of
      the new schemes like SHA-256. This change makes sure, MD5 is picked so
      UAS with SHA-2 enabled, like the service www.linphone.org/freesip, can
      still be used. This should have worked since day one because SIP/2.0
      already envisioned several schemes (see RFC 3261 and its augmented BNF
      for 'algorithm' which includes 'token' as third alternative; note: if
      'algorithm' was not present, MD5 is still assumed even in RFC 7616).
      
      Change-Id: I61ca0b1f74b5ec2b5f3062c2d661cafeaf597fcd
      5b25c75d
  22. Sep 22, 2020
  23. Sep 11, 2020
    • George Joseph's avatar
      debugging: Add enough to choke a mule · ad4f2a8c
      George Joseph authored
      Added to:
       * bridges/bridge_softmix.c
       * channels/chan_pjsip.c
       * include/asterisk/res_pjsip_session.h
       * main/channel.c
       * res/res_pjsip_session.c
      
      There NO functional changes in this commit.
      
      Change-Id: I06af034d1ff3ea1feb56596fd7bd6d7939dfdcc3
      ad4f2a8c
  24. Aug 28, 2020
  25. Aug 18, 2020
  26. Jul 08, 2020
    • George Joseph's avatar
      ACN: Add tracing to existing code · 9bd1d686
      George Joseph authored
      Prior to making any modifications to the pjsip infrastructure
      for ACN, I've added the tracing functions to the existing code.
      This should make the final commit easier to review, but we can also
      now run a "before and after" trace.
      
      No functional changes were made with this commit.
      
      Change-Id: Ia83a1a2687ccb96f2bc8a2a3928a5214c4be775c
      9bd1d686
  27. Jul 06, 2020
    • Kevin Harwell's avatar
      PJSIP_MEDIA_OFFER: override configuration on refresh · 4eba6b9e
      Kevin Harwell authored
      When using the PSJIP_MEDIA_OFFER dialplan function it was not
      overriding an endpoint's configured codecs on refresh unless
      they had a shared codec between the two.
      
      This patch makes it so whatever is set using PJSIP_MEDIA_OFFER
      is used when creating the SDP for a refresh no matter what.
      
      ASTERISK-28878 #close
      
      Change-Id: I0f7dc86fd0fb607c308e6f98ede303c54d1eacb6
      4eba6b9e
  28. Jul 01, 2020
    • George Joseph's avatar
      Streams: Add features for Advanced Codec Negotiation · 8d1064ea
      George Joseph authored
      The Streams API becomes the home for the core ACN capabilities.
      These include...
      
       * Parsing and formatting of codec negotation preferences.
       * Resolving pending streams and topologies with those configured
         using configured preferences.
       * Utility functions for creating string representations of
         streams, topologies, and negotiation preferences.
      
      For codec negotiation preferences:
       * Added ast_stream_codec_prefs_parse() which takes a string
         representation of codec negotiation preferences, which
         may come from a pjsip endpoint for example, and populates
         a ast_stream_codec_negotiation_prefs structure.
       * Added ast_stream_codec_prefs_to_str() which does the reverse.
       * Added many functions to parse individual parameter name
         and value strings to their respectrive enum values, and the
         reverse.
      
      For streams:
       * Added ast_stream_create_resolved() which takes a "live" stream
         and resolves it with a configured stream and the negotiation
         preferences to create a new stream.
       * Added ast_stream_to_str() which create a string representation
         of a stream suitable for debug or display purposes.
      
      For topology:
       * Added ast_stream_topology_create_resolved() which takes a "live"
         topology and resolves it, stream by stream, with a configured
         topology stream and the negotiation preferences to create a new
         topology.
       * Added ast_stream_topology_to_str() which create a string
         representation of a topology suitable for debug or display
         purposes.
       * Renamed ast_format_caps_from_topology() to
         ast_stream_topology_get_formats() to be more consistent with
         the existing ast_stream_get_formats().
      
      Additional changes:
       * A new function ast_format_cap_append_names() appends the results
         to the ast_str buffer instead of replacing buffer contents.
      
      Change-Id: I2df77dedd0c72c52deb6e329effe057a8e06cd56
      8d1064ea
  29. Jun 25, 2020
    • Frederic LE FOLL's avatar
      chan_sip: chan_sip does not process 400 response to an INVITE. · a423f935
      Frederic LE FOLL authored
      chan_sip handle_response() function, for a 400 response to an INVITE,
      calls handle_response_invite() and does not generate ACK.
      handle_response_invite() does not recognize 400 response and has no
      default response processing for unexpected responses, thus it does not
      generate ACK either.
      The ACK on response repetition comes from handle_response() mechanism
      "We must re-send ACKs to re-transmitted final responses".
      
      According to code history, 400 response specific processing was
      introduced with commit
      "channels/chan_sip: Add improved support for 4xx error codes"
      This commit added support for :
      - 400/414/493 in handle_response_subscribe() handle_response_register()
        and handle_response().
      - 414/493 only in handle_response_invite().
      
      This fix adds 400 response support in handle_response_invite().
      
      ASTERISK-28957
      
      Change-Id: Ic71a087e5398dfc7273946b9ec6f9a36960218ad
      a423f935
  30. Jun 22, 2020
    • Kevin Harwell's avatar
      chan_pjsip: don't use PJSIP_SC_NULL as it only exists pjproject 2.8+ · 8b925fbd
      Kevin Harwell authored
      A patch made a reference to the PJSIP_SC_NULL enumeration value, which
      was added to pjproject 2.8 and above thus making it so Asterisk would
      fail to compile with prior versions of pjproject.
      
      This patch removes the reference, and instead initializes the value
      to '0'.
      
      ASTERISK-28886 #close
      
      Change-Id: I68491c80da1a0154b2286c9458440141c98db9d7
      8b925fbd
  31. Jun 19, 2020
    • Guido Falsi's avatar
      chan_dadhi: Fix setvar in dahdi channels · d88e2300
      Guido Falsi authored
      The change to how setvar works for various channels performed in
      ASTERISK~23756 missed some required change in the dahdi channel,
      where the variables are actually set while reading configuration.
      This change should fix the issue.
      
      ASTERISK-28955
      
      Change-Id: Ibfeb7f8cbdd735346dc4028de6a265f24f9df274
      d88e2300
  32. Jun 10, 2020
    • George Joseph's avatar
      res_fax: Don't start a gateway if either channel is hung up · 41f3a7da
      George Joseph authored
      When fax_gateway_framehook is called and a gateway hasn't already
      been started, the framehook gets the t38 state for both the current
      channel and the peer.  That call trickles down to the channel
      driver which determines the state.  If either channel is hung up
      (or in the process of being hung up), the channel driver's tech_pvt
      is going to be NULL which, in the case of chan_pjsip, will cause a
      segfault.
      
      * Added a hangup check for both the channel and peer channel
        before starting a fax gateway.
      
      * Added a check for NULL tech_pvt to chan_pjsip_queryoption
        so we don't attempt to reference a tech_pvt that's already
        gone.
      
      ASTERISK-28923
      Reported by: Yury Kirsanov
      
      Change-Id: I4e10e63b667bbb68c1c8623f977488f5d807897c
      41f3a7da
  33. Apr 23, 2020
    • Joshua C. Colp's avatar
      stream: Enforce formats immutability and ensure formats exist. · 1c5e6858
      Joshua C. Colp authored
      Some places in Asterisk did not treat the formats on a stream
      as immutable when they are.
      
      The ast_stream_get_formats function is now const to enforce this
      and parts of Asterisk have been updated to take this into account.
      Some violations of this were also fixed along the way.
      
      An additional minor tweak is that streams are now allocated with
      an empty format capabilities structure removing the need in various
      places to check that one is present on the stream.
      
      ASTERISK-28846
      
      Change-Id: I32f29715330db4ff48edd6f1f359090458a9bfbe
      1c5e6858
  34. Apr 21, 2020
  35. Apr 16, 2020
Loading