Skip to content
Snippets Groups Projects
  1. Jan 06, 2017
    • Joshua Colp's avatar
      res_pjsip_endpoint_identifier_ip: Add support for SRV lookups. · a7d856cd
      Joshua Colp authored
      This change implements SRV support for the IP based endpoint
      identifier module. All possible addresses through SRV are looked
      up and added as matches. If no SRV records are available a
      fallback to normal host resolution is done. If an IP address
      is provided then no SRV lookup occurs.
      
      This is configured using the "srv_lookups" option on the
      identify section and defaults to "yes".
      
      ASTERISK-26693
      
      Change-Id: I6b641e275bf96629320efa8b479737062aed82ac
      a7d856cd
  2. Dec 21, 2016
  3. Dec 15, 2016
  4. Oct 26, 2016
    • Joshua Colp's avatar
      pjsip: Fix a few media bugs with reinvites and asymmetric payloads. · aed6c219
      Joshua Colp authored
      When channel format changes occurred as a result of an RTP
      re-negotiation the bridge was not informed this had happened.
      As a result the bridge technology was not re-evaluated and the
      channel may have been in a bridge technology that was incompatible
      with its formats. The bridge is now unbridged and the technology
      re-evaluated when this occurs.
      
      The chan_pjsip module also allowed asymmetric codecs for sending
      and receiving. This did not work with all devices and caused one
      way audio problems. The default has been changed to NOT do this
      but to match the sending codec to the receiving codec. For users
      who want asymmetric codecs an option has been added, asymmetric_rtp_codec,
      which will return chan_pjsip to the previous behavior.
      
      The codecs returned by the chan_pjsip module when queried by
      the bridge_native_rtp module were also not reflective of the
      actual negotiated codecs. The nativeformats are now returned as
      they reflect the actual negotiated codecs.
      
      ASTERISK-26423 #close
      
      Change-Id: I6ec88c6e3912f52c334f1a26983ccb8f267020dc
      aed6c219
  5. Oct 23, 2016
    • Joshua Colp's avatar
      pjsip: Support dual stack automatically. · 403c4f58
      Joshua Colp authored
      This change adds support for dual stack automatically. No
      configuration is required and the IP address and version
      in the SIP messages and SDP will be automatically changed
      based on the transport over which the message is being
      sent. RTP usage has also been changed to listen on both
      IPv4 and IPv6 simultaneously to allow media to flow, and
      to allow ICE support on both simultaneously. This also
      allows failover between IPv6 and IPv4 to work as expected.
      
      ASTERISK-26309 #close
      
      Change-Id: I235a421d8f9a326606d861b449fa6fe3a030572d
      403c4f58
  6. Oct 07, 2016
    • George Joseph's avatar
      alembic: Allow cdr, config and voicemail to exist in the same schema · 442b5979
      George Joseph authored
      cdr, config and voicemail are all separate alembic trees.  Because
      alembic's default is to use a table named 'alembic_version' to store
      the current tree revision, the 3 trees can't exist in the same schema
      without stepping on each other.
      
      Now each tree uses 'alembic_version_<tree_name>' as the version table.
      Each tree's env.py script now first checks for 'alembic_version'.  If
      it finds it AND its revision is in the tree's history, the script
      renames it to 'alembic_version_<tree_name>'.  Regardless, the script
      then continues with the migration using 'alembic_version_<tree_name>'
      and creates that table if it's not found.  The result is that if an
      existing 'alembic_version' table was found but it didn't belong to this
      tree, it's left alone and 'alembic_version_<tree_name>' is used or
      created.
      
      WARNING:  If multiple trees are using the same schema, they MUST NOT
      CRU or D any objects with names that might exist in the other trees.
      An example would be 'yesno_values' type.  If two trees perform
      operations on it, one tree could pull it out from under the other.
      Thankfully we currently don't share any names among cdr, config and
      voicemail.
      
      NOTE:  Since the env.py scripts in each tree were identical, a common
      env.py has been placed in the ast-db-manage directory and a symlink
      to it has been placed in each tree directory.
      
      ASTERISK-24311 #close
      Reported-by: Dafi Ni
      
      Change-Id: I4d593f000350deb5d21a14fa1e9bc3896844d898
      442b5979
  7. Sep 30, 2016
  8. Sep 09, 2016
    • Richard Mudgett's avatar
      sip_to_pjsip.py: Map legacy_useroption_parsing. · 82ec58aa
      Richard Mudgett authored
      Map the sip.conf general section legacy_useroption_parsing to the
      new pjsip.conf global ignore_uri_user_options.
      
      ASTERISK-26316
      Reported by: Kevin Harwell
      
      Change-Id: I78108a31995db19d41f4e1a07b3324692c5363fc
      82ec58aa
    • Richard Mudgett's avatar
      res_pjsip: Add ignore_uri_user_options option. · ba362822
      Richard Mudgett authored
      This implements the chan_sip legacy_useroption_parsing option but with a
      better name.
      
      * Made the caller-id number and redirecting number strings obtained from
      incoming SIP URI user fields always truncated at the first semicolon.
      People don't care about anything after the semicolon showing up on their
      displays even though the RFC allows the semicolon.
      
      ASTERISK-26316 #close
      Reported by: Kevin Harwell
      
      Change-Id: Ib42b0e940dd34d84c7b14bc2e90d1ba392624f62
      ba362822
    • Walter Doekes's avatar
      contrib: Let safe_asterisk script continue without /dev/tty9. · 56caf540
      Walter Doekes authored
      If you use the safe_asterisk script, it uses hardcoded defaults before
      running configurable values from /etc/asterisk/startup.d. The hardcoded
      default has TTY=9. Some containerized environments don't have such a
      TTY, and safe_asterisk would stop.
      
      The custom configuration from /etc/asterisk/startup.d/* isn't read until
      after it stopped, so changing TTY in a custom config did not help.
      
      This changeset changes safe_asterisk to continue if the TTY setting was
      untouched and /dev/tty9 and /dev/vc/9 aren't found.
      
      Change-Id: I2c7cdba549b77f418a0af4cb1227e8e6fe4148fc
      56caf540
    • Aaron An's avatar
      res/res_pjsip: Add preferred_codec_only config to pjsip endpoint. · 2a50c291
      Aaron An authored
      This patch add config to pjsip by endpoint.
      ;preferred_codec_only=yes
      ; Respond to a SIP invite with the single most preferred codec
      ; rather than advertising all joint codec capabilities. This
      ; limits the other side's codec choice to exactly what we prefer.
      
      ASTERISK-26317 #close
      Reported by: AaronAn
      Tested by: AaronAn
      
      Change-Id: Iad04dc55055403bbf5ec050997aee2dadc4f0762
      2a50c291
  9. Sep 02, 2016
  10. Aug 26, 2016
    • Alexander Traud's avatar
      sip_to_pjsip: Migrate IPv4/IPv6 (Dual Stack) configurations. · f35501b8
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, and your sip.conf is
      configured with bindaddr=::, two transports are written to pjsip.conf, one for
      0.0.0.0 (IPv4) and one for [::] (IPv6). That way, PJProject listens on the IPv4
      and IPv6 wildcards; a IPv4/IPv6 Dual Stack configuration on a single interface
      like in chan_sip.
      
      Furthermore, the script internal functions "build_host" and "split_hostport"
      did not parse Literal IPv6 addresses as expected (like [::1]:5060). This change
      makes sure, even such addresses are parsed correctly.
      
      ASTERISK-26309
      
      Change-Id: Ia4799a0f80fc30c0550fc373efc207c3330aeb48
      f35501b8
  11. Aug 19, 2016
    • Alexander Traud's avatar
      sip_to_pjsip: Add cert_file. · 02a82f75
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, cert_file was not migrated to
      pjsip.conf. A previous change regarding this contained a copy/paste error.
      
      ASTERISK-22374
      
      Change-Id: I0fa72e9412117d53b4284fc6b83fa5b2b95ba03b
      02a82f75
  12. Aug 18, 2016
    • Kevin Harwell's avatar
      sip_to_pjsip: Set correct tls transport method · 96652724
      Kevin Harwell authored
      A recent update had a copy/paste error where the unused variable 'val' was
      being passed to the set_value function instead of the 'method' value itself.
      
      This patch passes in the right variable.
      
      ASTERISK-22374
      
      Change-Id: I895b7b3779ce4442bc58b8ec40d59dd29bb43f06
      96652724
    • Alexander Traud's avatar
      sip_to_pjsip: Map the TLS method correctly. · e55d1e47
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py and tlsclientmethod is not set
      in sip.conf, the default value of chan_sip (sslv23) is copied to pjsip.conf, to
      overwrite the default of the PJProject (tlsv1). This makes sure, res_pjsip is
      offering/using not just TLSv1.0 but TLSv1.2 as well.
      
      ASTERISK-22374
      
      Change-Id: Ie530a3dae9926ae14f3920a21be1e2edb15bda4f
      e55d1e47
    • Alexander Traud's avatar
      sip_to_pjsip: Add compactheaders, timerb, timert1, and useragent. · da14c439
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, no section of type=system or
      type=general were created. Therefore the keys compactheaders, timerb, timert1,
      and useragent were not migrated to pjsip.conf.
      
      ASTERISK-22374
      
      Change-Id: I318a453843227ea36bf130d392d4abd7bd26b5a1
      da14c439
    • Alexander Traud's avatar
      sip_to_pjsip: Map (session-)timers correctly. · 675721a7
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, session-timers=accept and
      session-timers=refuse were mapped to wrong values.
      
      ASTERISK-22374
      
      Change-Id: Ie4e90d5f6a29aff07837b7fe5bc8aea5fb6fc092
      675721a7
    • Alexander Traud's avatar
      sip_to_pjsip: Write username even without authname. · acc5237e
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, now the (mandatory) username is
      written to pjsip.conf, even if there was no (optional) authname in the register
      string in sip.conf.
      
      ASTERISK-22374
      
      Change-Id: Ie53e1997104cd2674821688b8a8247249f5e156f
      acc5237e
    • Alexander Traud's avatar
      sip_to_pjsip: Parse register even with transport. · 3eb02235
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py and the register string
      started with a transport in sip.conf - like tls://... - register was not parsed
      correctly and therefore not migrated correctly to pjsip.conf.
      
      ASTERISK-22374
      
      Change-Id: I44c12104eea2bd8558ada6d25d77edfecd92edd2
      3eb02235
    • Alexander Traud's avatar
      sip_to_pjsip: Write local_net, contact_acl, contact_deny, and contact_permit. · 9907e2b1
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, those keys got missing. These
      keys might appear several times and the function "merge_value" tried to collect
      those. However, because these keys have different names in sip.conf and
      pjsip.conf, "merge_value" was not able to find the new key name in sip.conf.
      This change lets "merge_value" search with the old key name in sip.conf and
      write with the new key name in pjsip.conf.
      
      ASTERISK-22374
      
      Change-Id: Ie53c5278ae6f1cb8fa7e96c5289877d46981d9d2
      9907e2b1
    • Alexander Traud's avatar
      sip_to_pjsip: Map externhost/ip to Transports. · c0e00757
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, the externhost or externip of
      sip.conf were erroneously written to Endpoints instead to Transports.
      
      ASTERISK-22374
      
      Change-Id: I2c5873386cfc388899fa9cf2368639dd12f1b8e4
      c0e00757
    • Alexander Traud's avatar
      sip_to_pjsip: Add defaultexpiry, maxexpiry, and minexpiry. · a937c2cc
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, defaultexpiry, maxexpiry, and
      minexpiry were not migrated to pjsip.conf.
      
      ASTERISK-22374
      
      Change-Id: I007fbf543dcadc96fc3ed71c54da502bcb209b7b
      a937c2cc
    • Alexander Traud's avatar
      sip_to_pjsip: Write media_encryption. · 163cc2d6
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, encryption=yes got missing and
      media_encryption=sdes was not written to pjsip.conf, because of a typo.
      
      ASTERISK-22374
      
      Change-Id: I0fc3e55dc512a57603ae0fef41baacccf2a35c05
      163cc2d6
    • Alexander Traud's avatar
      sip_to_pjsip: Write cos and tos. · d8b59707
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, both tos_sip and cos_sip got
      missed, because of a typo. Therefore, cos and tos were not written to
      pjsip.conf. Furthermore, that revealed a misuse of an internal function, caused
      by a copy-and-paste error.
      
      ASTERISK-22374
      
      Change-Id: Id245ebadf70ab9776eb280c026288540af3af5c2
      d8b59707
    • Alexander Traud's avatar
      sip_to_pjsip: Add cert_file and ca_list_path. · 38491401
      Alexander Traud authored
      When using the migration script sip_to_pjsip.py, cert_file and ca_list_path were
      not migrated to pjsip.conf.
      
      ASTERISK-22374
      
      Change-Id: I4612877d190b7f86a48698cefbf5c4db6c265825
      38491401
  13. Aug 17, 2016
    • George Joseph's avatar
      res_pjsip: Add contact_user to endpoint · 534063fd
      George Joseph authored
      contact_user, when specified on an endpoint, will override the user
      portion of the Contact header on outgoing requests.
      
      Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4
      534063fd
  14. Aug 11, 2016
    • Kevin Harwell's avatar
      alembic: add auth_username to endpoint's identify_by enum · b3c2f116
      Kevin Harwell authored
      A new identify_by option was added recently, auth_username. However, this
      setting was not added as an allowable choice in the database enumeration
      value.
      
      This patch updates the current enumeration, adding in the new setting.
      
      ASTERISK-26268 #close
      
      Change-Id: Ib4788e8485e4cd40172ec0abbf5810a147ab8bf8
      b3c2f116
  15. Aug 10, 2016
    • Kevin Harwell's avatar
      alembic/sqlalchemy: auto increment only allowed on a single column · d4170df4
      Kevin Harwell authored
      The extensions table defined two columns (id and priority) as primary key
      autoincrement columns. However only one is allowed when defining the primary
      key.
      
      This patch removes the autoincrement attribute from the priority column since
      it does not need to be as such and really should not have been on there in the
      first place.
      
      This patch also removes 'context', 'exten', and 'priority' from the primary key
      index and creates a new combined unique contraint index on them.
      
      ASTERISK-26183 #close
      
      Change-Id: Ib9c712c612a4d7ec1edb0dcb77f1bae0905a470b
      d4170df4
  16. Aug 08, 2016
    • Alexei Gradinari's avatar
      res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack · 403b6357
      Alexei Gradinari authored
      The PJSIP taskprocessors could be overflowed on startup
      if there are many (thousands) realtime endpoints
      configured with unsolicited mwi.
      The PJSIP stack could be totally unresponsive for a few minutes
      after boot completed.
      
      This patch creates a separate PJSIP serializers pool for mwi
      and makes unsolicited mwi use serializers from this pool.
      This patch also adds 2 new global options to tune taskprocessor
      alert levels: 'mwi_tps_queue_high' and 'mwi_tps_queue_low'.
      
      This patch also adds new global option 'mwi_disable_initial_unsolicited'
      to disable sending unsolicited mwi to all endpoints on startup.
      If disabled then unsolicited mwi will start processing
      on next endpoint's contact update.
      
      ASTERISK-26230 #close
      
      Change-Id: I4c8ecb82c249eb887930980a800c9f87f28f861a
      403b6357
  17. Aug 03, 2016
  18. Jul 29, 2016
  19. Jul 26, 2016
    • Joshua Colp's avatar
      astconfigparser.py: Update with realtime fixes. · 1e7168ae
      Joshua Colp authored
      When configuring SIP URIs in the pjsip.conf file it is
      necessary to escape the semicolon so the parser does not
      treat it as a comment. This change allows this to work in
      the astconfigparser implementation.
      
      A secondary bug where some data was lost if a configuration
      option included a "=" in its value was also fixed.
      
      A bug where sections would be considered equal despite
      being different has also been fixed.
      
      Change-Id: If229f656ef22050b50e7b34e90c4bffe796431f8
      1e7168ae
  20. Jul 22, 2016
    • Mark Michelson's avatar
      Fix sqlalchemy error regarding identifier length. · 76781a09
      Mark Michelson authored
      sqlalchemy was complaining:
      
      sqlalchemy.exc.IdentifierError: Identifier
      'ps_contacts_qualifyfreq_exptime' exceeds maximum length of 30
      characters
      
      This fixes the problem by changing the index name to be
      "ps_contacts_qualifyfreq_exp" instead.
      
      ASTERISK-26227 #close
      Reported by Mark Michelson
      
      Change-Id: I0ed784f87504be2a59ee8d3242ef6f625d5ed1a9
      76781a09
  21. Jul 19, 2016
    • Richard Mudgett's avatar
      res_pjsip: Add fax_detect_timeout endpoint option. · e739888d
      Richard Mudgett authored
      The new endpoint option allows the PJSIP channel driver's fax_detect
      endpoint option to timeout on a call after the specified number of
      seconds into a call.  The new feature is disabled if the timeout is set
      to zero.  The option is disabled by default.
      
      ASTERISK-26214
      Reported by: Richard Mudgett
      
      Change-Id: Id5a87375fb2c4f9dc1d4b44c78ec8735ba65453d
      e739888d
  22. Jul 11, 2016
    • Alexander Traud's avatar
      install_prereq: Checkout of libSRTP 1.5.x. · 8476a933
      Alexander Traud authored
      Since 5th November 2014, the master branch of libSRTP changed the prefix of
      several member names and is not compatible with the source code in Asterisk
      anymore. Therefore instead, this change checks out the latest version of the
      libSRTP 1.5.x branch. Furthermore now, libSRTP is compiled with OpenSSL as
      backend. This makes AES-GCM and AES-IN possible.
      
      ASTERISK-22131 #close
      
      Change-Id: I2e396cdc01da0ff610686e398ed210ca7408f7d6
      8476a933
  23. Jul 06, 2016
    • Alexei Gradinari's avatar
      res_pjsip: Added "subscribe_context" to endpoint · 1c949eea
      Alexei Gradinari authored
      If specified, incoming SUBSCRIBE requests will be searched for the matching
      extension in the indicated context. If no "subscribe_context" is specified,
      then the "context" setting is used.
      
      ASTERISK-25471 #close
      
      Change-Id: I3fb7a15f5bc154079bd348c08b7ad1cdd2d5e514
      1c949eea
  24. Jun 22, 2016
    • Alexei Gradinari's avatar
      res_pjsip: improve realtime performance #2 · 6fa3ed06
      Alexei Gradinari authored
      The patch removes updating all Endpoints' status on startup.
      Instead, only non-qualified aors with static contact
      and non-qualified non-expired contacts are retrieved from the realtime to
      update the endpoint status to ONLINE.
      The endpoint name was added to the contact object to simply find the endpoint
      that created this contact.
      
      The status of endpoints with qualified aors will be updated by 'qualify'
      functions.
      
      ASTERISK-26061 #close
      
      Change-Id: Id324c1776fa55d3741e0c5457ecac0304cb1a0df
      6fa3ed06
Loading