[svn-commits] russell: branch 1.4 r89296 - /branches/1.4/apps/app_meetme.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Nov 15 11:19:29 CST 2007
Author: russell
Date: Thu Nov 15 11:19:28 2007
New Revision: 89296
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89296
Log:
Update the SLAStation application to account for the case where the SLA thread
has a call out to the station, but the user has pressed a line button to answer
the call instead of picking up the handset. If they do, the phone sends out a
new INVITE. So, the SLAStation app must check to see if it is picking up a
ringing trunk, and ensure that the other stations stop ringing.
(reported internally, patched by me, tested by mogorman)
Modified:
branches/1.4/apps/app_meetme.c
Modified: branches/1.4/apps/app_meetme.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_meetme.c?view=diff&rev=89296&r1=89295&r2=89296
==============================================================================
--- branches/1.4/apps/app_meetme.c (original)
+++ branches/1.4/apps/app_meetme.c Thu Nov 15 11:19:28 2007
@@ -4171,6 +4171,29 @@
trunk_ref->state = SLA_TRUNK_STATE_UP;
ast_device_state_changed("SLA:%s_%s", station->name, trunk_ref->trunk->name);
}
+ } else if (trunk_ref->state == SLA_TRUNK_STATE_RINGING) {
+ struct sla_ringing_trunk *ringing_trunk;
+
+ ast_mutex_lock(&sla.lock);
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&sla.ringing_trunks, ringing_trunk, entry) {
+ if (ringing_trunk->trunk == trunk_ref->trunk) {
+ AST_LIST_REMOVE_CURRENT(&sla.ringing_trunks, entry);
+ break;
+ }
+ }
+ AST_LIST_TRAVERSE_SAFE_END
+ ast_mutex_unlock(&sla.lock);
+
+ if (ringing_trunk) {
+ ast_answer(ringing_trunk->trunk->chan);
+ sla_change_trunk_state(ringing_trunk->trunk, SLA_TRUNK_STATE_UP, ALL_TRUNK_REFS, NULL);
+
+ free(ringing_trunk);
+
+ /* Queue up reprocessing ringing trunks, and then ringing stations again */
+ sla_queue_event(SLA_EVENT_RINGING_TRUNK);
+ sla_queue_event(SLA_EVENT_DIAL_STATE);
+ }
}
trunk_ref->chan = chan;
More information about the svn-commits
mailing list