summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-11app_queue: Prevent crash when a call is forwarded to an invalid locationMatt Jordan
When a call forward attempt is made from a Queue member, the current code will hang up the forwarding channel in an off-nominal condition prior to raising the Stasis events informing the rest of Asterisk that the call was forwarded. This will result in a slew of dreaded FRACKs, most likely leading to a crash. This patch modifies the code such that we don't hang up the forwarding channel even in an off-nominal condition until we've safely raised the Stasis messages. ASTERISK-25797 #close Change-Id: Ife5abed351691fd79105321636eaa8ea8dcdba38
2016-08-11Merge "channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESH" into 13zuul
2016-08-11alembic: add auth_username to endpoint's identify_by enumKevin Harwell
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
2016-08-10Merge "alembic/sqlalchemy: auto increment only allowed on a single column" ↵zuul
into 13
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-10alembic/sqlalchemy: auto increment only allowed on a single columnKevin Harwell
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
2016-08-10channels/chan_pjsip: Add PJSIP_SEND_SESSION_REFRESHMatt Jordan
This patch adds a new PJSIP specific dialplan function, PJSIP_SEND_SESSION_REFRESH. When invoked on a PJSIP channel, the media session will be refreshed via either an UPDATE or re-INVITE request. When used in conjunction with the PJSIP_MEDIA_OFFER dialplan function, the formats in use on a PJSIP channel can be re-negotiated and changed dynamically after call setup. ASTERISK-26277 #close Change-Id: Ib98fe09ba889aafe26d58d32f0fd1323f8fd9b1b
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-08Merge "app_voicemail: Add taskprocessor alert level options." into 13Joshua Colp
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-03Add missing checks during startup.Corey Farrell
This ensures startup is canceled due to allocation failures from the following initializations. * channel.c: ast_channels_init * config_options.c: aco_init ASTERISK-26265 #close Change-Id: I911ed08fa2a3be35de55903e0225957bcdbe9611
2016-08-03app_voicemail: Add taskprocessor alert level options.Alexei Gradinari
On heavy loaded system with IMAP or DB storage, 'app_voicemail' taskprocessor queue could reach 500 scheduled tasks. It could happen when the IMAP or DB server dies or is unreachable. It could happen on startup when there are many (thousands) realtime endpoints configured with unsolicited mwi. If the taskprocessor queue reaches the high water level then the alert is triggered and pjsip stops processing new requests until the queue reaches the low water level to clear the alert. This patch adds 2 new 'general' configuration options to tune taskprocessor alert levels: 'tps_queue_high' - Taskprocessor high water alert trigger level. 'tps_queue_low' - Taskprocessor low water clear alert level ASTERISK-26229 #close Change-Id: I766294fbffedf64053c0d9ac0bedd3109f043ee8
2016-08-03astconfigparser: Really handle case where line is simply a comment.Joshua Colp
The regular expression would match causing the code that handled the line if it was merely a comment to never get executed. Change-Id: I3e4022481037ebcba9905587fe8c764b4ce21819
2016-08-02Merge "asterisk.c: Add auto generation and persistence of UUID" into 13zuul
2016-08-02Merge "Remove SILK payload mappings from Asterisk core." into 13zuul
2016-08-02Merge "res_pjsip: SIP/SDP origin (o=) contained square brackets on IP6 ↵Joshua Colp
transports." into 13
2016-08-02asterisk.c: Add auto generation and persistence of UUIDGeorge Joseph
Upcoming features will require the generation and persistence of a UUID. Change-Id: I3ec0062427e133217db6ef496a4216f427c3b92d
2016-08-02Merge "menuselect: Add an opaque "member_data" string to the acceptable ↵Joshua Colp
xml" 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-02Merge "sorcery: Use more compatible regex for local expressions." into 13Joshua Colp
2016-08-02Remove SILK payload mappings from Asterisk core.Mark Michelson
SILK is a bit of a hog when it comes to using up our limited number of dynamic payload types in the RTP engine. By freeing up four slots, it allows for other codecs to potentially take the place. Now, codec_silk.so will dynamically use the payload slots in the RTP engine when it loads. A better fix would be make RTP dynamic payload types actually dynamic. However, at this stage of Asterisk 14 development, this is a risky move that would be imprudent. Change-Id: I5774e09408f9a203db189529eabdc0d3f4c1e612 (cherry picked from commit d50895c7b04036aeaad58990089399e46db4c817)
2016-08-02Merge "pjproject: fixed a few bugs" into 13Joshua Colp
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-08-01menuselect: Add an opaque "member_data" string to the acceptable xmlGeorge Joseph
Change-Id: Id5ac43b95c8d7395f3be37f983632169db3d1afe
2016-08-01Merge "Replace strdupa with more portable ast_strdupa" into 13zuul
2016-08-01Merge "menuselect: Various menuselect enhancements" into 13zuul
2016-08-01Merge "astconfigparser: Handle case where line is simply a comment." into 13zuul
2016-08-01Replace strdupa with more portable ast_strdupaDavid M. Lee
The strdupa function is a GNU extension, and not widely portable. We have an ast_strdupa function used within Asterisk which is preferred. I pulled the definition up from menuselect.c into the menuselect.h header file so it can be shared across menuselect. Change-Id: I9593c97f78386b47dc1e83201e80cb2f62b36c2e
2016-08-01menuselect: Various menuselect enhancementsGeorge Joseph
* Add 'external' as a support level. * Add ability for module directories to add entries to the menu by adding members to the <module_prefix>/<module_prefix>.xml file. * Expand the description field to 3 lines in the ncurses implementation. * Allow the description field to wrap in the newt implementation. * Add description field to the gtk implementation. Change-Id: I7f9600a1984a42ce0696db574c1051bc9ad7c808 (cherry picked from commit 90f445729d5d86050d9d379485ff0a99f4a006c1)
2016-08-01Merge "pbx.c: Fix handling of '-' in extension name and callerid" into 13zuul
2016-07-29Merge "pjproject_bundled: Update for pjproject 2.5.5" into 13zuul
2016-07-29Merge "pbx.c: Allow dangerous functions when adding a hint to dialplan." into 13zuul
2016-07-29astconfigparser: Handle case where line is simply a comment.Joshua Colp
Change-Id: I2dea5815363f4d787d709228a04f33baee383ef5
2016-07-28Merge "dsp.c: Add fax and DTMF detection unit tests." into 13Joshua Colp
2016-07-28Merge "dsp.c: Added descriptive comments to Goertzel calculations." into 13Joshua Colp
2016-07-28Merge "dsp.c: Fix incorrect format reference typo." into 13Joshua Colp
2016-07-28Merge "dsp.c: Correct DTMF twist dsp.conf documentation." into 13zuul
2016-07-28Merge "astconfigparser.py: Update with realtime fixes." into 13Joshua Colp
2016-07-28pbx.c: Fix handling of '-' in extension name and calleridCorey Farrell
This adds a two strings to ast_exten. name to go with exten and cidmatch_display to go with cidmatch. The new fields contain input used to add the extension in the first place. The existing fields now contain stripped input that excludes insignificant spaces and dashes. These stripped fields should always be used for comparisons. The unstripped fields should normally be used for display, but displaying stripped values will not cause runtime errors. Note the actual string is only stored twice if it contains dashes. If no dashes are found then both 'char *' fields point to the same memory. So this change has a minimum effect on memory usage. The existing functions ast_get_extension_name and ast_get_extension_cidmatch return unstripped values as they did before this change. Other similar bugs likely still exist where unstripped extensions are saved outside pbx.c then passed back in. ASTERISK-26233 #close Change-Id: I6cd61ce57acc1570ca6cc14960c4c3b0a9eb837f
2016-07-28pbx.c: Allow dangerous functions when adding a hint to dialplan.Richard Mudgett
We can allow dangerous functions when adding a hint since altering dialplan is itself a privileged activity. Otherwise, we could never execute dangerous functions. ASTERISK-25996 #close Reported by: Andrew Nagy Change-Id: I4929ff100ad1200a0198262d069a34f2296e77ba
2016-07-28Merge "rtp_engine: Failed assertion and wrong name given for codec" into 13zuul
2016-07-28pjproject: fixed a few bugsAlexei Gradinari
This patch fixes the issue in pjsip_tx_data_dec_ref() when tx_data_destroy can be called more than once, and checks if invalid value (e.g. NULL) is passed to. This patch updates array limit checks and docs in pjsip_evsub_register_pkg() and pjsip_endpt_add_capability(). Change-Id: I4c7a132b9664afaecbd6bf5ea4c951e43e273e40
2016-07-28pjproject_bundled: Update for pjproject 2.5.5George Joseph
Add more --disable-* switches to Makefile.rules including --disable-opus which was causing bundled pjproject to fail with "undefined reference" errors in libasteriskpj. Changed PJ_ENABLE_EXTRA_CHECK to 1. Removed 2 obsolete patches and added a new one. The new one was merged by Teluu on 6/27/2016. ASTERISK-26148 #close Change-Id: Ib8af6c6a9d31f7238ce65b336134c2efdc855063