summaryrefslogtreecommitdiff
path: root/apps
AgeCommit message (Collapse)Author
2016-01-04voicemail: Move app_voicemail / res_mwi_external conflict to runtimeGeorge Joseph
The menuselect conflict between app_voicemail and res_mwi_external makes it hard to package 1 version of Asterisk. There no actual build dependencies between the 2 so moving this check to runtime seems like a better solution. The ast_vm_register and ast_vm_greeter_register functions in app.c were modified to return AST_MODULE_LOAD_DECLINE instead of -1 if there is already a voicemail module registered. The modules' load_module functions were then modified to return DECLINE instead of -1 to the loader. Since -1 is interpreted by the loader as AST_MODULE_LOAD_FAILURE, the modules were incorrectly causing Asterisk to stop so this needed to be cleaned up anyway. Now you can build both and use modules.conf to decide which voicemail implementation to load. The default menuselect options still build app_voicemail and not res_mwi_external but if both ARE built, res_mwi_external will load first and become the voicemail provider unless modules.conf rules prevent it. This is noted in CHANGES. Change-Id: I7d98d4e8a3b87b8df9e51c2608f0da6ddfb89247
2016-01-04app_dial: Immediately exit dial if the caller is already hung up.Richard Mudgett
If a caller hangs up before dial is executed within an AGI then the AGI has likely eaten all queued frames before executing the dial in DeadAGI mode. With the caller hung up and no pending frames from the caller's read queue, dial would not know that the call has hung up until a called channel answers. It is rather annoying to whoever just answered the non-existent call. Dial should not continue execution in DeadAGI mode, hangup handlers, or the h exten. * Added a check early in dial to abort dialing if the caller has hungup. ASTERISK-25307 #close Reported by: David Cunningham Change-Id: Icd1bc0764726ef8c809f76743ca008d0f102f418
2015-12-21app_amd: Correct documentation to reflect functionalityDade Brandon
Update documentation to reflect that maximum_number_of_words has functionality inconsistent with the variable name (and inconsistent with prior documentation.) Update documentation for silence_threshold, which previously implied that it was measuring time, rather than noise averages in the sample. Update the comments in amd.conf.sample. ASTERISK-25639 #close Change-Id: I4b1451e5dc9cb3cb06d59b6ab872f5275ba79093
2015-12-18app_queue: update RT members when the 1st call joins a queue with no agentsCarlos Oliva
If a call enters on a queue and the members on that queue are updated in realtime (ex: using mysql inserting a new agent) the queue members are never refreshed and the call will stay in the queue until other event occurs. This happens only if this is the first call of the queue and there is no agents servicing. This patch prevent this issue, ensuring realtime members are updated if there is one call in the queue and no available agents ASTERISK-25442 #close Change-Id: If1e036d013a5c1d8b0bf60d71d48fe98694a8682
2015-12-09app_meetme: Set default value for audio_buffers.Corey Farrell
The default value was never set for audio_buffers, causing bad audio quality. This ensures the default is always set. ASTERISK-25569 #close Change-Id: I2d2ee3e644120b0f9f6ea6ab9286d7d590942a44
2015-11-17Merge "Confbridge: Add a user timeout option" into 13Joshua Colp
2015-11-16Confbridge: Add a user timeout optionMark Michelson
This option adds the ability to specify a timeout, in seconds, for a participant in a ConfBridge. When the user's timeout has been reached, the user is ejected from the conference with the CONFBRIDGE_RESULT channel variable set to "TIMEOUT". The rationale for this change is that there have been times where we have seen channels get "stuck" in ConfBridge because a network issue results in a SIP BYE not being received by Asterisk. While these channels can be hung up manually via CLI/AMI/ARI, adding some sort of automatic cleanup of the channels is a nice feature to have. ASTERISK-25549 #close Reported by Mark Michelson Change-Id: I2996b6c5e16a3dda27595f8352abad0bda9c2d98
2015-11-16app_queue: (try_calling): mutex 'qe->chan' freed more times than we've locked!Alec Davis
commit aae45acbd (Mark Michelson 2015-04-15 10:38:02 -0500 6525) refer ASTERISK-24958 above commit removed ast_channel_lock(qe->chan); but failed to remove corresponding ast_channel_unlock(qe->chan); ASTERISK-25561 #close Reported Alec Davis Change-Id: Ie05f4e2d08912606178bf1fded57cc022c7a2e1a
2015-11-10Merge "ast_format_cap_get_names: To display all formats, the buffer was ↵Joshua Colp
increased." into 13
2015-11-09ast_format_cap_get_names: To display all formats, the buffer was increased.Alexander Traud
ASTERISK-25533 #close Change-Id: Ie1a9d1a6511b3f1a56b93d04475fbf8a4e40010a
2015-11-06docs: Fix a few typo's in app docs (more then, resourse).Walter Doekes
Change-Id: Iba57efadf6c0b822e762c7a001bc89611d98afd7
2015-09-29Merge "app_queue.c: Force COLP update if outgoing channel name changed." into 13Matt Jordan
2015-09-29Merge "app_queue.c: Factor out a connected line update routine." into 13Matt Jordan
2015-09-29Merge "app_dial.c: Make 'A' option pass COLP updates." into 13Matt Jordan
2015-09-29Merge "app_dial.c: Force COLP update if outgoing channel name changed." into 13Matt Jordan
2015-09-28Merge "app_dial.c: Factor out a connected line update routine." into 13Joshua Colp
2015-09-25app_queue.c: Force COLP update if outgoing channel name changed.Richard Mudgett
* When a call is answered and the outgoing channel name has changed then force a connected line update because the channel is no longer the same. The channel was masqueraded into by another channel. This is usually because of a call pickup. Note: Forwarded calls are handled in a controlled manner so the original channel name is replaced with the forwarded channel. ASTERISK-25423 #close Reported by: John Hardin Change-Id: Ie275ea9e99c092ad369db23e0feb08c44498c172
2015-09-25app_queue.c: Factor out a connected line update routine.Richard Mudgett
Replace inlined code with update_connected_line_from_peer(). ASTERISK-25423 Reported by: John Hardin Change-Id: I33bbd033596fcb0208d41d8970369b4e87b806f3
2015-09-25app_dial.c: Make 'A' option pass COLP updates.Richard Mudgett
While the 'A' option is playing the announcement file allow the caller and peer to exchange COLP update frames. ASTERISK-25423 Reported by: John Hardin Change-Id: Iac6cf89b56d26452c6bb88e9363622bbf23895f9
2015-09-25app_dial.c: Force COLP update if outgoing channel name changed.Richard Mudgett
* When a call is answered and the outgoing channel name has changed then force a connected line update because the channel is no longer the same. The channel was masqueraded into by another channel. This is usually because of a call pickup. Note: Forwarded calls are handled in a controlled manner so the original channel name is replaced with the forwarded channel. ASTERISK-25423 Reported by: John Hardin Change-Id: I2e01f7a698fbbc8c26344a59c2be40c6cd98b00c
2015-09-25app_dial.c: Factor out a connected line update routine.Richard Mudgett
Replace inlined code with update_connected_line_from_peer(). ASTERISK-25423 Reported by: John Hardin Change-Id: Ia14f18def417645cd7fb453e1bdac682630a5091
2015-09-25app_dial.c: Remove some no-op code.Richard Mudgett
Change-Id: Ice1884a94315d3cb7e3bbd47a9fba76a27276c54
2015-09-22app_page.c: Fix crash when forwarding with a predial handler.Richard Mudgett
Page uses the async method of dialing with the dial API. When a call gets forwarded there is no calling channel available. If the predial handler was set then the calling channel could not be put into auto-service for the forwarded call because it doesn't exist. A crash is the result. * Moved the callee predial parameter string processing to before the string is passed to the dial API rather than having the dial API do it. There are a few benefits do doing this. The first is the predial parameter string processing doesn't need to be done for each channel called by the dial API. The second is in async mode and the forwarded channel is to have the predial handler executed on it then the non-existent calling channel does not need to be present to process the predial parameter string. * Don't start auto-service on a non-existent calling channel to execute the predial handler when the dial API is in async mode and forwarding a call. ASTERISK-25384 #close Reported by: Chet Stevens Change-Id: If53892b286d29f6cf955e2545b03dcffa2610981
2015-09-21app_record: RECORDED_FILE variable not being populatedKevin Harwell
The RECORDED_FILE variable is empty unless a '%d' is specified in the filename. This patch makes it so the variable is always set to the filename. ASTERISK-25410 #close Change-Id: I4ec826d8eb582ae2ad184e717be8668b74d37653
2015-09-19Merge "app_queue: AgentComplete event has wrong reason" into 13Matt Jordan
2015-09-17app_queue: AgentComplete event has wrong reasonKevin Harwell
When a queued caller transfers an agent to another extension sometimes the raised AgentComplete event has a reason of "caller" and sometimes "transfer". Since a transfer has taken place this should always be transfer. This occurs because sometimes the stasis hangup event arrives before the transfer event thus writing a different reason out. With this patch, when a hangup event is received during a transfer it will check to see if the channel that is hanging up is part of a transfer. If so it will return and let the subsequently received transfer event handler take care of the cleanup. ASTERISK-25399 #close Change-Id: Ic63c49bd9a5ed463ea7a032fd2ea3d63bc81a50d
2015-09-17app_queue: Crash when transferringKevin Harwell
During some transfer scenarios involving queues Asterisk would sometimes crash when trying to obtain a channel snapshot (could happen on caller or member channels). This occurred because the underlying channel had already disappeared when trying to obtain the latest snapshot. This patch adds a reference to both the member and caller channels that extends to the lifetime of the queue'd call, thus making sure the channels will always exist when retrieving the latest snapshots. ASTERISK-25185 #close Reported by: Etienne Lessard Change-Id: Ic397fa68fb4ff35fbc378e745da9246a7b552128
2015-08-18app_queue.c: Extract some functions for simpler code.Richard Mudgett
* Extract set_queue_member_pause() from set_member_paused() for simpler and more consistent code. * Extract set_queue_member_ringinuse() from set_member_ringinuse_help_members() for simpler code. Change-Id: Iecc1f4119c63347341d7ea6b65f5fc4963706306
2015-08-18app_queue.c: Fix error checking in QUEUE_MEMBER() read.Richard Mudgett
Change-Id: I7294e13d27875851c2f4ef6818adba507509d224
2015-08-18app_queue.c: Fix setting QUEUE_MEMBER 'paused' and 'ringinuse'.Richard Mudgett
Setting the 'paused' and 'ringinuse' options on a queue member using the dialplan function QUEUE_MEMBER did not behave the same way as the equivalent dialplan applications or AMI actions. * Made queue_function_mem_write() call the set_member_paused() and set_member_value() for the 'paused' and 'ringinuse' options respectively. A beneficial side effect is that the queue name is now optional and sets the value in all queues the interface is a member. * Update QUEUE_MEMBER XML documentation. * Fix error checking in QUEUE_MEMBER() write. ASTERISK-25215 #close Reported by: Lorne Gaetz Change-Id: I3a016be8dc94d63a9cc155295ff9c9afa5f707cb
2015-07-15apps/app_dictate: Fix typo in attributionMatt Jordan
Last time I checked, it's "Sangoma", not "Samgoma". Thanks to Brian (GameGamer43) for pointing that out. Change-Id: I43d7b196f6d7a2b2517b84915e3a8dfbc2894106
2015-07-04Makefile: Remove coverage files on 'make clean'Matt Jordan
This patch updates a variety of Makefiles in Asterisk's build system to remove .gcda and .gcno files when 'make clean' is executed. These files are generated when '--enable-coverage' is passed to the Asterisk configure script. Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602
2015-06-24app_dial: Hold reference to calling channel formats when dialing outbound.Joshua Colp
Currently when requesting a channel the native formats of the calling channel are provided to the core for usage when dialing the outbound channel. This occurs without holding the channel lock or keeping a reference to the formats. This is problematic as the channel driver may end up changing the formats during this time. In the case of chan_sip this happens when an SDP negotiation completes. This change makes it so app_dial keeps a reference to the native formats of the calling channel which guarantees that they will remain valid for the period of time needed. ASTERISK-25172 #close Change-Id: I2f0a67bd0d5d14c3bdbaae552b4b1613a283f0db
2015-06-11app_directory: Fix crash when using the alias option 'a'.Richard Mudgett
The voicemail.conf mailbox key/value pair is defined as: <mailbox>=[<password>[,<full-name>[,<email>[,<pager>[,<options>]]]]] Where all fields in the value including the field values are optional. Since the parsing code for the mailbox key/value pair is sloppy, this patch tightens the parsing for the directory information. * Renamed the 'pos' and 'bufptr' variables to 'name' and 'options' respectively in search_directory_sub(). Those names make more sense. * Made sure that search_directory_sub() is dealing with the voicemail.conf mailbox options field if it even exists when looking for the 'hidefromdir' and 'alias' options. * Fix crash if a voicemail.conf mailbox is just <mailbox>=<password>,<name> when the 'a' option is used. If there were no fields after the name then the 'options' pointer was not checked for NULL. * Fix users.conf alias processing if the 'a' option is used. The wrong variable was used. ASTERISK-25087 #close Reported by: Chet Stevens Change-Id: I86052ea77307beddddba5279824d39dc0d593374
2015-06-08Fix unsafe uses of ast_context pointers.Corey Farrell
Although ast_context_find, ast_context_find_or_create and ast_context_destroy perform locking of the contexts table, any context pointer can become invalid at any time that the contexts table is unlocked. This change adds locking around all complete operations involving these functions. Places where ast_context_find was followed by ast_context_destroy have been replaced with calls ast_context_destroy_by_name. ASTERISK-25094 #close Reported by: Corey Farrell Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
2015-05-20app_playback: Suppress warnings on playback if channel hung upGeorge Joseph
If a channel hangs up while an audio file is playing, there's no need to clutter up the logs with a warning so suppress it if ast_check_hangup returns true. Also, change warning to debug/2 in file.c if writing a frame fails. Same reasoning. Change-Id: I2e66191af3c5b6e951c98e8f1c3fe3cf2cf7ed89 Reported-by: George Joseph <george.joseph@fairview5.com> Tested-by: George Joseph <george.joseph@fairview5.com>
2015-05-13app_voicemail: fix moving when old messages fullJonathan Rose
When completing voicemail playback of a message in the 'INBOX', the message gets moved to the 'Old' messages folder. Without this patch, if the 'Old' folder is already at its set limit, then the 'INBOX' message will simply be deleted. With this patch, the flag to delete the message will be removed if the save_to_folder function indicates that the message could not be moved due to a full folder. ASTERISK-25082 #close Reported by: Jonathan Rose Review: https://gerrit.asterisk.org/#/c/448/ Change-Id: I2be440a09f42e2d06d50975c40d1ad7f836ecb3f
2015-05-05app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameterIvan Poddubny
This patch fixes EXITWITHTIMEOUT queue_log entry to always come with 3 parameters: position, original position and waiting time. ASTERISK-25038 #close Reported by: Etienne Lessard Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618
2015-04-24app_confbridge: Default the template option to a compatible default profile.Kevin Harwell
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
2015-04-17Detect potential forwarding loops based on count.Mark Michelson
A potential problem that can arise is the following: * Bob's phone is programmed to automatically forward to Carol. * Carol's phone is programmed to automatically forward to Bob. * Alice calls Bob. If left unchecked, this results in an endless loops of call forwards that would eventually result in some sort of fiery crash. Asterisk's method of solving this issue was to track which interfaces had been dialed. If a destination were dialed a second time, then the attempt to call that destination would fail since a loop was detected. The problem with this method is that call forwarding has evolved. Some SIP phones allow for a user to manually forward an incoming call to an ad-hoc destination. This can mean that: * There are legitimate use cases where a device may be dialed multiple times, or * There can be human error when forwarding calls. This change removes the old method of detecting forwarding loops in favor of keeping a count of the number of destinations a channel has dialed on a particular branch of a call. If the number exceeds the set number of max forwards, then the call fails. This approach has the following advantages over the old: * It is much simpler. * It can detect loops involving local channels. * It is user configurable. The only disadvantage it has is that in the case where there is a legitimate forwarding loop present, it takes longer to detect it. However, the forwarding loop is still properly detected and the call is cleaned up as it should be. Address review feedback on gerrit. * Correct "mfgium" to "Digium" * Decrement max forwards by one in the case where allocation of the max forwards datastore is required. * Remove irrelevant code change from pjsip_global_headers.c ASTERISK-24958 #close Change-Id: Ia7e4b7cd3bccfbd34d9a859838356931bba56c23
2015-04-09apps/app_queue: Prevent possible crash when evaluating queue penalty rulesMatthew Jordan
Although it only occurred once, a crash occurred when a queue attempted to evaluate a queue penalty rule that appeared to have already been destroyed. In many locations in app_queue, a test is done to see if qe->pr is NULL; however, when we dispose of a queue's penalty rules, we don't set the pointer to NULL after free'ing it. This patch does that to prevent any dangling pointers from lingering on the queue object. Review: https://reviewboard.asterisk.org/r/4522 ASTERISK-23319 #close Reported by: Vadim patches: rb4552.patch submitted by Stefan Engström (License 6691) ........ Merged revisions 434448 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434449 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-08clang compiler warnings: Fix pointer-bool-converesion warningsMatthew Jordan
This patch fixes several warnings pointed out by the clang compiler. * chan_pjsip: Removed check for data->text, as it will always be non-NULL. * app_minivm: Fixed evaluation of etemplate->locale, which will always evaluate to 'true'. This patch changes the evaluation to use ast_strlen_zero. * app_queue: - Fixed evaluation of qe->parent->monfmt, which always evaluates to true. Instead, we just check to see if the dereferenced pointer evaluates to true. - Fixed evaluation of mem->state_interface, wrapping it with a call to ast_strlen_zero. * res_smdi: Wrapped search_msg->mesg_desk_term with calls to ast_strlen_zero. Review: https://reviewboard.asterisk.org/r/4541 ASTERISK-24917 Reported by: dkdegroot patches: rb4541.patch submitted by dkdegroot (License 6600) ........ Merged revisions 434285 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@434286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-01stasis: set a channel variable on websocket disconnect errorAshley Sanders
Resolve compile errors caused by r433863 by fixing the documentation xml to comply with the schema. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-04-01stasis: set a channel variable on websocket disconnect errorAshley Sanders
Resolve compile errors caused by r433839 by included the missing header file, pbx.h. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433863 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-31stasis: set a channel variable on websocket disconnect errorAshley Sanders
When an error occurs while writing to a web socket, the web socket is disconnected and the event is logged. A side-effect of this, however, is that any application on the other side waiting for a response from Stasis is left hanging indefinitely (as there is no mechanism presently available for notifying interested parties about web socket error states in Stasis). To remedy this scenario, this patch introduces a new channel variable: STASISSTATUS. The possible values for STASISSTATUS are: SUCCESS - The channel has exited Stasis without any failures FAILED - Something caused Stasis to croak. Some (not all) possible reasons for this: - The app registry is not instantiated; - The app requested is not registered; - The app requested is not active; - Stasis couldn't send a start message ASTERISK-24802 Reported By: Kevin Harwell Review: https://reviewboard.asterisk.org/r/4519/ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433839 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-30clang compiler warnings: Fix -Wabsolute-value warningsMatthew Jordan
This patch fixes several warnings caught by clang - in this case, usage of the abs function on non-integer values. This patch uses labs and fabs, as appropriate, in the various affected files. Review: https://reviewboard.asterisk.org/r/4525 ASTERISK-24917 Reported by: dkdegroot patches: rb4525.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433749 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433750 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28clang compiler warnings: Fix a variety of "unused" warningsMatthew Jordan
This patch fixes the -Wunused-value -Wunused-variable -Wunused-const-variable errors caught by clang. Specifically: * apps/app_queue.c: removed unused qpm_cmd_usage[], qum_cmd_usage[], qsmp_cmd_usage[] * cel/cel_sqlite3_custom.c: removed unused name[] = "cel_sqlite3_custom" * channels/chan_pjsip.c: removed unused desc[] = "PJSIP Channel" * codecs/gsm/src/gsm_create.c: removed unused ident[] = "$Header$" * funcs/func_env.c:729: Fixed ast_str_append_substr. * main/editline/np/strlcat.c: removed unused rcsid variable * main/editline/np/strlcpy.c: removed unused rcsid variable * main/security_events.c: removed unused TIMESTAMP_STR_LEN * utils/conf2ael.c: removed unused cfextension_states * utils/extconf.c: removed unused cfextension_states Review: https://reviewboard.asterisk.org/r/4526 ASTERISK-24917 Reported by: dkdegroot patches: rb4526.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433693 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433694 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-28clang compiler warnings: Fix -Wparantheses-equality warningsMatthew Jordan
Clang will treat ((a == b)) as a warning, as it reasonably expects that the developer may have intended to write (a == b) or ((a = b)). This patch cleans up all instances where equality, not assignment, was intended between two parantheses. Review: https://reviewboard.asterisk.org/r/4531/ ASTERISK-24917 Repoted by: dkdegroot patches: rb4531.patch submitted by dkdegroot (License 6600) ........ Merged revisions 433687 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-26app_confbridge: file playback blocks dtmfKevin Harwell
Attempting to execute DTMF in a confbridge while file playback (prompt, announcement, etc) is occurring is not allowed. You have to wait until the sound file has completed before entering DTMF. This patch fixes it so that app_confbridge now monitors for dtmf key presses during menu driven file playback. If a key is pressed playback stops and it executes the matched menu option. ASTERISK-24864 #close Reported by: Steve Pitts Review: https://reviewboard.asterisk.org/r/4510/ ........ Merged revisions 433445 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2015-03-22Fix compilations errors on 64-bit OpenBSD systemsMatthew Jordan
In versiong 5.5, OpenBSD went to 64-bit time values. This requires a cast to (long) when printing members of certain time structs. Review: https://reviewboard.asterisk.org/r/4507 ASTERISK-24879 #close Reported by: snuffy Tested by: snuffy patches: openbsd-time64.diff uploaded by snuffy (License 5024) ........ Merged revisions 433268 from http://svn.asterisk.org/svn/asterisk/branches/11 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/13@433269 65c4cc65-6c06-0410-ace0-fbb531ad65f3