Skip to content
Snippets Groups Projects
  1. Sep 12, 2018
  2. Sep 07, 2018
  3. Sep 06, 2018
  4. Sep 05, 2018
  5. Sep 03, 2018
  6. Aug 31, 2018
  7. Aug 30, 2018
  8. Aug 29, 2018
  9. Aug 28, 2018
    • Sean Bright's avatar
      res_pjsip_transport_websocket: Properly set src_name for IPv6 · 39459b1e
      Sean Bright authored
      SIP responses over WebSockets when the client is using IPv6 have invalid
      Via headers according to RFC 3261. The 'received' header parameter
      should not be wrapped in brackets if it is an IPv6 address.
      
      When src_name is populated by the built-in PJSIP transports, the code
      uses pj_sockaddr_print() with 'flags' set to 0, meaning that the
      brackets are not rendered around IPv6 addresses.
      
      This may be related to ASTERISK~27101.
      
      See also: https://github.com/onsip/SIP.js/pull/594
      
      ASTERISK-28020 #close
      
      Change-Id: I8ea9d289901b837512bee2ca2535e3dc14f04d77
      39459b1e
  10. Aug 27, 2018
    • Corey Farrell's avatar
      Create --disable-binary-modules option. · a2001c00
      Corey Farrell authored
      This new option can be passed for ./configure or
      ./tests/CI/buildAsterisk.sh to prevent download/install of binary
      modules.
      
      Normally enabling the categories MENUSELECT_CODECS or MENUSELECT_RES
      will result in binary modules being enabled even if the build target is
      incompatible with those modules.  This includes CI scripts which enable
      categories before disabling specific modules.
      
      If more binary modules are offered in the future this will help avoid
      accidentally downloading them if unwanted or incompatible.  Adding a
      binary module will only require creating a new menuselect entry similar
      to the existing ones, it will not be necessary to modify the CI scripts.
      
      Change-Id: I6b1bd1c75a2e48f05b8b8a45b7a7a2d00a079166
      a2001c00
    • neutrino88's avatar
      res/res_rtp_asterisk: remove debug traces generated by an empty frame · 28901623
      neutrino88 authored
      The realtime text timer pops regularly and sends text frames even if
      the buffer is empty. This causes a lot of unecessary debug logging.
      
      * Made red_write() test if we need to send a frame before calling
      ast_rtp_write()
      
      ASTERISK-28002
      Reported by: Emmanuel BUU
      Tested by: Emmanuel BUU
      
      Change-Id: Icf81310c3b8080b615a42060afc02ab41f9523dd
      28901623
    • Jenkins2's avatar
      9189c266
    • George Joseph's avatar
  11. Aug 24, 2018
    • Jaco Kroon's avatar
      chan_sip: improved ip:port finding of peers for non-UDP transports. · 96807905
      Jaco Kroon authored
      Also remove function peer_ipcmp_cb since it's not used (according to
      rmudgett).
      
      Prior to b2c4e866 (ASTERISK_27457)
      insecure=port was the defacto standard.  That commit also prevented
      insecure=port from being applied for sip/tcp or sip/tls.
      
      Into consideration there are three sets of behaviour:
      
      1.  "previous" - before the above commit.
      2.  "current" - post above commit, pre this one.
      3.  "new" - post this commit.
      
      The problem that the above commit tried to address was guests over TCP.
      It succeeded in doing that but broke transport!=udp with host!=dynamic.
      
      This commit attempts to restore sane behaviour with respect to
      transport!=udp for host!=dynamic whilst still retaining the guest users
      over tcp.
      
      It should be noted that when looking for a peer, two passes are made, the
      first pass doesn't have SIP_INSECURE_PORT set for the searched-for peer,
      thus looking for full matches (IP + Port), the second pass sets
      SIP_INSECURE_PORT, thus expecting matches on IP only where the matched
      peer allows for that (in the author's opinion:  UDP with insecure=port,
      or any TCP based, non-dynamic host).
      
      In previous behaviour there was special handling for transport=tcp|tls
      whereby a peer would match during the first pass if the utilized
      transport was TCP|TLS (and the peer allowed that specific transport).
      
      This behaviour was wrong, or dubious at best.  Consider two dynamic tcp
      peers, both registering from the same IP (NAT), in this case either peer
      could match for connections from an IP.  It's also this behaviour that
      prevented SIP guests over tcp.
      
      The above referenced commit removed this behaviour, but kept applying
      the SIP_INSECURE_PORT only to WS|WSS|UDP.  Since WS and WSS is also TCP
      based, the logic here should fall into the TCP category.
      
      This patch updates things such that the previously non-explicit (TCP
      behaviour) transport test gets performed explicitly (ie, matched peer
      must allow for the used transport), as well as the indeterministic
      source-port nature of the TCP protocol is taken into account.  The new
      match algorithm now looks like:
      
      1.  As per previous behaviour, IP address is matched first.
      
      2.  Explicit filter with respect to transport protocol, previous
          behaviour was semi-implied in the test for TCP pure IP match - this now
          made explicit.
      
      3.  During first pass (without SIP_INSECURE_PORT), always match on port.
      
      4.  If doing UDP, match if matched against peer also has
          SIP_INSECURE_PORT, else don't match.
      
      5.  Match if not a dynamic host (for non-UDP protocols)
      
      6.  Don't match if this is WS|WSS, or we can't trust the Contact address
          (presumably due to NAT)
      
      7.  Match (we have a valid Contact thus if the IP matches we have no
          choice, this will likely only apply to non-NAT).
      
      To logic-test this we need a few different scenarios.  Towards this end,
      I work with a set number of peers defined in sip.conf:
      
      [peer1]
      host=1.1.1.1
      transport=tcp
      
      [peer2]
      host=1.1.1.1
      transport=udp
      
      [peer3]
      host=1.1.1.1
      port=5061
      insecure=port
      transport=udp
      
      [peer4]
      host=1.1.1.2
      transport=udp,tcp
      
      [peer5]
      host=dynamic
      transport=udp,tcp
      
      Test cases for UDP:
      
      1 - incoming UDP request from 1.1.1.1:
        - previous:
          - pass 1:
            * peer1 or peer2 if from port 5060 (indeterminate, depends on peer
              ordering)
            * peer3 if from port 5061
            * peer5 if registered from 1.1.1.1 and source port matches
          - pass 2:
            * peer3
        - current: as per previous.
        - new:
          - pass 1:
            * peer2 if from port 5060
            * peer3 if from port 5061
            * peer5 if registered from 1.1.1.1 and source port matches
          - pass 2:
            * peer3
      
      2 - incoming UDP request from 1.1.1.2:
        - previous:
          - pass 1:
            * peer5 if registered from 1.1.1.2 and port matches
            * peer4 if source port is 5060
          - pass 2:
            * no match (guest)
        - current: as previous.
        - new as previous (with the variation that if peer5 didn't have udp as
                allowed transport it would not match peer5 whereas previous
                and current code could).
      
      3 - incoming UDP request from anywhere else:
        - previous:
          - pass 1:
            * peer5 if registered from that address and source port matches.
          - pass 2:
            * peer5 if insecure=port is additionally set.
            * no match (guest)
        - current - as per previous
        - new - as per previous
      
      Test cases for TCP based transports:
      
      4 - incoming TCP request from 1.1.1.1
        - previous:
          - pass 1 (indeterministic, depends on ordering of peers in memory):
            * peer1; or
            * peer5 if peer5 registered from 1.1.1.1 (irrespective of source port); or
            * peer2 if the source port happens to be 5060; or
            * peer3 if the source port happens to be 5061.
          - pass 2: cannot happen since pass 1 will always find a peer.
        - current:
          - pass 1:
            * peer1 or peer2 if from source port 5060
            * peer3 if from source port 5060
            * peer5 if registered as 1.1.1.1 and source port matches
          - pass 2:
            * no match (guest)
        - new:
          - pass 1:
            * peer 1 if from port 5060
            * peer 5 if registered and source port matches
          - pass 2:
            * peer 1
      
      5 - incoming TCP request from 1.1.1.2
        - previous (indeterminate, depends on ordering):
          - pass 1:
            * peer4; or
            * peer5 if peer5 registered from 1.1.1.2
          - pass 2: cannot happen since pass 1 will always find a peer.
        - current:
          - pass 1:
            * peer4 if source port is 5060
            * peer5 if peer5 registered as 1.1.1.2 and source port matches
          - pass 2:
            * no match (guest).
        - new:
          - pass 1:
            * peer4 if source port is 5060
            * peer5 if peer5 registered as 1.1.1.2 and source port matches
          - pass 2:
            * peer4
      
      6 - incoming TCP request from anywhere else:
        - previous:
          - pass 1:
            * peer5 if registered from that address
          - pass 2: cannot happen since pass 1 will always find a peer.
        - current:
          - pass 1:
            * peer5 if registered from that address and port matches.
          - pass 2:
            * no match (guest)
        - new: as per current.
      
      It should be noted the test cases don't make explicit mention of TLS, WS
      or WSS.  WS and WSS previously followed UDP semantics, they will now
      enforce source port matching.  TLS follow TCP semantics.
      
      The previous commit specifically tried to address test-case 6, but broke
      test-cases 4 and 5 in the process.
      
      ASTERISK-27881 #close
      
      Change-Id: I61a9804e4feba9c7224c481f7a10bf7eb7c7f2a2
      96807905
  12. Aug 23, 2018
    • Jaco Kroon's avatar
      AMI: be less verbose when adding HTTP headers to AMI/HTTP messages. · a74f8e51
      Jaco Kroon authored
      All HTTP/AMI message headers are being sent to the verbose channel.
      There are multiple places this is happening.  Consolidate the loop into
      a function.  Drop the debug/verbose message.
      
      Convert to using ast_asprintf to perform the length calculation, memory
      allocation and snprintf all in one step.
      
      Change-Id: Ic45e673fde05bd544be95ad5cdbc69518207c1a1
      a74f8e51
    • Jenkins2's avatar
      8b9f0134
    • Florian Floimair's avatar
      alembic: increase uri column size · 3bdbbb76
      Florian Floimair authored
      When mobile SIP clients register with Asterisk that use some sort of
      push notifications, the URI can get quite lengthy due to the
      additional push-service annotations (things like tokens, pn-type, etc.)
      contained in it.
      
      ASTERISK-28022 #close
      
      Change-Id: I4c7ceadc3bb405f3daf722641c8cd5ca4188cc37
      3bdbbb76
  13. Aug 22, 2018
    • Matthew Fredrickson's avatar
      sample_configs: noload res_hep.so by default · c8bacd45
      Matthew Fredrickson authored
      Change disables loading of res_hep.so in default installation.  Loading
      res_hep has a performance impact whether it's used or not.  This disables
      loading of it in sample config files.
      
      Change-Id: I5ec150cf941634fabc72973e5bf1a965cb0ef9d0
      c8bacd45
    • Joshua Colp's avatar
    • Sean Bright's avatar
      app_queue: Silence GCC 8 compiler warning · 14c6f8be
      Sean Bright authored
      I'm only seeing an error in 14+, so I assume it is due to different
      compiler options:
      
      app_queue.c: In function ‘handle_queue_add_member’:
      app_queue.c:10234:19: error: ‘%d’ directive writing between 1 and 11
          bytes into a region of size 3 [-Werror=format-overflow=]
           sprintf(num, "%d", state);
                         ^~
      app_queue.c:10234:18: note: directive argument in the range
          [-2147483648, 99]
           sprintf(num, "%d", state);
                        ^~~~
      
      Compiler: gcc version 8.0.1 20180414 (experimental)
          [trunk revision 259383] (Ubuntu 8-20180414-1ubuntu2) 
      
      Change-Id: I18577590da46829c1ea7d8b82e41d69f105baa10
      14c6f8be
  14. Aug 21, 2018
Loading