Skip to content
Snippets Groups Projects
  1. Apr 27, 2015
    • Corey Farrell's avatar
      Astobj2: Allow reference debugging to be enabled/disabled by config. · 5c1d07ba
      Corey Farrell authored
      * The REF_DEBUG compiler flag no longer has any effect on code that uses
        Astobj2.  It is used to determine if reference debugging is enabled by
        default.  Reference debugging can be enabled or disabled in asterisk.conf.
      * Caller information is provided in logger errors for ao2 bad magic numbers.
      * Optimizes AO2 by merging internal functions with the public counterpart.
        This was possible now that we no longer require a dual ABI.
      
      ASTERISK-24974 #close
      Reported by: Corey Farrell
      
      Change-Id: Icf3552721fe999365ba8a8cf00a965aa6b897cc1
      5c1d07ba
  2. Apr 26, 2015
  3. Apr 24, 2015
    • Matt Jordan's avatar
    • Matt Jordan's avatar
    • Kevin Harwell's avatar
      app_confbridge: Default the template option to a compatible default profile. · 9f65ea48
      Kevin Harwell authored
      Confbridge dynamic profiles did not have a default profile unless you
      explicitly used Set(CONFBRIDGE(bridge,template)=default_bridge). If a
      template was not set prior to the bridge being created then some
      options were left with no default values set. This patch makes it so
      the default templates are set to the default bridge and user profiles.
      
      ASTERISK-24749 #close
      Reported by: philippebolduc
      
      Change-Id: I1bd6e94b38701ac2112d842db68de63d46f60e0a
      9f65ea48
    • Joshua Colp's avatar
      Merge "CHANGES remove tab space" · 1ec829a7
      Joshua Colp authored
      1ec829a7
    • Joshua Colp's avatar
      b9514a17
    • Olle E. Johansson's avatar
      CREDITS: Update credits for Olle Johansson · cafdb7a0
      Olle E. Johansson authored
      Change-Id: I8f3d0a6c3f1075a1f7d8308593394611a96749de
      cafdb7a0
    • Mark Michelson's avatar
      res_pjsip_outbound_authenticator: Increase CSeq on authed requests. · bd61c930
      Mark Michelson authored
      The way PJSIP generates an authenticated request is to use a previous
      request as a template. This means that the authenticated request will
      have the same Call-ID, From header (including tag), and CSeq as the
      original request. PJSIP generates a new branch on the Via header to
      indicate that this is a new transaction, though.
      
      There are some SIP implementations, though, that do not notice the
      change in the branch and therefore will match the authed request to the
      original request's transaction. Since the CSeq is the same, the server
      will repeat the response it sent to the original request.
      
      This patch aids interoperability by increasing the CSeq of the authed
      request by one.
      
      ASTERISK-24845 #close
      Reported by: Carl Fortin
      Tested by: Carl Fortin
      
      Change-Id: I39c4ca52e688a9f83bcc1878371334becdc5be01
      bd61c930
    • Diederik de Groot's avatar
      Clang: Fix some more tautological-compare warnings. · f8e21a1a
      Diederik de Groot authored
      clang can warn about a so called tautological-compare, when it finds
      comparisons which are logically always true, and are therefor deemed
      unnecessary.
      
      Exanple:
      unsigned int x = 4;
      if (x > 0)    // x is always going to be bigger than 0
      
      Enum Case:
      Each enumeration is its own type. Enums are an integer type but they
      do not have to be *signed*. C leaves it up to the compiler as an
      implementation option what to consider the integer type of a particu-
      lar enumeration is. Gcc treats an enum without negative values as
      an int while clang treats this enum as an unsigned int.
      
      rmudgett & mmichelson: cast the enum to (unsigned int) in assert.
      The cast does have an effect. For gcc, which seems to treat all enums
      as int, the cast to unsigned int will eliminate the possibility of
      negative values being allowed. For clang, which seems to treat enums
      without any negative members as unsigned int, the cast will have no
      effect. If for some reason in the future a negative value is ever
      added to the enum the assert will still catch the negative value.
      
      ASTERISK-24917
      Change-Id: Ief23ef68916192b9b72dabe702b543ecfeca0b62
      f8e21a1a
    • Matt Jordan's avatar
  4. Apr 23, 2015
    • Mark Michelson's avatar
    • Mark Michelson's avatar
      res_pjsip_t38: Don't crash on authenticated reinvite after originated T.38 FAX. · 89a3fc05
      Mark Michelson authored
      When Asterisk originates a channel to an application, the channel is
      hung up once the application finishes executing. When the application
      in question is SendFax, the Asterisk PJSIP code will attempt to reinvite
      the T.38 session to audio after the FAX completes. The hangup of the
      channel happens in the midst of this reinvite transaction. In most
      circumstances, this works out okay because the BYE is delayed until the
      reinvite transaction can complete.
      
      However, if the reinvite that Asterisk sends receives a 401/407
      response, then Asterisk's attempt to re-send the reinvite with
      authentication will fail. This is because the session supplement in
      res_pjsip_t38 makes the assumption that the channel on the session will
      always be non-NULL. Since the channel has been hung up, though, the
      channel is now NULL. Attempting to operate on the channel causes a
      crash.
      
      This patch fixes the issue by ensuring that the channel on the session
      is not NULL before attempting to mess with the T.38 framehook.
      
      This patch also contains some corrections for comments that were
      incorrect and really confused me when I first started looking at the
      code.
      
      ASTERISK-25004 #close
      Reported by Mark Michelson
      
      Change-Id: Ic5a1230668369dda4bb13524098aed9306ab45a0
      89a3fc05
    • George Joseph's avatar
      res_pjsip: Validate that contact uris start with sip: or sips: · 75666ad7
      George Joseph authored
      Currently we use pjsip_parse_hdr to validate contact uris but it
      appears that it allows uris without a scheme if there's a port
      supplied.  I.E myexample.com will fail but myexample.com:5060 will
      pass even though it has no scheme.  This causes SEGVs later on
      whenever the uri is used.
      
      To prevent this, permanent_contact_validate has been updated to check
      that the scheme is either 'sip' or 'sips'.
      
      2 uses of possibly-null endpoint have also been fixed in
      create_out_of_dialog_request.
      
      ASTERISK-24999
      
      Change-Id: Ifc17d16a4923e1045d37fe51e43bbe29fa556ca2
      Reported-by: Brad Latus
      75666ad7
    • Diederik de Groot's avatar
      Clang: change previous tautological-compare fixes. · ca719316
      Diederik de Groot authored
      clang can warn about a so called tautological-compare, when it finds
      comparisons which are logically always true, and are therefor deemed
      unnecessary.
      
      Exanple:
      unsigned int x = 4;
      if (x > 0)    // x is always going to be bigger than 0
      
      Enum Case:
      Each enumeration is its own type. Enums are an integer type but they
      do not have to be *signed*. C leaves it up to the compiler as an
      implementation option what to consider the integer type of a particu-
      lar enumeration is. Gcc treats an enum without negative values as
      an int while clang treats this enum as an unsigned int.
      
      rmudgett & mmichelson: cast the enum to (unsigned int) in assert.
      The cast does have an effect. For gcc, which seems to treat all enums
      as int, the cast to unsigned int will eliminate the possibility of
      negative values being allowed. For clang, which seems to treat enums
      without any negative members as unsigned int, the cast will have no
      effect. If for some reason in the future a negative value is ever
      added to the enum the assert will still catch the negative value.
      
      ASTERISK-24917
      
      Change-Id: I0557ae0154a0b7de68883848a609309cdf0aee6a
      ca719316
    • Matt Jordan's avatar
    • Matt Jordan's avatar
      Merge "New AMI Command Output Format" · 5ae61cf1
      Matt Jordan authored
      5ae61cf1
    • George Joseph's avatar
      res_corosync: Add check for config file before calling corosync apis · cc77440d
      George Joseph authored
      On some systems, res_corosync isn't compatible with the installed version of
      corosync so corosync_cfg_initialize fails, load_module returns LOAD_FAILURE,
      and Asterisk terminates.  The work around has been to remember to add
      res_corosync as a noload in modules.conf.  A better solution though is to have
      res_corosync check for its config file before attempting to call corosync apis
      and return LOAD_DECLINE if there's no config file.  This lets Asterisk loading
      continue.
      
      If you have a res_corosync.conf file and res_corosync fails, you get the same
      behavior as today and the fatal error tells you something is wrong with the
      install.
      
      ASTERISK-24998
      
      Change-Id: Iaf94a9431a4922ec4ec994003f02135acfdd3889
      cc77440d
    • Corey Farrell's avatar
      Astobj2: Ensure all calls to __adjust_lock pass a valid object. · c231c85e
      Corey Farrell authored
      __adjust_lock doesn't check for invalid objects, and doesn't have an
      appropriate return value for invalid objects.  Most callers of
      __adjust_lock pass objects that have already been confirmed valid,
      this change adds checks before the remaining calls.
      
      ASTERISK-24997 #close
      Reported by: Corey Farrell
      
      Change-Id: I669100f87937cc3f867cec56a27ae9c01292908f
      c231c85e
  5. Apr 22, 2015
  6. Apr 21, 2015
    • Rodrigo Ramírez Norambuena's avatar
      CHANGES remove tab space · 2a36bb5d
      Rodrigo Ramírez Norambuena authored
      Change-Id: I6b43e43474bf6fb77b8227eadb036036f8e90521
      2a36bb5d
    • Corey Farrell's avatar
      Check for ao2_alloc failure in __ast_channel_internal_alloc. · 5757d2d3
      Corey Farrell authored
      Fix a crash that could occur in __ast_channel_internal_alloc if
      ao2_alloc fails.
      
      ASTERISK-24991 #close
      
      Change-Id: I4ca89189eb22f907408cb87d0a1645cfe1314a90
      5757d2d3
    • Mark Michelson's avatar
      res_pjsip_pubsub: Set the endpoint on SUBSCRIBE dialogs. · 6331be06
      Mark Michelson authored
      When SUBSCRIBE dialogs were established, we never associated
      the endpoint that created the subscription with the dialog
      we end up creating. In most cases, this ended up not causing
      any problems.
      
      The actual bug that was observed was that when a device that
      was behind NAT established a subscription with Asterisk, Asterisk
      would end up sending in-dialog NOTIFY requests to the device's
      private IP addres instead of the public address of the NAT router.
      
      When Asterisk receives the initial SUBSCRIBE from the device,
      res_pjsip_nat rewrites the contact to the public address on which the
      SUBSCRIBE was received. This allows for the dialog to have its target
      address set to the proper public address. Asterisk then would send a 200
      OK response to the SUBSCRIBE, then a NOTIFY with the initial
      subscription state. The device would then send a 200 OK response to
      Asterisk's NOTIFY.
      
      Here's where things went wrong. When the 200 OK arrived, res_pjsip_nat
      did not rewrite the address in the Contact header. Then, when the PJSIP
      dialog layer processed the 200 OK, PJSIP would perform a comparison
      between the IP address in the Contact header and its saved target
      address for the dialog. Since they differed, PJSIP would update the
      target dialog address to be the address in the Contact header. From this
      point, if Asterisk needed to send a NOTIFY to the device, the result was
      that the NOTIFY would be sent to the private address that the device
      placed in the Contact header.
      
      The reason why res_pjsip_nat did not rewrite the address when it
      received the 200 OK response was that it could not associate the
      incoming response with a configured endpoint. This is because on a
      response, the only way to associate the response to an endpoint is by
      finding the dialog that the response is associated with and then finding
      the endpoint that is associated with that dialog. We do not perform
      endpoint lookups on responses. res_pjsip_pubsub skipped the step of
      associating the endpoint with the dialog we created, so res_pjsip_nat
      could not find the associated endpoint and therefore couldn't rewrite
      the contact.
      
      This commit message is like 50x longer than the actual fix.
      
      ASTERISK 24981 #close
      Reported by Mark Michelson
      
      Change-Id: I2b963c58c063bae293e038406f7d044a8a5377cd
      6331be06
    • Gareth Palmer's avatar
      New AMI Command Output Format · 2f418c05
      Gareth Palmer authored
      This change modifies how the the output from a CLI command is sent
      to a client over AMI.
      
      Output from the CLI command is now sent as a series of zero-or-more
      Output: headers.
      
      Additionally, commands that fail to execute (eg: no such command,
      invalid syntax etc.) now cause an Error response instead of Success.
      
      If the command executed successfully, but the manager unable to
      provide the output the reason will be included in the Message:
      header. Otherwise it will contain 'Command output follows'.
      
      Depends on a new version of starpy (> 1.0.2) that supports the new
      output format.
      
      See pull-request https://github.com/asterisk/starpy/pull/34
      
      ASTERISK-24730
      
      Change-Id: I6718d95490f0a6b3f171c1a5cdad9207f9a44888
      2f418c05
    • Richard Mudgett's avatar
      chan_dahdi/sig_pri: Make post AMI HangupRequest events on PRI channels. · 614f5066
      Richard Mudgett authored
      The chan_dahdi channel driver is a very old driver.  The ability for it to
      support ISDN was added well after the initial analog support.  Setting the
      softhangup flags is a carry over from the original analog code.  The
      driver was not updated to call ast_queue_hangup() which will post the AMI
      HangupRequest event.
      
      * Changed sig_pri.c to call ast_queue_hangup() instead of setting the
      softhangup flag when the remote party initiates a hangup.
      
      ASTERISK-24895 #close
      Reported by: Andrew Zherdin
      
      Change-Id: I5fe2e48556507785fd8ab8e1c960683fd5d20325
      614f5066
  7. Apr 20, 2015
Loading