Skip to content
Snippets Groups Projects
  1. Jan 11, 2021
    • 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
  2. Nov 05, 2020
  3. Oct 28, 2020
    • Alexander Traud's avatar
      install_prereq: Add GMime 3.0. · f3452c85
      Alexander Traud authored
      Ubuntu 20.10 does not come with GMime 2.6. Ubuntu 16.04 LTS does not
      come with GMime 3.0. aptitude ignores any missing package. Therefore,
      it installs the correct package(s). However, in Ubuntu 18.04 LTS and
      Ubuntu 20.04 LTS, both versions are installed alongside although only
      one is really needed.
      
      Change-Id: Ic58aa9f2e131d94671f286f17dbd61e1ccbabcb7
      f3452c85
  4. Sep 16, 2020
  5. Sep 10, 2020
    • Sungtae Kim's avatar
      realtime: Increased reg_server character size · 9052e448
      Sungtae Kim authored
      Currently, the ps_contacts table's reg_server column in realtime database type is varchar(20).
      This is fine for normal cases, but if the hostname is longer than 20, it returns error and then
      failed to register the contact address of the peer.
      
      Normally, 20 characters limitation for the hostname is fine, but with the cloud env.
      So, increased the size to 255.
      
      ASTERISK-29056
      
      Change-Id: Iac52c8c35030303cfa551bb39f410b33bffc507d
      9052e448
  6. Aug 31, 2020
    • George Joseph's avatar
      ast_coredumper: Fix issues with naming · 5989e0de
      George Joseph authored
      If you run ast_coredumper --tarball-coredumps in the same directory
      as the actual coredump, tar can fail because the link to the
      actual coredump becomes recursive.  The resulting tarball will
      have everything _except_ the coredump (which is usually what
      you need)
      
      There's also an issue that the directory name in the tarball
      is the same as the coredump so if you extract the tarball the
      directory it creates will overwrite the coredump.
      
      So:
      
       * Made the link to the coredump use the absolute path to the
         file instead of a relative one.  This prevents the recursive
         link and allows tar to add the coredump.
      
       * The tarballed directory is now named <coredump>.output instead
         of just <coredump> so if you expand the tarball it won't
         overwrite the coredump.
      
      Change-Id: I8b3eeb26e09a577c702ff966924bb0a2f9a759ea
      5989e0de
  7. Aug 28, 2020
    • Alexander Traud's avatar
      sip_nat_settings: Update script for latest Linux. · f225e9bf
      Alexander Traud authored
      With the latest Linux, 'ifconfig' is not installed on default anymore.
      Furthermore, the output of the current net-tools 'ifconfig' changed.
      Therefore, parsing failed. This update uses 'ip addr show' instead.
      Finally, the service for the external IP changed.
      
      Change-Id: I9b1a7c3f457e3553b50a3e9a55524e40d70245a0
      f225e9bf
  8. Aug 06, 2020
    • George Joseph's avatar
      ACN: Configuration renaming for pjsip endpoint · a15e64aa
      George Joseph authored
      This change renames the codec preference endpoint options.
      incoming_offer_codec_prefs becomes codec_prefs_incoming_offer
      to keep the options together when showing an endpoint.
      
      Change-Id: I6202965b4723777f22a83afcbbafcdafb1d11c8d
      a15e64aa
  9. Jul 10, 2020
    • Ben Ford's avatar
      res_stir_shaken: Add stir_shaken option and general improvements. · 5fbed5af
      Ben Ford authored
      Added a new configuration option for PJSIP endpoints - stir_shaken. If
      set to yes, then STIR/SHAKEN support will be added to inbound and
      outbound INVITEs. The default is no. Alembic has been updated to include
      this option.
      
      Previously the dialplan function was not trimming the whitespace from
      the parameters it recieved. Now it does.
      
      Also added a conditional that, when TEST_FRAMEWORK is enabled, the
      timestamp in the identity header will be overlooked. This is just for
      testing, since the testsuite will rely on a SIPp scenario with a preset
      identity header to trigger the MISMATCH result.
      
      Change-Id: I43d67f1489b8c1c5729ed3ca8d71e35ddf438df1
      5fbed5af
  10. Jul 08, 2020
    • George Joseph's avatar
      ACN: res_pjsip endpoint options · 2d22e342
      George Joseph authored
      This commit adds the endpoint options required to control
      Advanced Codec Negotiation.
      
      incoming_offer_codec_prefs
      outgoing_offer_codec_prefs
      incoming_answer_codec_prefs
      outgoing_answer_codec_prefs
      
      The documentation may need tweaking and some additional edits
      added, especially for the "answer" prefs.  That'll be handled
      when things finalize.
      
      This commit is safe to merge as it doens't alter any existing
      functionality nor does it alter the previous codec negotiation
      work which may now be obsolete.
      
      Change-Id: I920ba925d7dd36430dfd2ebd9d82d23f123d0e11
      2d22e342
  11. Jul 07, 2020
    • sungtae kim's avatar
      res_pjsip.c: Added disable_rport option for pjsip.conf · 81b5e4a7
      sungtae kim authored
      Currently when the pjsip making an outgoing request, it keep adding the
      rport parameter in a request message as a default.
      
      This causes unexpected rport handle at the other end.
      
      Added option for disable this behaviour in the pjsip.conf.
      
      This is a system option, but working as a gloabl option.
      
      ASTERISK-28959
      
      Change-Id: I9596675e52a742774738b5aad5d1fec32f477abc
      81b5e4a7
  12. Apr 16, 2020
  13. Apr 13, 2020
    • Alexander Traud's avatar
      BuildSystem: Search for Python/C API when possibly needed only. · 610e0581
      Alexander Traud authored
      The Python/C API is used only if the Test Framework was enabled in Asterisk
      'make menuselect'. The Test Framework is available only if the Developer Mode
      was enabled in Asterisk './configure --enable-dev-mode'. And that Python/C API
      is used only if the PJProject was found and not disabled in Asterisk; the user
      did not go for './configure --without-pjproject'.
      
      Furthermore, because version 2 of that Python/C API is required (currently) and
      because some platforms do not offer a generic version 2, the script searches
      for 2.7 explicitly as well.
      
      To avoid version mismatch between the Python/C API and the Python environment,
      the script searches for the latter in the same versions, in the same the order
      as well. Because this Python/C API is just for (some) Asterisk contributors,
      the script also goes for the Python 3 environment as a last resort for all
      other Asterisk users. This allows 'make full' even on minimal installations of
      Ubuntu 18.04 LTS and newer.
      
      Because the Python/C API is Asterisk contributor specific, the Python packages
      are removed from the script './contrib/scripts/install_prereq' as this script
      is intended for Asterisk users. Asterisk contributors have to install much more
      packages in any case, like:
      sudo apt install autoconf automake git git-review python2.7-dev
      
      ASTERISK-28824
      ASTERISK-27717
      
      Change-Id: Id46d357e18869f64dcc217b8fdba821b63eeb876
      610e0581
  14. Mar 26, 2020
    • Kevin Harwell's avatar
      ast_coredumper: add Asterisk information dump · 26713dc8
      Kevin Harwell authored
      This patch makes it so ast_coredumper now outputs the following information to
      a *-info.txt file when processing a core file:
      
        asterisk version and "built by" string
        BUILD_OPTS
        system start, and last reloaded date/time
        taskprocessor list
        equivalent of "bridge show all"
        equivalent of "core show channels verbose"
      
      Also a slight modification was made when trying to obtain the pid(s) of a
      running Asterisk. If it fails to retrieve any it now reports an error.
      
      Change-Id: I54f35c19ab69b8f8dc78cc933c3fb7c99cef346b
      26713dc8
  15. Feb 19, 2020
  16. Feb 05, 2020
    • Sylvain Afchain's avatar
      install_prereq: Install aptitude non-interactively · 0c02d0a4
      Sylvain Afchain authored
      Currently aptitude is installed using interactive mode. This patch
      changes this to use the non-interactive mode as it can block
      automatic dependencies installation, ex: CI, Docker build.
      
      ASTERISK-28726 #close
      
      Change-Id: I271ee00d230513a6f044810351a32d83b2181133
      0c02d0a4
  17. Dec 18, 2019
  18. Dec 17, 2019
  19. Nov 22, 2019
  20. Sep 25, 2019
    • Sean Bright's avatar
      res_musiconhold: Add new 'playlist' mode · 966488ab
      Sean Bright authored
      Allow the list of files to be played to be provided explicitly in the
      music class's configuration. The primary driver for this change is to
      allow URLs to be used for MoH.
      
      Change-Id: I9f43b80b43880980b18b2bee26ec09429d0b92fa
      966488ab
  21. Jul 22, 2019
  22. Apr 17, 2019
    • Dan Cropp's avatar
      res_pjsip: Added a norefersub configuration setting · cffa2a74
      Dan Cropp authored
      Added a new PJSIP global setting called norefersub.
      Default is true to keep support working as before.
      
      res_pjsip_refer:  Configures PJSIP norefersub capability accordingly.
      
      Checks the PJSIP global setting value.
      If it is true (default) it adds the norefersub capability to PJSIP.
      If it is false (disabled) it does not add the norefersub capability
      to PJSIP.
      
      This is useful for Cisco switches that do not follow RFC4488.
      
      ASTERISK-28375 #close
      Reported-by: Dan Cropp
      
      Change-Id: I0b1c28ebc905d881f4a16e752715487a688b30e9
      cffa2a74
  23. Mar 28, 2019
    • Ben Ford's avatar
      alembic: Fix errors during upgrade head. · 4edd2484
      Ben Ford authored
      When trying to upgrade using alembic, a couple different errors kept
      popping up that prevented the upgrade. An additional parameter was
      needed when changing the schema for mwi_subscribe_replaces_unsolicited
      from an integer to an enum. When changing from a string to an enum, the
      type needed to be cast for postgresql. The other issue was a parameter
      being used during column creation that did not exist.
      
      After fixing the upgrade process, it revealed errors with the downgrade
      process. One was a variable not being defined in the downgrade function,
      and the other was tables not existing when using MySQL. This was due to
      a context check that should have encompassed MySQL, but in the end was
      not doing so.
      
      Change-Id: Ib4d70cf3ce5080023a50be496272a777b55d6c8e
      4edd2484
  24. Mar 13, 2019
    • cirillor's avatar
      Variable ALTCONF ignored when service is used in Debian · 7d540991
      cirillor authored
      When variable ALTCONF is defined, the command start prints the message
      "Unable to open specified master config file '"/etc/asterisk/asteris..."
      and use default configurations.
      
      ASTERISK-28332
      
      Change-Id: I7595e582a0ee2c1051ea35435e247e27906957ef
      7d540991
  25. Mar 08, 2019
    • Torrey Searle's avatar
      chan_pjsip: add a flag to ignore 183 responses if no SDP present · 4661c085
      Torrey Searle authored
      chan_sip will always ignore 183 responses that do not contain SDP
      however, chan_pjsip will currently always translate it into a
      183 with SDP.  This new flag allows chan_pjsip to have the same
      behavior as chan_sip.
      
      ASTERISK-28322 #close
      
      Change-Id: If81cfaa17c11b6ac703e3d71696f259d86c6be4a
      4661c085
  26. Mar 04, 2019
  27. Feb 20, 2019
    • George Joseph's avatar
      taskprocessor: Enable subsystems and overload by subsystem · c2adeb9d
      George Joseph authored
      To prevent one subsystem's taskprocessors from causing others
      to stall, new capabilities have been added to taskprocessors.
      
      * Any taskprocessor name that has a '/' will have the part
        before the '/' saved as its "subsystem".
        Examples:
        "sorcery/acl-0000006a" and "sorcery/aor-00000019"
        will be grouped to subsystem "sorcery".
        "pjsip/distributor-00000025" and "pjsip/distributor-00000026"
        will bn grouped to subsystem "pjsip".
        Taskprocessors with no '/' have an empty subsystem.
      
      * When a taskprocessor enters high-water alert status and it
        has a non-empty subsystem, the subsystem alert count will
        be incremented.
      
      * When a taskprocessor leaves high-water alert status and it
        has a non-empty subsystem, the subsystem alert count will be
        decremented.
      
      * A new api ast_taskprocessor_get_subsystem_alert() has been
        added that returns the number of taskprocessors in alert for
        the subsystem.
      
      * A new CLI command "core show taskprocessor alerted subsystems"
        has been added.
      
      * A new unit test was addded.
      
      REMINDER: The taskprocessor code itself doesn't take any action
      based on high-water alerts or overloading.  It's up to taskprocessor
      users to check and take action themselves.  Currently only the pjsip
      distributor does this.
      
      * A new pjsip/global option "taskprocessor_overload_trigger"
        has been added that allows the user to select the trigger
        mechanism the distributor uses to pause accepting new requests.
        "none": Don't pause on any overload condition.
        "global": Pause on ANY taskprocessor overload (the default and
        current behavior)
        "pjsip_only": Pause only on pjsip taskprocessor overloads.
      
      * The core pjsip pool was renamed from "SIP" to "pjsip" so it can
        be properly grouped into the "pjsip" subsystem.
      
      * stasis taskprocessor names were changed to "stasis" as the
        subsystem.
      
      * Sorcery core taskprocessor names were changed to "sorcery" to
        match the object taskprocessors.
      
      Change-Id: I8c19068bb2fc26610a9f0b8624bdf577a04fcd56
      c2adeb9d
  28. Jan 11, 2019
    • Alexei Gradinari's avatar
      res_pjsip: add option to enable ContactStatus event when contact is updated · f0546d1d
      Alexei Gradinari authored
      The commit I2f97ebfa79969a36a97bb7b9afd5b6268cf1a07d removed sending out
      the ContactStatus AMI event when a contact is updated.
      Thist change broke things which rely on old behavior.
      
      This patch adds a new PJSIP global configuration option
      'send_contact_status_on_update_registration' to be able to preserve old
      ContactStatus behavior.
      By default new behavior, i.e. the ContactStatus event will not be sent when a
      device refreshes its registration.
      
      Change-Id: I706adf7584e7077eb6bde6d9799ca408bc82ce46
      f0546d1d
  29. Dec 24, 2018
    • George Joseph's avatar
      ast_coredumper: Refactor the pid determination process · 809e8362
      George Joseph authored
      In order to get a dump of the running process, we need to find the
      pid of the main asterisk process.  This can be tricky if there are
      also instances of "asterisk -r" running or if an alternate location
      for asterisk.conf was specified on the command line with the -C
      option that also specified an alternation location for the pid file.
      
      So now...
      
      1. We find the asterisk executable with "which" or the --asterisk-bin
         command line option.
      2. If there's only 1 process with an executable path that matches,
         we use that pid.  If not...
      3. We try "<asterisk-bin> -rx 'core show settings'" and parse the
         output to find the pidfile, then read that for the pid.  If that
         didn't work...
      4. We get a list of all the pids matching <asterisk-bin> and look
         in /proc/<pid>/cmdline for a -C argument and retry the "core show
         settings" using the same -C option.  We can't parse the output
         of "ps" to get the -C path because it may contain spaces.  The
         contents of /proc/<pid>/cmdline are delimited by NULLs.  For BSDs
         we may have to mount /proc first. :(
      
      ASTERISK-28221
      Reported by: Andrew Nagy
      
      Change-Id: I8aa1f3f912f949df2b5348908803c636bde1d57c
      809e8362
  30. Dec 03, 2018
  31. Nov 01, 2018
    • Pascal Cadotte Michaud's avatar
      contrib/sip_to_pjsip: add a --quiet option to avoid prints · ebff81e3
      Pascal Cadotte Michaud authored
      Using the --quiet or -q option in conjonction with /dev/stdout as the output
      file allow the output to be used as a valid configuration.
      
      Given a script that generates a valid sip.conf I can pipe the output of that
      script into `sip_to_pjsip.py -q /dev/stdin /dev/stdout`. This allow me to use
      that piped command in my pjsip.conf using the `exec` command.
      
      ASTERISK-28136
      
      Change-Id: I7b0e2e90e2549f3f8e01dc96701f111b5874c88d
      Unverified
      ebff81e3
  32. Oct 30, 2018
  33. Oct 26, 2018
    • Torrey Searle's avatar
      res_pjsip_session: add new flag use_callerid_contact · cac4ccef
      Torrey Searle authored
      Add a new global flag to res_pjsip to allow the callerid to be used
      as the username in the contact header.  This allows chan_pjsip to have
      the same behavour as chan_sip
      
      ASTERISK-28087 #close
      
      Change-Id: I9a720e058323f6862a91c62f8a8c1a4b5c087b95
      cac4ccef
  34. Oct 24, 2018
    • Nick French's avatar
      res_pjsip: Implement additional SIP RFCs for Google Voice trunk compatability · 37b2e686
      Nick French authored
      This change implements a few different generic things which were brought
      on by Google Voice SIP.
      
      1.  The concept of flow transports have been introduced.  These are
      configurable transports in pjsip.conf which can be used to reference a
      flow of signaling to a target.  These have runtime configuration that can
      be changed by the signaling itself (such as Service-Routes and
      P-Preferred-Identity).  When used these guarantee an individual connection
      (in the case of TCP or TLS) even if multiple flow transports exist to the
      same target.
      
      2.  Service-Routes (RFC 3608) support has been added to the outbound
      registration module which when received will be stored on the flow
      transport and used for requests referencing it.
      
      3.  P-Associated-URI / P-Preferred-Identity (RFC 3325) support has been
      added to the outbound registration module.  If a P-Associated-URI header
      is received it will be used on requests as the P-Preferred-Identity.
      
      4.  Configurable outbound extension support has been added to the outbound
      registration module.  When set the extension will be placed in the
      Supported header.
      
      5.  Header parameters can now be configured on an outbound registration
      which will be placed in the Contact header.
      
      6.  Google specific OAuth / Bearer token authentication
      (draft-ietf-sipcore-sip-authn-02) has been added to the outbound
      registration module.
      
      All functionality changes are controlled by pjsip.conf configuration
      options and do not affect non-configured pjsip endpoints otherwise.
      
      ASTERISK-27971 #close
      
      Change-Id: Id214c2d1c550a41fcf564b7df8f3da7be565bd58
      37b2e686
  35. Oct 15, 2018
    • Corey Farrell's avatar
      refdebug: Create refstats.py script. · 79677ead
      Corey Farrell authored
      This allows us to process AO2 statistics for total objects, memory
      usage, memory overhead and lock usage.
      
      * Install refstats.py and reflocks.py into the Asterisk scripts folder.
      * Enable support for reflocks.py without DEBUG_THREADS.
      
      Steal a bit from the ao2 magic to flag when an object lock is used.
      Remove 'lockobj' from reflocks.py since we can now record 'used' or
      'unused' for those objects.
      
      Add comments to explain thread safety of the 'struct __priv_data'
      bitfields.
      
      Change-Id: I84e9d679cc86d772cc97c888d9d856a17e0d3a4a
      79677ead
  36. Oct 03, 2018
  37. Oct 02, 2018
    • Corey Farrell's avatar
      astobj2: Record lock usage to refs log when DEBUG_THREADS is enabled. · 13df7452
      Corey Farrell authored
      When DEBUG_THREADS is enabled we can know if the astobj2 mutex / rwlock
      was ever used, so it can be recorded in the REF_DEBUG destructor entry.
      
      Create contrib/scripts/reflocks.py to process locking used by
      allocator.  This can be used to identify places where
      AO2_ALLOC_OPT_LOCK_NOLOCK should be used to reduce memory usage.
      
      Change-Id: I2e3cd23336a97df2692b545f548fd79b14b53bf4
      Unverified
      13df7452
Loading