[Asterisk-cvs] asterisk/res res_features.c,1.41,1.42
markster at lists.digium.com
markster at lists.digium.com
Sat Feb 26 01:56:24 CST 2005
Update of /usr/cvsroot/asterisk/res
In directory mongoose.digium.com:/tmp/cvs-serv30522/res
Modified Files:
res_features.c
Log Message:
Add additional parking events (bug #3620)
Index: res_features.c
===================================================================
RCS file: /usr/cvsroot/asterisk/res/res_features.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- res_features.c 17 Feb 2005 20:04:10 -0000 1.41
+++ res_features.c 26 Feb 2005 07:54:28 -0000 1.42
@@ -278,8 +278,8 @@
"CallerIDName: %s\r\n\r\n"
,pu->parkingnum, pu->chan->name, peer->name
,(long)pu->start.tv_sec + (long)(pu->parkingtime/1000) - (long)time(NULL)
- ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "")
- ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "")
+ ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
+ ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
);
if (peer) {
@@ -1135,6 +1135,17 @@
strncpy(pu->chan->context, pu->context, sizeof(pu->chan->context)-1);
pu->chan->priority = pu->priority;
}
+
+ manager_event(EVENT_FLAG_CALL, "ParkedCallTimeOut",
+ "Exten: %d\r\n"
+ "Channel: %s\r\n"
+ "CallerID: %s\r\n"
+ "CallerIDName: %s\r\n\r\n"
+ ,pu->parkingnum, pu->chan->name
+ ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
+ ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
+ );
+
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "Timeout for %s parked on %d. Returning to %s,%s,%d\n", pu->chan->name, pu->parkingnum, pu->chan->context, pu->chan->exten, pu->chan->priority);
/* Start up the PBX, or hang them up */
@@ -1168,6 +1179,17 @@
/* See if they need servicing */
f = ast_read(pu->chan);
if (!f || ((f->frametype == AST_FRAME_CONTROL) && (f->subclass == AST_CONTROL_HANGUP))) {
+
+ manager_event(EVENT_FLAG_CALL, "ParkedCallGiveUp",
+ "Exten: %d\r\n"
+ "Channel: %s\r\n"
+ "CallerID: %s\r\n"
+ "CallerIDName: %s\r\n\r\n"
+ ,pu->parkingnum, pu->chan->name
+ ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
+ ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
+ );
+
/* There's a problem, hang them up*/
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_2 "%s got tired of being parked\n", pu->chan->name);
@@ -1289,6 +1311,18 @@
ast_log(LOG_WARNING, "Whoa, failed to remove the extension!\n");
} else
ast_log(LOG_WARNING, "Whoa, no parking context?\n");
+
+ manager_event(EVENT_FLAG_CALL, "UnParkedCall",
+ "Exten: %d\r\n"
+ "Channel: %s\r\n"
+ "From: %s\r\n"
+ "CallerID: %s\r\n"
+ "CallerIDName: %s\r\n\r\n"
+ ,pu->parkingnum, pu->chan->name, chan->name
+ ,(pu->chan->cid.cid_num ? pu->chan->cid.cid_num : "<unknown>")
+ ,(pu->chan->cid.cid_name ? pu->chan->cid.cid_name : "<unknown>")
+ );
+
free(pu);
}
/* JK02: it helps to answer the channel if not already up */
More information about the svn-commits
mailing list