summaryrefslogtreecommitdiff
path: root/res
AgeCommit message (Collapse)Author
2016-08-19Merge "res_pjsip: Add contact_user to endpoint" into 13zuul
2016-08-18rest-api: Swagger scripts were not replacing format variable in file briefKevin Harwell
Given resource paths did not have 'json' substituted in for the '{format}'. For some auto generated documentation/comment strings it resulted in something like the following: "... REST handler for /api-docs/sounds.{format}" This patch makes sure the resource api's path is properly substituted. ASTERISK-25472 #close Change-Id: Ie3e950a35db4043e284019d6c9061f3b03922e23
2016-08-18res_format_attr_g729: Add annexb=no format parameter to SDPsKevin Harwell
Historically, Asterisk has always specified annexb=no for the g729 format. However, when using res_pjsip no format attribute was specified. This patch makes it so the SDP now contains a format attribute line with annexb=no. Note, that this means only g729a is negotiated. Even for pass through support. According to rfc7261 the type of annex used (a or b) is dependent upon the answerer. However, Asterisk being a back to back user agent makes this tricky to support at this time, thus we only allow annex 'a' for now. ASTERISK-26228 #close patches: res_format_attr_g729.c submitted by Jason Parker (license 4993) Change-Id: I76bc20cc0a01af01536e9915afef319c269c22d0
2016-08-18res_odbc: Correct the dependency relationship with res_odbc_transactionGeorge Joseph
The MODULEINFO dependencies between these 2 modules was reversed. res_odbc should depend on res_odbc_transaction, not the other way around. ASTERISK-25984 #close Change-Id: Ifcfbb49c0b51cf6640a5446d47cd6c48caf1331f
2016-08-17res_pjsip_session.c: Fix unbound srv failover tests.Richard Mudgett
Commit 1b666549f33d69dc080b212bf92126f3bc3a18b2 broke the srv failover functionality if a TCP connection gets disconnected. Under these conditions, session_inv_on_state_changed() gets a PJSIP_EVENT_TRANSPORT_ERROR and restarts the INVITE transaction on a new transport. Unfortunately, session_inv_on_tsx_state_changed() also gets the same PJSIP_EVENT_TRANSPORT_ERROR event and unconditionally terminates the session. * Made session_inv_on_tsx_state_changed() complete terminating the session on PJSIP_EVENT_TRANSPORT_ERROR only if the session state is still PJSIP_INV_STATE_DISCONNECTED. ASTERISK-26305 #close Reported by: Richard Mudgett Change-Id: If736e766b5c55b970fa38ca6c8a885caf27b897d
2016-08-17res_pjsip: Add contact_user to endpointGeorge Joseph
contact_user, when specified on an endpoint, will override the user portion of the Contact header on outgoing requests. Change-Id: Icd4ebfda2f2e44d3ac749d0b4066630e988407d4
2016-08-17res_ari: Add http prefix to generated docsTorrey Searle
updated the uri handler to include the url prefix of the http server this enables res_ari to add it to the uris when generating docs Change-Id: I279335a2625261a8492206c37219698f42591c2e
2016-08-16Merge "Refactor usage pattern of xmldoc info tag." into 13zuul
2016-08-16Merge "res_sorcery_config.c: Cleanup ao2 container usage idioms." into 13Joshua Colp
2016-08-16Merge "core: Entity ID is not set or invalid" into 13zuul
2016-08-15Refactor usage pattern of xmldoc info tag.Corey Farrell
This updates func_channel.c and main/message.c to use a generic xpointer include instead of including info from each channel driver. Now the name attribute of info is CHANNEL or CHANNEL_EXAMPLES to be included in documentation for func_channel. Setting the name attribute of info to MessageToInfo or MessageFromInfo causes it to be included in the MessageSend application and AMI action. Change-Id: I89fd8276a3250824241a618009714267d3a8d1ea
2016-08-15Merge "res_agi: Improve documentation" into 13Joshua Colp
2016-08-15res_sorcery_config.c: Cleanup ao2 container usage idioms.Richard Mudgett
Change-Id: Iad24b335fb121a2bc7f1d048ab7420569edcba5a
2016-08-15core: Entity ID is not set or invalidAlexei Gradinari
The Exchanging Device and Mailbox States could not working if the Entity ID (EID) is not set manually and can't be obtained from ethernet interface. This patch replaces debug message to warning and addes missing description about option 'entityid' to asterisk.conf.sample. With this patch the asterisk also: (1) decline loading the modules which won't work without EID: res_corosync and res_pjsip_publish_asterisk. (2) warn if EID is empty on loading next modules: pbx_dundi, res_xmpp Starting with v197 systemd/udev will automatically assign "predictable" names for all local Ethernet interfaces. This patch also addes some new ethernet prefixes "eno" and "ens". ASTERISK-26164 #close Change-Id: I72d712f1ad5b6f64571bb179c5cb12461e7c58c6
2016-08-13res_agi: Improve documentationMatt Jordan
* Groups of AGI commands that have similar functionality now reference each other, and all reference the AGI application for ease of wiki reference. * The documentation for the AGI application has been improved, in particular noting the various AGI types and how they are invoked. * A warning message has been added to DeadAGI, noting that it is deprecated. Change-Id: I479ccdee8a7393f01b18692c3d4ab7e6bdd1875d
2016-08-12Merge "res_pjsip: Fail global load if debug or default_from_user are empty" ↵zuul
into 13
2016-08-12Merge "res_pjsip_caller_id: Copy header name to short header name" into 13zuul
2016-08-12Merge "location.c: Misc fixes and cleanups." into 13zuul
2016-08-12Merge "res_pjsip res_pjsip_mwi: Misc fixes and cleanups." into 13zuul
2016-08-12Merge "pjsip_distributor.c: Add missing allocation failure check." into 13zuul
2016-08-11res_pjsip_caller_id: Copy header name to short header nameGeorge Joseph
When compact_headers was set, we were sending a zero-length header name for PAI and RPID because we always forced the short header name length to 0. We did this because we cloned the header from "From" and wanted to clear "f" from the sname. By cloning however, we bypass pjproject's automatic logic that sets sname to name if there's no compact form of the header, which there isn't for PAI and RPID. So now we force sname to be the same as name right after we set name. res_pjsip_diversion needed the same treatment for the Diversion header. ASTERISK-26241 #close Change-Id: I633ec139630cd83809aae00336cee4a10077e467
2016-08-11res_pjsip: Fail global load if debug or default_from_user are emptyGeorge Joseph
If debug was specified in the global configuration but left blank, the logger would treat it as a wildcard and log all hosts. If default_from_user was empty, a crash would result. The global apply handler now checks for empty strings. ASTERISK-26239 #close ASTERISK-26238 #close Change-Id: Ie75727f5cd5808845d92cc81f5713842fb203336
2016-08-11res_pjsip res_pjsip_mwi: Misc fixes and cleanups.Richard Mudgett
* Eliminated RAII_VAR() usage in ast_sip_persistent_endpoint_update_state(). * Added a missing allocation failure check to persistent_endpoint_find_or_create(). * Made persistent_endpoint_find_or_create() create the new object without a lock as it isn't needed. * Cleaned up some ao2 container allocation idioms. * Reordered res_pjsip_mwi.c load_module() and unload_module() Change-Id: If8ce88fbd82a0c72a37a2388f74f77237a6a36a8
2016-08-11location.c: Misc fixes and cleanups.Richard Mudgett
* Eliminated most RAII_VAR() usage. * Added several missing allocation failure checks. * Made ast_sip_for_each_contact() allocate the wrapper ao2 object without a lock as it is not needed. Change-Id: Ie20913365156c95dd79e5d471cfd25e99ae880bc
2016-08-11res_pjsip: Make aor named lock a mutex.Richard Mudgett
The named aor lock was always being locked for writes so a rwlock adds no benefit and may be slower because rwlocks are biased toward read locking. Change-Id: I8c5c2c780eb30ce5441832257beeb3506fd12b28
2016-08-11pjsip_distributor.c: Add missing allocation failure check.Richard Mudgett
Change-Id: I932ab2cea845e534d9ff318035b6de39972d3b28
2016-08-10Merge "pjsip: Fix deadlock with suspend taskprocessor on masquerade" into 13zuul
2016-08-10pjsip: Fix deadlock with suspend taskprocessor on masqueradeAlexei Gradinari
If both channels which should be masqueraded are in the same serializer: 1st channel will be locked waiting condition 'complete' 2nd channel will be locked waiting condition 'suspended' On heavy load system a chance that both channels will be in the same serializer 'pjsip/distibutor' is very high. To reproduce compile res_pjsip/pjsip_distributor.c with DISTRIBUTOR_POOL_SIZE=1 Steps to reproduce: 1. Party A calls Party B (bridged call 'AB') 2. Party B places Party A on hold 3. Party B calls Voicemail app (non-bridged call 'BV') 4. Party B attended transfers Party A to voicemail using REFER. 5. When asterisk masquerades calls 'AB' and 'BV', a deadlock is happened. This patch adds a suspension indicator to the taskprocessor. When a session suspends/unsuspends the serializer it sets the indicator to the appropriate state. The session checks the suspension indicator before suspend the serializer. ASTERISK-26145 #close Change-Id: Iaaebee60013a58c942ba47b1b4930a63e686663b
2016-08-10Merge "res_rtp_asterisk: Cache local RTCP address." into 13Joshua Colp
2016-08-09res_rtp_asterisk: Cache local RTCP address.Mark Michelson
When an RTCP packet is sent or received, res_rtp_asterisk generates a Stasis event that contains the RTCP report as well as the local and remote addresses that the report pertains to. The addresses are determined using ast_find_ourip(). For the local address, this will typically result in a lookup of the hostname of the server, and then a DNS lookup of that hostname. If you do not have the host in /etc/hosts, then this results in a full DNS lookup, which can potentially block for some time. This is especially problematic when performing RTCP reads, since those are done on the same thread responsible for reading and writing media. This patch addresses the issue by performing a lookup of the local address when RTCP is allocated. We then use this cached local address for the Stasis events when necessary. ASTERISK-26280 #close Reported by Mark Michelson Change-Id: I3dd61882c2e57036f09f0c390cf38f7c87e9b556
2016-08-09Merge "res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stack" into 13zuul
2016-08-09Merge "res_pjsip_outbound_publish: Use a serializer shutdown group for ↵Joshua Colp
unload." into 13
2016-08-08res_pjsip_mwi: fix unsolicited mwi blocks PJSIP stackAlexei Gradinari
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
2016-08-04res_pjsip_outbound_publish: Use a serializer shutdown group for unload.Joshua Colp
This change replaces the custom unload process for the outbound publish module with the common serializer shutdown group. ASTERISK-25217 #close Change-Id: I280a0384d860c486202d87d2d674394cca77ffb6
2016-08-02Merge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 ↵Joshua Colp
transports." into 13
2016-08-02Merge "rest-api: Code out of sync with the model" into 13Joshua Colp
2016-08-02rest-api: Code out of sync with the modelKevin Harwell
Change-Id: Idccaa26fd4a423d47d013ee592b8fa6a0349c006
2016-08-02sorcery: Use more compatible regex for local expressions.Joshua Colp
This changes the use of an empty regex for both res_sorcery_config and res_sorcery_memory to "." instead. This is a more compatible regular expression which also works on FreeBSD. ASTERISK-26206 #close Change-Id: Ia9166dd176f1597555ba22b6931180d0626c1388
2016-08-02res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 transports.Alexander Traud
ASTERISK-26256 #close Change-Id: I3fd68df561f81fdb8c6c497d465b50c12422f058
2016-07-22Merge "res_pjsip: Whitespace and comment cleanup." into 13zuul
2016-07-22Merge "res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called ↵zuul
twice." into 13
2016-07-21res_pjsip: Whitespace and comment cleanup.Richard Mudgett
Change-Id: I11139a4a95df34e223ba622aa6227e33ab8f6c38
2016-07-21Merge "res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook." ↵zuul
into 13
2016-07-21Merge changes from topic 'ASTERISK-26214' into 13Joshua Colp
* changes: res_fax: Fix FAXOPT(faxdetect) timeout option. chan_dahdi: Add faxdetect_timeout option.
2016-07-21Merge "res_pjsip: Add fax_detect_timeout endpoint option." into 13Joshua Colp
2016-07-21res_pjsip_pubsub: fixed a bug when pjsip_tx_data_dec_ref is called twice.Alexei Gradinari
This patch removed call of pjsip_tx_data_dec_ref in send_notify if send_request failed. The pjsip_dlg_send_request deletes the message on error by itself. It seems this patch fixes next issues: ASTERISK-26199 ASTERISK-26166 ASTERISK-26174 Change-Id: I8b05917c93d993f95d604c042ace5f1a5500f59a
2016-07-20Merge "Unit tests: Use AST_TEST_DEFINE in conditional code only." into 13zuul
2016-07-20Merge "res_rtp_asterisk: Count a roll-over of the sequence number even on ↵zuul
lost packets." into 13
2016-07-20Merge "res_pjsip_mwi: remove unneeded check on endpoint's contacts." into 13zuul
2016-07-19res_fax.c: Fix deadlock potential in FAXOPT(faxdetect) framehook.Richard Mudgett
The fax_detect_framehook() has the potential to deadlock if an incoming fax happens during the Playback or similar application. * Fixed the potential deadlock by not calling ast_async_goto() with the channel lock held. * Made always eat the fax detection frame whether there is a fax extension or not. * Made only detach the framehook if we detected a fax and not on other possible frames. ASTERISK-26216 Reported by: Richard Mudgett Change-Id: I99da35c26d1cd802626ffb4c1b4eb5b015581b6d