[asterisk-commits] mjordan: trunk r379828 - in /trunk: ./ apps/app_meetme.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Jan 22 09:15:10 CST 2013
Author: mjordan
Date: Tue Jan 22 09:15:04 2013
New Revision: 379828
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=379828
Log:
Fix station ringback; trunk hangup issues in SLA
This patch fixes two bugs:
* If an outbound call is made from a SLA phone using SLAStation, then there is
no ringtone audible to the phone that originates the call. The indication of
the ringing was not being passed to the SLA station; this patch fixes that
by passing through the progress indications.
* If an SLA station hangs up before the called party answers, then the channel
to the called party continues to ring until a timeout occurs. If the called
party manages to answer, Asterisk attempts to connect the called party to
a non-existant MeetMe room. This patch corrects the behavior by abandoning
the call attempt if it detects that the SLA station is no longer in use
while attempting to call the called party.
Review: https://reviewboard.asterisk.org/r/2275/
(closes issue ASTERISK-20462)
Reported by: dkerr
patches:
asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
asterisk-11-bugid20462.patch uploaded by dkerr (license 5558)
(closes issue ASTERISK-20440)
Reported by: dkerr
patches:
asterisk-11-bugid20440.patch uploaded by dkerr (license 5558)
asterisk-11-bugid20440+20462.patch uploaded by dkerr (license 5558)
........
Merged revisions 379825 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 379826 from http://svn.asterisk.org/svn/asterisk/branches/11
Modified:
trunk/ (props changed)
trunk/apps/app_meetme.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.
Modified: trunk/apps/app_meetme.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_meetme.c?view=diff&rev=379828&r1=379827&r2=379828
==============================================================================
--- trunk/apps/app_meetme.c (original)
+++ trunk/apps/app_meetme.c Tue Jan 22 09:15:04 2013
@@ -6425,6 +6425,8 @@
struct sla_trunk_ref *trunk_ref = args->trunk_ref;
int caller_is_saved;
struct ast_party_caller caller;
+ int last_state = 0;
+ int current_state = 0;
if (!(dial = ast_dial_create())) {
ast_mutex_lock(args->cond_lock);
@@ -6478,14 +6480,35 @@
case AST_DIAL_RESULT_TIMEOUT:
case AST_DIAL_RESULT_UNANSWERED:
done = 1;
+ break;
case AST_DIAL_RESULT_TRYING:
+ current_state = AST_CONTROL_PROGRESS;
+ break;
case AST_DIAL_RESULT_RINGING:
case AST_DIAL_RESULT_PROGRESS:
case AST_DIAL_RESULT_PROCEEDING:
+ current_state = AST_CONTROL_RINGING;
break;
}
if (done)
break;
+
+ /* check that SLA station that originated trunk call is still alive */
+ if (args->station && ast_device_state(args->station->device) == AST_DEVICE_NOT_INUSE) {
+ ast_debug(3, "Originating station device %s no longer active\n", args->station->device);
+ trunk_ref->trunk->chan = NULL;
+ break;
+ }
+
+ /* If trunk line state changed, send indication back to originating SLA Station channel */
+ if (current_state != last_state) {
+ ast_debug(3, "Indicating State Change %d to channel %s\n", current_state, ast_channel_name(trunk_ref->chan));
+ ast_indicate(trunk_ref->chan, current_state);
+ last_state = current_state;
+ }
+
+ /* avoid tight loop... sleep for 1/10th second */
+ ast_safe_sleep(trunk_ref->chan, 100);
}
if (!trunk_ref->trunk->chan) {
More information about the asterisk-commits
mailing list