Skip to content
Snippets Groups Projects
  1. Apr 16, 2015
    • George Joseph's avatar
      pjsip_options: Add qualify_timeout processing and eventing · 51886c68
      George Joseph authored
      This is the second follow-on to https://reviewboard.asterisk.org/r/4572/ and the
      discussion at
      http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html
      
      
      
      The basic issues are that changes in contact status don't cause events to be
      emitted for the associated endpoint.  Only dynamic contact add/delete actions
      update the endpoint.  Also, the qualify timeout is fixed by pjsip at 32 seconds
      which is a long time.
      
      This patch makes use of the new transaction timeout feature in r4585 and
      provides the following capabilities...
      
      1.  A new aor/contact variable 'qualify_timeout' has been added that allows the
      user to specify the maximum time in milliseconds to wait for a response to an
      OPTIONS message.  The default is 3000ms.  When the timer expires, the contact is
      marked unavailable.
      
      2.  Contact status changes are now propagated up to the endpoint as follows...
      When any contact is 'Available', the endpoint is marked as 'Reachable'.  When
      all contacts are 'Unavailable', the endpoint is marked as 'Unreachable'.  The
      existing endpoint events are generated appropriately.
      
      ASTERISK-24863 #close
      
      Change-Id: Id0ce0528e58014da1324856ea537e7765466044a
      Tested-by: Dmitriy Serov
      Tested-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      51886c68
    • George Joseph's avatar
      res_pjsip: Refactor endpt_send_request to include transaction timeout · ab6382ca
      George Joseph authored
      This is the first follow-on to https://reviewboard.asterisk.org/r/4572/ and the
      discussion at
      http://lists.digium.com/pipermail/asterisk-dev/2015-March/073921.html
      
      
      
      Since we currently have no control over pjproject transaction timeout, this
      patch pulls the pjsip_endpt_send_request function out of pjproject and into
      res_pjsip/endpt_send_transaction in order to implement that capability.
      
      Now when the transaction is initiated, we also schedule our own pj_timer with
      our own desired timeout.
      
      If the transaction completes before either timeout, pjproject cancels its timer,
      and calls our tsx callback where we cancel our timer and run the app callback.
      
      If the pjproject timer times out first, pjproject calls our tsx callback where
      we cancel our timer and run the app callback.
      
      If our timer times out first, we terminate the transaction which causes
      pjproject to cancel its timer and call our tsx callback where we run the app
      callback.
      
      Regardless of the scenario, pjproject is calling the tsx callback inside the
      group_lock and there are checks in the callback to make sure it doesn't run
      twice.
      
      As part of this patch ast_sip_send_out_of_dialog_request was created to replace
      its similarly named private function.  It takes a new timeout argument in
      milliseconds (<= 0 to disable the timeout).
      
      ASTERISK-24863 #close
      Reported-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      Tested-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      
      Change-Id: I0778dc730d9689c5147a444a04aee3c1026bf747
      ab6382ca
  2. Apr 14, 2015
    • Corey Farrell's avatar
      Build System: Create Makefile macro MOD_ADD_SOURCE. · 62508d68
      Corey Farrell authored
      This new macro allows a single line to add all additional
      sources to a module.  This helps prevent modules from
      missing steps, and makes future changes easier since
      they can be made in a single place.
      
      ASTERISK-24960 #close
      Reported by: Corey Farrell
      
      Change-Id: I38f12d8b72c5e7bb37a879b2fb51761a2855eb4b
      62508d68
  3. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  4. Apr 12, 2015
    • George Joseph's avatar
      Add .gitignore and .gitreview files · b35e184d
      George Joseph authored
      Add the .gitignore and .gitreview files to the asterisk repo.
      
      NB:  You can add local ignores to the .git/info/exclude file
      without having to do a commit.
      
      Common ignore patterns are in the top-level .gitignore file.
      Subdirectory-specific ignore patterns are in their own .gitignore
      files.
      
      Change-Id: I842a1588ff27d8a0189f12d597f0a7af033d6c69
      Tested-by: George Joseph
      b35e184d
  5. Apr 11, 2015
  6. Apr 10, 2015
    • Richard Mudgett's avatar
      chan_pjsip/res_pjsip/bridge_softmix/core: Improve translation path choices. · c499cabf
      Richard Mudgett authored
      With this patch, chan_pjsip/res_pjsip now sets the native formats to the
      codecs negotiated by a call.
      
      * The changes in chan_pjsip.c and res_pjsip_sdp_rtp.c set the native
      formats to include all the negotiated audio codecs instead of only the
      initial preferred audio codec and later the currently received audio
      codec.
      
      * The audio frame handling in channel.c:ast_read() is more streamlined and
      will automatically adjust to changes in received frame formats.  The new
      policy is to remove translation and pass the new frame format to the
      receiver except if the translation was to a signed linear format.  A more
      long winded version is commented in ast_read() along with some caveats.
      
      * The audio frame handling in channel.c:ast_write() is more streamlined
      and will automatically adjust any needed translation to changes in the
      frame formats sent.  Frame formats sent can change for many reasons such
      as a recording is being played back or the bridged peer changed the format
      it sends.  Since it is a normal expectation that sent formats can change,
      the codec mismatch warning message is demoted to a debug message.
      
      * Removed the short circuit check in
      channel.c:ast_channel_make_compatible_helper().  Two party bridges need to
      make channels compatible with each other.  However, transfers and moving
      channels among bridges can result in otherwise compatible channels having
      sub-optimal translation paths if the make compatible check is short
      circuited.  A result of forcing the reevaluation of channel compatibility
      is that the asterisk.conf:transcode_via_slin and codecs.conf:genericplc
      options take effect consistently now.  It is unfortunate that these two
      options are enabled by default and negate some of the benefits to the
      changes in channel.c:ast_read() by forcing translation through signed
      linear on a two party bridge.
      
      * Improved the softmix bridge technology to better control the translation
      of frames to the bridge.  All of the incoming translation is now normally
      handled by ast_read() instead of splitting any translation steps between
      ast_read() and the slin factory.  If any frame comes in with an unexpected
      format then the translation path in ast_read() is updated for the next
      frame and the slin factory handles the current frame translation.
      
      This is the final patch in a series of patches aimed at improving
      translation path choices.  The other patches are on the following reviews:
      https://reviewboard.asterisk.org/r/4600/
      https://reviewboard.asterisk.org/r/4605/
      
      ASTERISK-24841 #close
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/4609/
      ........
      
      Merged revisions 434671 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      c499cabf
    • Matthew Jordan's avatar
      res_pjsip: Add an 'auto' option for DTMF Mode · 8bae18ab
      Matthew Jordan authored
      This patch adds support for automatically detecting the type of DTMF that a
      PJSIP endpoint supports. When the 'dtmf_mode' endpoint option is set to 'auto',
      the channel created for an endpoint will attempt to determine if RFC 4733
      DTMF is supported. If so, it will use that DTMF type. If not, the DTMF type
      for the channel will be set to inband.
      
      Review: https://reviewboard.asterisk.org/r/4438
      
      ASTERISK-24706 #close
      Reported by: yaron nahum
      patches:
        yaron_patch_3_Feb.diff submitted by yaron nahum (License 6676)
      ........
      
      Merged revisions 434637 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8bae18ab
    • George Joseph's avatar
      res_pjsip_config_wizard: Cleanup load unload · f69e46de
      George Joseph authored
      While investigating other unload issues I realized that the load/unload process 
      for the config wizard was pretty ugly so I've refactored it as follows...
      
      When the res_pjsip sorcery instance is created the config_wizard bumps it's own 
      module reference to prevent it from unloading while the sorcery instance is 
      still active.  When res_pjsip unloads and it's sorcery instance is destroyed, 
      the config wizard unrefs itself which then allows itself to unload cleanly.  
      Since the config wizard now can't load after res_pjsip or unload before it 
      (which should have been the correct behavior all along), I was able to remove 
      the chunks of code in both load_module and unload_module that handled that case.
      
      Ran the testsuite tests to insure there were no functional changes and REF_DEBUG 
      to insure that Asterisk was shutting down cleanly with no FRACKs or leaks.
      
      Tested-by: George Joseph
      Review: https://reviewboard.asterisk.org/r/4610/
      ........
      
      Merged revisions 434619 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434620 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      f69e46de
    • Matthew Jordan's avatar
      res/ari: Fix model validation for ChannelHold event · 894153b8
      Matthew Jordan authored
      When the ChannelHold event was added, the 'musicclass' parameter was
      erroneously removed. This caused the ChannelHold events to be rejected as
      they failed model validation. This patch updates the Swagger schema such that
      it now properly reflects the event that is being created.
      
      Hooray for tests that catch things like this.
      ........
      
      Merged revisions 434597 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      894153b8
  7. Apr 09, 2015
    • George Joseph's avatar
      res_pjsip_phoneprov_provider: Fix reference leak on unload · ed6b6e3c
      George Joseph authored
      res_pjsip_phoneprov_provider was leaking references to phoneprov objects due to 
      a missing OBJ_NODATA in an ao2_callback in load_users().  Rather than adding the 
      OBJ_NODATA, I changed load_users to use a more straightforward ao2_iterator.  
      This plugged the leak but exposed an unload order issue between 
      res_pjsip_phoneprov_provider, res_phoneprov and res_pjsip.
      
      res_pjsip_phoneprov_provider unloads first, then res_phoneprov, then res_pjsip.  
      Since res_pjsip_phoneprov_provider uses res_pjsip's sorcery instance, when it 
      unloads, it's objects are still in the sorcery instance.  When res_pjsip 
      unloads, it destroys all its objects including res_pjsip_phoneprov_provider's.  
      The phoneprov destructor then attempts to unregister the extension from 
      res_phoneprov but because res_phoneprov is already cleaned up, its users 
      container is gone and we get a FRACK.
      
      Simple solution, check for the NULL users container before attempting to remove 
      the entry. Duh.
      
      Ran tests/res_phoneprov/res_phoneprov_provider.  No leaks in 
      res_pjsip_phoneprov_provider and no FRACKs.
      
      Reported-by: Corey Farrell
      Tested-by: George Joseph
      Review: https://reviewboard.asterisk.org/r/4608/
      ASTERISK-24935 #close
      ........
      
      Merged revisions 434545 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434547 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ed6b6e3c
    • Kevin Harwell's avatar
      res_pjsip: add CLI command to show global and system configuration · 520b9f21
      Kevin Harwell authored
      Added a new CLI command for res_pjsip that shows both global and system
      configuration settings: pjsip show settings
      
      ASTERISK-24918 #close
      Reported by: Scott Griepentrog
      Review: https://reviewboard.asterisk.org/r/4597/
      ........
      
      Merged revisions 434527 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      520b9f21
    • Matthew Jordan's avatar
      res/res_pjsip_dlg_options: Add a module to handle in-dialog OPTIONS requests · 3ef0a17b
      Matthew Jordan authored
      This patch adds a new session supplement that handles in-dialog OPTIONS
      requests. Said OPTIONS requests are sent a 200 OK, as an endpoint lookup
      for the OPTIONS request would already have been done by the time the
      session supplement receives the inbound request.
      
      ASTERISK-24862 #close
      Reported by: yaron nahum
      patches:
        res_pjsip_dlg_options.c submitted by yaron nahum (License 6676)
      ........
      
      Merged revisions 434506 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434507 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      3ef0a17b
    • Matthew Jordan's avatar
      clang compiler warnings: Fix autological comparisons · ea009872
      Matthew Jordan authored
      This fixes autological comparison warnings in the following:
       * chan_skinny: letohl may return a signed or unsigned value, depending on the
         macro chosen
       * func_curl: Provide a specific cast to CURLoption to prevent mismatch
       * cel: Fix enum comparisons where the enum can never be negative
       * enum: Fix comparison of return result of dn_expand, which returns a signed
         int value
       * event: Fix enum comparisons where the enum can never be negative
       * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be
         negative
       * presencestate: Use the actual enum value for INVALID state
       * security_events: Fix enum comparisons where the enum can never be negative
       * udptl: Don't bother to check if the return value from encode_length is less
         than 0, as it returns an unsigned int
       * translate: Since the parameters are unsigned int, don't bother checking
         to see if they are negative. The cast to unsigned int would already blow
         past the matrix bounds.
       * res_pjsip_exten_state: Use a temporary value to cache the return of
         ast_hint_presence_state
       * res_stasis_playback: Fix enum comparisons where the enum can never be
         negative
       * res_stasis_recording: Add an enum value for the case where the recording
         operation is in error; fix enum comparisons
       * resource_bridges: Use enum value as opposed to -1
       * resource_channels: Use enum value as opposed to -1
      
      Review: https://reviewboard.asterisk.org/r/4533
      ASTERISK-24917
      Reported by: dkdegroot
      patches:
        rb4533.patch submitted by dkdegroot (License 6600)
      ........
      
      Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ea009872
  8. Apr 08, 2015
  9. Apr 07, 2015
  10. Apr 06, 2015
  11. Apr 05, 2015
  12. Apr 03, 2015
  13. Apr 01, 2015
  14. Mar 30, 2015
  15. Mar 28, 2015
  16. Mar 27, 2015
  17. Mar 26, 2015
  18. Mar 25, 2015
  19. Mar 24, 2015
    • Richard Mudgett's avatar
      chan_pjsip: Add "rpid_immediate" option to prevent unnecessary "180 Ringing" messages. · 4c2fc5b8
      Richard Mudgett authored
      Incoming PJSIP call legs that have not been answered yet send unnecessary
      "180 Ringing" or "183 Progress" messages every time a connected line
      update happens.  If the outgoing channel is also PJSIP then the incoming
      channel will always send a "180 Ringing" or "183 Progress" message when
      the outgoing channel sends the INVITE.
      
      Consequences of these unnecessary messages:
      
      * The caller can start hearing ringback before the far end even gets the
      call.
      
      * Many phones tend to grab the first connected line information and refuse
      to update the display if it changes.  The first information is not likely
      to be correct if the call goes to an endpoint not under the control of the
      first Asterisk box.
      
      When connected line first went into Asterisk in v1.8, chan_sip received an
      undocumented option "rpid_immediate" that defaults to disabled.  When
      enabled, the option immediately passes connected line update information
      to the caller in "180 Ringing" or "183 Progress" messages as described
      above.
      
      * Added "rpid_immediate" option to prevent unnecessary "180 Ringing" or
      "183 Progress" messages.  The default is "no" to disable sending the
      unnecessary messages.
      
      ASTERISK-24781 #close
      Reported by: Richard Mudgett
      
      Review: https://reviewboard.asterisk.org/r/4473/
      ........
      
      Merged revisions 433338 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@433339 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      4c2fc5b8
Loading