Skip to content
Snippets Groups Projects
  1. Jun 27, 2019
    • George Joseph's avatar
      pjproject_bundled: Add peer information to most SSL/TLS errors · 8b3ee7fe
      George Joseph authored
      Most SSL/TLS error messages coming from pjproject now have either
      the peer address:port or peer hostname, depending on what was
      available at the time and code location where the error was
      generated.
      
      ASTERISK-28444
      Reported by: Bernhard Schmidt
      
      Change-Id: I41770e8a1ea5e96f6e16b236692c4269ce1ba91e
      8b3ee7fe
  2. Jun 13, 2019
  3. Jun 12, 2019
  4. Jun 11, 2019
    • Alexei Gradinari's avatar
      app_attended_transfer: new application AttendedTransfer · 3eaeb3e6
      Alexei Gradinari authored
      AttendedTransfer queues up attended transfer to the given extension.
      
      This application can be useful with Custom Dynamic Features.
      For example to make attended transfer to a predefined number.
      
      features.conf
      ;;;
      [applicationmap]
      my_atxfer => *7,self,GoSub,"my_atxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=my_atxfer
      TRANSFER_CONTEXT=my_transfer
      
      [my_atxfer]
      exten => s,1,AttendedTransfer(1234567890)
         same => n,Return()
      
      [my_transfer]
      include => default
      ;;;
      
      This application also can be used to completly redefine Attended transfer
      feature using dialplan. For example:
      
      features.conf
      ;;;
      [featuremap]
      atxfer => *7
      
      [applicationmap]
      custom_atxfer => *2,self,GoSub,"custom_atxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=custom_atxfer
      TRANSFER_CONTEXT=my_transfer
      
      [custom_atxfer]
      exten => s,1,
         same => n,Playback(pbx-transfer)
         same => n,Read(dest,dial,10,i,3,3)
         same => n,AttendedTransfer(${dest})
         same => n,Return()
      
      [my_transfer]
      include => default
      ;;;
      
      Change-Id: Ie5cfa455d0813cffd5c85a6fb117f07d8f0b903b
      3eaeb3e6
    • Friendly Automation's avatar
  5. Jun 10, 2019
    • agupta's avatar
      chan_pjsip.c: Check for channel and session to not be NULL in hangup · d2f7b226
      agupta authored
      We have seen some rare case of segmentation fault in hangup function
      and we could notice that channel pointer was NULL.  Debug log shows
      that there is a 200 OK answer and SIP timeout at the same time.  It
      looks that while the SIP session was being destroyed due to timeout
      call hangup due to answer event lead to race condition and channel
      is being destroyed from two different places.  The check ensures we
      check it not to be NULL before freeing it.
      
      ASTERISK-25371
      
      Change-Id: I19f6566830640625e08f7b87bfe15758ad33a778
      d2f7b226
  6. Jun 07, 2019
    • Alexei Gradinari's avatar
      app_blind_transfer: new application BlindTransfer · 745cbab5
      Alexei Gradinari authored
      BlindTransfer redirects all channels currently bridged to the
      caller channel to the specified destination.
      
      This application can be useful with Custom Dynamic Features.
      For example to make blind transfer to a predefined number.
      
      features.conf
      ;;;
      [applicationmap]
      my_blindxfer => *6,self,GoSub,"my_blindxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=my_blindxfer
      
      [my_blindxfer]
      exten => s,1,BlindTransfer(1234567890,default)
         same => n,Return()
      ;;;
      
      This application also can be used to completly redefine Blind transfer
      feature using dialplan. For example:
      
      features.conf
      ;;;
      [featuremap]
      blindxfer =>
      
      [applicationmap]
      custom_blindxfer => ##,self,GoSub,"custom_blindxfer,s,1",default
      ;;;
      
      extensions.conf
      ;;;
      [globals]
      DYNAMIC_FEATURES=custom_blindxfer
      
      [custom_blindxfer]
      exten => s,1,
         same => n,Playback(pbx-transfer)
         same => n,Read(dest,dial,10,i,3,3)
         same => n,BlindTransfer(${dest},default)
         same => n,Return()
      ;;;
      
      Change-Id: I9d55e7f69ccfd4472dec00d62771d6de8803215a
      745cbab5
  7. Jun 05, 2019
  8. Jun 04, 2019
    • Chris-Savinovich's avatar
      cdr_pgsql: fix error in connection string · e61f2af8
      Chris-Savinovich authored
      Fixes an error occurring in function pgsql_reconnect() caused when value of
      hostname is blank. Which in turn will cause the connection string to look
      like this: "host= port=xx", which creates a sintax error. This fix now checks
      if the corresponding values for host, port, dbname, and user are blank. Note
      that since this is a reconnect function the database library will replace any
      missing value pairs with default ones.
      
      ASTERISK-28435
      
      Change-Id: I0a921f99bbd265768be08cd492f04b30855b8423
      e61f2af8
    • Friendly Automation's avatar
  9. Jun 03, 2019
  10. May 29, 2019
  11. May 24, 2019
  12. May 23, 2019
  13. May 22, 2019
    • Friendly Automation's avatar
    • Friendly Automation's avatar
    • Matt Jordan's avatar
      res_prometheus: Add metrics for PJSIP outbound registrations · 0bb38796
      Matt Jordan authored
      When monitoring Asterisk instances, it's often useful to know when an
      outbound registration fails, as this often maps to the notion of a trunk
      and having a trunk fail is usually a "bad thing". As such, this patch
      adds monitoring metrics that track the state of PJSIP outbound registrations.
      It does this by looking for the Registry events coming across the Stasis
      system topic, and publishing those as metrics to Prometheus. Note that
      while this may support other outbound registration types (IAX2, SIP, etc.)
      those haven't been tested. Your mileage may vary.
      
      (And why are you still using IAX2 and SIP? It's 2019 folks. Get with the
      program.)
      
      This patch also adds Sorcery observers to handle modifications to the
      underlying PJSIP outbound registration objects. This is useful when a
      reload is triggered that modifies the properties of an outbound registration,
      or when ARI push configuration is used and an object is updated or
      deleted. Because we rely on properties of the registration object to
      define the metric (label key/value pairs), we delete the relevant metric when
      we notice that something has changed and wait for a new Stasis message to
      arrive to re-create the metric.
      
      ASTERISK-28403
      
      Change-Id: If01420e38530fc20b6dd4aa15cd281d94cd2b87e
      0bb38796
    • Matt Jordan's avatar
      res_prometheus: Add CLI commands · a2648b22
      Matt Jordan authored
      This patch adds a few CLI commands to the res_prometheus module to aid
      system administrators setting up and configuring the module. This includes:
      
      * prometheus show status: Display basic statistics about the Prometheus
        module, including its essential configuration, when it was last scraped,
        and how long the scrape took. The last two bits of information are useful
        when Prometheus isn't generating metrics appropriately, as it will at
        least tell you if Asterisk has had its HTTP route hit by the remote
        server.
      
      * prometheus show metrics: Dump the current metrics to the CLI. Useful for
        system administrators to see what metrics are currently available without
        having to cURL or go to Prometheus itself.
      
      ASTERISK-28403
      
      Change-Id: Ic09813e5e14b901571c5c96ebeae2a02566c5172
      a2648b22
    • Matt Jordan's avatar
      res_prometheus: Add Asterisk bridge metrics · 066280f0
      Matt Jordan authored
      This patch adds basic Asterisk bridge statistics to the res_prometheus
      module. This includes:
      
      * asterisk_bridges_count: The current number of bridges active on the
        system.
      
      * asterisk_bridges_channels_count: The number of channels active in a
        bridge.
      
      In all cases, enough information is provided with each bridge metric
      to determine a unique instance of Asterisk that provided the data, along
      with the technology, subclass, and creator of the bridge.
      
      ASTERISK-28403
      
      Change-Id: Ie27417dd72c5bc7624eb2a7a6a8829d7551788dc
      066280f0
    • Matt Jordan's avatar
      res_prometheus: Add Asterisk endpoint metrics · ed6cd13b
      Matt Jordan authored
      This patch adds basic Asterisk endpoint statistics to the res_prometheus
      module. This includes:
      
      * asterisk_endpoints_state: The current state (unknown, online, offline)
        for each defined endpoint.
      
      * asterisk_endpoints_channels_count: The current number of channels
        associated with a given endpoint.
      
      * asterisk_endpoints_count: The current number of defined endpoints.
      
      In all cases, enough information is provided with each endpoint metric
      to determine a unique instance of Asterisk that provided the data, as well
      as the underlying technology and resource definition.
      
      ASTERISK-28403
      
      Change-Id: I46443963330c206a7d12722d08dcaabef672310e
      ed6cd13b
  14. May 21, 2019
    • Morten Tryfoss's avatar
      res_rtp_asterisk: timestamp should be unsigned instead of signed int · 3224ac07
      Morten Tryfoss authored
      Using timestamp with signed int will cause timestamps exceeding max value
      to be negative.
      This causes the jitterbuffer to do passthrough of the packet.
      
      ASTERISK-28421
      
      Change-Id: I9dabd0718180f2978856c50f43aac4e52dc3cde9
      3224ac07
    • Matt Jordan's avatar
      res_prometheus: Add Asterisk channel metrics · 0760af71
      Matt Jordan authored
      This patch adds basic Asterisk channel statistics to the res_prometheus
      module. This includes:
      
      * asterisk_calls_sum: A running sum of the total number of
        processed calls
      
      * asterisk_calls_count: The current number of calls
      
      * asterisk_channels_count: The current number of channels
      
      * asterisk_channels_state: The state of any particular channel
      
      * asterisk_channels_duration_seconds: How long a channel has existed,
        in seconds
      
      In all cases, enough information is provided with each channel metric
      to determine a unique instance of Asterisk that provided the data, as
      well as the name, type, unique ID, and - if present - linked ID of each
      channel.
      
      ASTERISK-28403
      
      Change-Id: I0db306ec94205d4f58d1e7fbabfe04b185869f59
      0760af71
    • Matt Jordan's avatar
      pjproject/Makefile: Updates for Darwin compatible builds · 54f7f7dc
      Matt Jordan authored
      This patch fixes three compatibility issues for Darwin compatible builds:
      
      (1) Use BSD compatible command line option for sed
      
      For some versions of BSD sed, the -r command line option is unknown.
      Both GNU and BSD sed support the -E command line option for enabling
      extended regular expressions; as such, this patch replaces the -r
      option with -E.
      
      (2) Look for '_' in pjproject generated symbols
      
      In Darwin comaptible systems, the symbols generated for pjproject may be
      prefixed with an '_'. When exporting these to a symbol file, the invocation
      to sed has to optionally look for a prefix of said '_' character.
      
      (3) Use -all_load/-noall_load when linking
      
      The flags -whole-archive/-no-whole-archive are not supported by the
      linker, and must instead be replaced with -all_load/-noall_load.
      
      Change-Id: I58121756de6a0560a6e49ca9d6bf9566a333cde3
      54f7f7dc
    • Friendly Automation's avatar
    • Matt Jordan's avatar
      Add core Prometheus support to Asterisk · c50f29df
      Matt Jordan authored
      Prometheus is the defacto monitoring tool for containerized applications.
      This patch adds native support to Asterisk for serving up Prometheus
      compatible metrics, such that a Prometheus server can scrape an Asterisk
      instance in the same fashion as it does other HTTP services.
      
      The core module in this patch provides an API that future work can build
      on top of. The API manages metrics in one of two ways:
      (1) Registered metrics. In this particular case, the API assumes that
          the metric (either allocated on the stack or on the heap) will have
          its value updated by the module registering it at will, and not
          just when Prometheus scrapes Asterisk. When a scrape does occur,
          the metrics are locked so that the current value can be retrieved.
      (2) Scrape callbacks. In this case, the API allows consumers to be
          called via a callback function when a Prometheus initiated scrape
          occurs. The consumers of the API are responsible for populating
          the response to Prometheus themselves, typically using stack
          allocated metrics that are then formatted properly into strings
          via this module's convenience functions.
      
      These two mechanisms balance the different ways in which information is
      generated within Asterisk: some information is generated in a fashion
      that makes it appropriate to update the relevant metrics immediately;
      some information is better to defer until a Prometheus server asks for
      it.
      
      Note that some care has been taken in how metrics are defined to
      minimize the impact on performance. Prometheus's metric definition
      and its support for nesting metrics based on labels - which are
      effectively key/value pairs - can make storage and managing of metrics
      somewhat tricky. While a naive approach, where we allow for any number
      of labels and perform a lot of heap allocations to manage the information,
      would absolutely have worked, this patch instead opts to try to place
      as much information in length limited arrays, stack allocations, and
      vectors to minimize the performance impacts of scrapes. The author of
      this patch has worked on enough systems that were driven to their knees
      by poor monitoring implementations to be a bit cautious.
      
      Additionally, this patch only adds support for gauges and counters.
      Additional work to add summaries, histograms, and other Prometheus
      metric types may add value in the future. This would be of particular
      interest if someone wanted to track SIP response types.
      
      Finally, this patch includes unit tests for the core APIs.
      
      ASTERISK-28403
      
      Change-Id: I891433a272c92fd11c705a2c36d65479a415ec42
      c50f29df
  15. May 20, 2019
    • Joshua Colp's avatar
      pjproject-bundled: Add upstream timer fixes · 3853fab3
      Joshua Colp authored
      Fixed #2191:
        - Stricter double timer entry scheduling prevention.
        - Integrate group lock in SIP transport, e.g: for add/dec ref,
          for timer scheduling.
      
      ASTERISK-28161
      Reported-by: Ross Beer
      
      Change-Id: I2e09aa66de0dda9414d8a8259a649c4d2d96a9f5
      3853fab3
  16. May 17, 2019
    • George Joseph's avatar
      res_rtp_asterisk: Add ability to propose local address in ICE · be83591f
      George Joseph authored
      You can now add the "include_local_address" flag to an entry in
      rtp.conf "[ice_host_candidates]" to include both the advertized
      address and the local address in ICE negotiation:
      
      [ice_host_candidates]
      192.168.1.1 = 1.2.3.4,include_local_address
      
      This causes both 192.168.1.1 and 1.2.3.4 to be advertized.
      
      Change-Id: Ide492cd45ce84546175ca7d557de80d9770513db
      be83591f
  17. May 16, 2019
    • Alexei Gradinari's avatar
      pjsip: replace 180 by 183 if SDP negotiation has completed · 466a1796
      Alexei Gradinari authored
      The caller endpoint hears dead silence if a callee replies 180 (without SDP)
      and the caller already received 183 (with SDP).
      It happens because Asterisk sends 180 (WITH SDP) to the caller,
      there are not incoming RTP packets from the callee
      and Asterisk does not generate inband ringing,
      so there are not any outgoing RTP packets to the caller.
      
      This patch replaces 180 by 183 if SDP negotiation has completed,
      as if the caller endpoint is configured with "inband_progress=yes".
      
      In this case Asterisk will generate inband ringing untill Asterisk receive
      incoming RTP packets from the callee.
      
      ASTERISK-27994 #close
      
      Change-Id: I7450b751083ec30d68d6abffe922215a15ae5a73
      466a1796
  18. May 15, 2019
  19. May 13, 2019
Loading