summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-12-08codec_resample: Increase buffer for Opus Codec with FEC.Alexander Traud
ASTERISK-25599 #close Change-Id: Idbd187f711b2ec63dda949ca0f79aa0c1a0a0b6e
2015-12-07chan_sip: Fix crash involving the bogus peer during sip reload.Richard Mudgett
A crash happens sometimes when performing a CLI "sip reload". The bogus peer gets refreshed while it is in use by a new call which can cause the crash. * Protected the global bogus peer object with an ao2 global object container. ASTERISK-25610 #close Change-Id: I5b528c742195681abcf713c6e1011ea65354eeed
2015-12-07chan_sip: Support parsing of Q.850 reason header in SIP BYE and CANCEL requests.Christof Lauber
Current support for reason header did work only in SIP responses. According to RFC3336 the reason header might appear in any SIP request. But it seems to make most sence in BYE and CANCEL so parasing is done there too (if use_q850_reason=yes). Change-Id: Ib6be7b34c23a76d0e98dfd0816c89931000ac790
2015-12-07Merge "res_pjsip/contacts/statsd: Make contact lifecycle events more ↵Joshua Colp
consistent"
2015-12-06Revert "bridges/bridge_t38: Add a bridging module for managing T.38 state"Matt Jordan
This reverts commit f42d22d3a1ca5c8ea73df99a50c6a28caa8f8749. Unfortunately, using a bridge to manage T.38 state will cause severe deadlocks in core_unreal/chan_local. Local channels attempt to reach across both their peer and the peer's bridge to inspect T.38 state. Given the propensity of Local channel chains, managing the locking situation in such a scenario is practically infeasible. Change-Id: I932107387c13aad2c75a7a4c1e94197a9d6d8a51
2015-12-04res_pjsip/contacts/statsd: Make contact lifecycle events more consistentGeorge Joseph
It will never be perfect or even pretty, mostly because of the differences between static and dynamic contacts. Created: Can't use the contact or contact_status alloc functions because the objects come and go regardless of the actual state. Can't use the contact_apply_handler, ast_sip_location_add_contact or a sorcery created handler because they only get called for dynamic contacts. Similarly, permanent_uri_handler only gets called for static contacts. So, Matt had it right. :) ast_res_pjsip_find_or_create_contact_status is the only place it can go and not have duplicated code. Both permanent_uri_handler and contact_apply_handler call find_or_create. Removed: Can't use the destructors for the same reason as above. The only place to put this is in persistent_endpoint_contact_deleted_observer which I believe is the "correct" place but even that will handle only dynamic contacts. This doesn't called on shutdown however. There is no hook to use for static contacts that may be removed because of a config change while asterisk is in operation. I moved the cleanup of contact_status from ast_sip_location_delete_contact to the handler as well. Status Change and RTT: Although they worked fine where they were (in update_contact_status) I moved them to persistent_endpoint_contact_status_observer to make it more consistent with removed. There was logic there already to detect a state change. Finally, fixed a nit in permanent_uri_handler rmudgett reported eralier. ASTERISK-25608 #close Change-Id: I4b56e7dfc3be3baaaf6f1eac5b2068a0b79e357d Reported-by: George Joseph Tested-by: George Joseph
2015-12-04Merge "res_format_attr_vp8: In SDP, forward max-fr and max-fs for ↵Matt Jordan
video-codec VP8."
2015-12-04Merge "res_format_attr_opus: Update to latest RFC 7587."Matt Jordan
2015-12-04res_format_attr_vp8: In SDP, forward max-fr and max-fs for video-codec VP8.Alexander Traud
ASTERISK-25584 #close Change-Id: Iae00071b4ff1ae76f24995aeac4d00284fd14f91
2015-12-04Merge "bridges/bridge_t38: Add a bridging module for managing T.38 state"Matt Jordan
2015-12-04bridges/bridge_t38: Add a bridging module for managing T.38 stateMatt Jordan
When 4875e5ac32 was merged, it fixed several issues with a direct media bridge transitioning to handling a T.38 fax. However, it uncovered a race condition caused by the bridging core. When a channel involved in a T.38 fax leaves a bridge, the frame queued by the channel driver that should inform the far side that it is no longer in a T.38 fax may not make it across the bridge. The bridging framework is *extremely* aggressive in tearing down the bridge, and control frames that are currently in flight *may* get dropped. This patch adds a new module to the bridging framework, bridge_t38. This module maintains some notion of the T.38 state for the two channels in a bridge. When the bridge detects that it is being torn down or when one of the two channels leaves, it informs the respective channel(s) that they should stop faxing. This ensures that channels switch back to audio if they survive and are ejected out of a bridge while faxing. ASTERISK-25582 Change-Id: If5b0bb478eb01c4607c9f4a7fc17c7957d260ea0
2015-12-04Merge "Fix crash in audiohook translate to slin"Matt Jordan
2015-12-04res_format_attr_opus: Update to latest RFC 7587.Alexander Traud
Beside that, the format-attribute module sends only non-default values in the line fmtp, now. This avoids unnecessary overhead in SDP messages. Furthermore, previously the parameter stereo was not parsed when being the first parameter. ASTERISK-25583 #close Change-Id: Iae85ba3e5960bfd5d51cf65bcffad00dd4875a73
2015-12-03Merge "res_pjsip: Use a MD5 hash for static Contact IDs"Joshua Colp
2015-12-03Fix crash in audiohook translate to slinJonathan Rose
This patch fixes a crash which would occur when an audiohook was applied to a channel using an audio codec that could not be translated to signed linear (such as when using pass-through codecs like OPUS or when the codec translator module for the format in use is not loaded). ASTERISK-25498 #close Reported by: Ben Langfeld Change-Id: Ib6ea7373fcc22e537cad373996136636201f4384
2015-12-03Merge "res_pjsip: Update logging to show contact->uri in messages"Joshua Colp
2015-12-03Merge "app_queue: Show reason of pause on CLI"Joshua Colp
2015-12-03Merge "codec_resample: Increase buffer for Opus Codec."Joshua Colp
2015-12-03res_pjsip: Use a MD5 hash for static Contact IDsGeorge Joseph
When 90d9a70789 was merged, it mostly tested dynamic contacts created as a result of registering a PJSIP endpoint. Contacts generated in this fashion typically have a long alphanumeric string as their object identifier, which maps reasonably well for StatsD. Unfortunately, this doesn't work in the general case. StatsD treats both '.' and ':' characters as special characters. In particular, having a ':' appear in the middle of a StatsD metric will result in the metric being rejected. This causes some obvious issues with SIP URIs. The StatsD API should not be responsible for escaping the metric name passed to it. The metric is treated as a single long string, and it would be challenging to know what to escape in the string passed to the function. Likewise, we don't want to escape the metric in PJSIP, as that involves overhead that is wasted when either res_statsd isn't loaded or enabled. This patch takes an alternative approach. The Contact ID has been changed to be "aor@@uri_hash" instead of "aor@@uri". This (a) won't contain any of the aforementioned special characters, (b) can be done on Contact creation, which has minimal impact on run-time performance, and (c) also conforms to an earlier commit that changed the ID for dynamic contacts. The downside of this is that StatsD users will have to map SHA1 hashes back to the Contacts that are emitting the statistics. To that end, the CLI commands have been updated to include the first 10 characters of the MD5 hash, which should be enough to match what is shown in Graphite (or some other StatsD backend). ASTERISK-25595 #close Change-Id: Ic674a3307280365b4a45864a3571c295b48a01e2 Reported-by: Matt Jordan Tested-by: George Joseph
2015-12-03Merge "Build System: Support include-what-you-use."Joshua Colp
2015-12-03Merge "res_sorcery_memory_cache.c: Fix off nominal ref leak."Joshua Colp
2015-12-03Merge "sched.c: Make not return a sched id of 0."Joshua Colp
2015-12-03Merge "Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 ↵Joshua Colp
additions)"
2015-12-03Merge "Audit improper usage of scheduler exposed by 5c713fdf18f."Joshua Colp
2015-12-02res_pjsip: Update logging to show contact->uri in messagesGeorge Joseph
An earlier commit changed the id of dynamic contacts to contain a hash instead of the uri. This patch updates status change logging to show the aor/uri instead of the id. This required adding the aor id to contact and contact_status and adding uri to contact_status. The aor id gets added to contact and contact_status in their allocators and the uri gets added to contact_status in pjsip_options when the contact_status is created or updated. ASTERISK-25598 #close Reported-by: George Joseph Tested-by: George Joseph Change-Id: I56cbec1d2ddbe8461367dd8b6da8a6f47f6fe511
2015-12-01Unset BRIDGEPEER when leaving a bridgeJonathan Rose
Currently if a channel is transferred out of a bridge, the BRIDGEPEER variable (also BRIDGEPVTCALLID) remain set even once the channel is out of the bridge. This patch removes these variables when leaving the bridge. ASTERISK-25600 #close Reported by: Mark Michelson Change-Id: I753ead2fffbfc65427ed4e9244c7066610e546da
2015-12-01res_sorcery_memory_cache.c: Fix off nominal ref leak.Richard Mudgett
Change-Id: If83d63cf11cbc6df9b15251848b01feb570ade49
2015-12-01sched.c: Make not return a sched id of 0.Richard Mudgett
According to the API doxygen a sched ID of 0 is valid. Unfortunately, 0 was never returned historically and several users incorrectly coded usage of the returned sched ID assuming that 0 was invalid. ASTERISK-25476 Change-Id: Ib19c7ebb44ec9fd393ef6646dea806d4f34e3a20
2015-12-01Audit improper usage of scheduler exposed by 5c713fdf18f. (v13 additions)Richard Mudgett
chan_sip.c: * Initialize mwi subscription scheduler ids earlier because of ASTOBJ to ao2 conversion. * Initialize register scheduler ids earlier because of ASTOBJ to ao2 conversion. chan_skinny.c: * Fix more scheduler usage for the valid 0 id value. ASTERISK-25476 Change-Id: If9f0e5d99638b2f9d102d1ebc9c5a14b2d706e95
2015-12-01Audit improper usage of scheduler exposed by 5c713fdf18f.Richard Mudgett
channels/chan_iax2.c: * Initialize struct chan_iax2_pvt scheduler ids earlier because of iax2_destroy_helper(). channels/chan_sip.c: channels/sip/config_parser.c: * Fix initialization of scheduler id struct members. Some off nominal paths had 0 as a scheduler id to be destroyed when it was never started. chan_skinny.c: * Fix some scheduler id comparisons that excluded the valid 0 id. channel.c: * Fix channel initialization of the video stream scheduler id. pbx_dundi.c: * Fix channel initialization of the packet retransmission scheduler id. ASTERISK-25476 Change-Id: I07a3449f728f671d326a22fcbd071f150ba2e8c8
2015-12-01codec_resample: Increase buffer for Opus Codec.Alexander Traud
ASTERISK-25599 #close Change-Id: I1f88a88c59fb4e1e62bbdbb100c7152d48e73f10
2015-11-30dns: Change lookup failures from LOG_ERROR to debug 1.George Joseph
dns.c and dns_system_resolver.c were spitting out errors for lookup failures for things like not finding a SRV record even though there was an A record. Those have been changed to debug messages. Logging not finding ANY record is left to the higher level caller. Also, dns_system_resolver was using Windows line endings so I converted them to Unix style. The actual log changes are on lines 156 and 159. Change-Id: I65be16ea15304b96f9dcb4d289dbd3e2286fc094
2015-11-30Build System: Support include-what-you-use.Alexander Traud
ASTERISK-25591 #close Change-Id: I8d3efa0826142ece9cbed2fd0d46f3b607fee6ae
2015-11-28app_queue: Show reason of pause on CLIRodrigo Ramírez Norambuena
Add value of pause reason when is paused on CLI command "queue show" ASTERISK-25581 #close Report by: Rodrigo Ramírez Norambuena Change-Id: I887028a40cd97b350da9a3bb2719616b7fec9864
2015-11-27CHANGES: Fix a typoNiklas Larsson
Change-Id: Iceb3d9bb78140c376174a7bee197dfcf8ef9cda7
2015-11-25Merge "fastagi: record file closed after sending result"Matt Jordan
2015-11-25Merge "main: Slight refactor of main. Improve color situation."Matt Jordan
2015-11-25fastagi: record file closed after sending resultKevin Harwell
The fastagi record-file testsuite test sometimes fails reporting an empty recorded file. This was happening because Asterisk was sending the agi result notification prior to actually closing the file and the data, being buffered, had not been written to the file yet when the test attempts to check the file size. This patch makes it so the record file stream is closed prior to sending the agi result notification. ASTERISK-25593 #close Change-Id: I6b2b3be3ae37f7c7b18e672c419a89b3b8513cde
2015-11-25main: Slight refactor of main. Improve color situation.Walter Doekes
Several issues are addressed here: - main() is large, and half of it is only used if we're not rasterisk; fixed by spliting up the daemon part into a separate function. - Call ast_term_init from rasterisk as well. - Remove duplicate code reading/writing asterisk history file. - Attempt to tackle background color issues and color changes that occur. Tested by starting asterisk -c until the colors stopped changing at odd locations. - Remove unused term_prep() and term_prompt() functions. ASTERISK-25585 #close Change-Id: Ib641a0964c59ef9fe6f59efa8ccb481a9580c52f
2015-11-24Merge "Fixed some typos"Matt Jordan
2015-11-24Fixed some typosDavid M. Lee
Fixes some minor typos in the CHANGES file, plus an embarrasing typo in the StatsD API. Change-Id: I9ca4858c64a4a07d2643b81baa64baebb27a4eb7
2015-11-24res_pjsip_notify: Fix CLI usage infoCorey Farrell
The usage info for 'pjsip send notify' previously referenced the chan_sip configuration sip_notify.conf. Fix this to reference the correct configuration pjsip_notify.conf. ASTERISK-25590 #close Change-Id: I3898271a8e8a8b1db201741e790ebe2c6bf5cdea
2015-11-24Merge "translate: Provide translation modules the result of SDP negotiation."Joshua Colp
2015-11-23Merge "res/res_endpoint_stats: Add module to emit endpoint StatsD statistics"Matt Jordan
2015-11-23res/res_endpoint_stats: Add module to emit endpoint StatsD statisticsMatt Jordan
This patch adds a module that emits StatsD statistics about Asterisk endpoints. This includes: * A GAUGE statistic for endpoint states, tracking how many endpoints are in a particular state. * A GAUGE statistic for each endpoint, counting the number of channels currently associated with an endpoint. ASTERISK-25572 Change-Id: If7e1333c5aeda8d136850b30c2101c0ee1c97305
2015-11-23res_sorcery_realtime.c: Fix crash from NULL sorcery object type.Richard Mudgett
If the sorcery object type is not found a NULL is returned. Unfortunately, sorcery_realtime_filter_objectset() will crash after complaining about not finding the object type and saying to expect errors. * Use ao2_cleanup() instead of ao2_ref() to prevent the crash. ASTERISK-25165 Reported by Corey Farrell Change-Id: Ic3b64453ea3058cb68d5c26d97d4fe7b8eea2e97
2015-11-23Merge "chan_pjsip: Handle T.38 faxes with direct media bridges"Matt Jordan
2015-11-23Merge "res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contacts"Matt Jordan
2015-11-23res_pjsip/pjsip_options: Add StatsD statistics for PJSIP contactsMatt Jordan
This patch adds the ability to send StatsD statistics related to the state of PJSIP contacts. This includes: * A GUAGE statistic measuring the count of contacts in a particular state. This measures how many contacts are reachable, unreachable, etc. * The RTT time for each contact, if those contacts are qualified. This provides StatsD engines useful time-based data about each contact. ASTERISK-25571 Change-Id: Ib8378d73afedfc622be0643b87c542557e0b332c
2015-11-23res/res_pjsip_outbound_registration: Add registration statistics for StatsDMatt Jordan
This patch adds outbound registration statistics for StatsD. This includes the following: * A GUAGE metric for the overall count of outbound registrations. * A GUAGE metric for each state an outbound registration can be in. As the outbound registrations change state, the overall count of how many outbound registrations are in the particular state is changed. These statistics are particularly useful for systems with a large number of SIP trunks, and where measuring the change in state of the trunks is useful for monitoring. ASTERISK-25571 Change-Id: Iba6ff248f5d1c1e01acbb63e9f0da1901692eb37