[asterisk-commits] oej: branch oej/moremanager r61758 - in /team/oej/moremanager: ./ channels/ m...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Apr 22 13:02:45 MST 2007


Author: oej
Date: Sun Apr 22 15:02:45 2007
New Revision: 61758

URL: http://svn.digium.com/view/asterisk?view=rev&rev=61758
Log:
- Updates
- Channelupdate now in gtalk and iax channels too

Modified:
    team/oej/moremanager/CHANGES.moremanager
    team/oej/moremanager/channels/chan_gtalk.c
    team/oej/moremanager/channels/chan_iax2.c
    team/oej/moremanager/channels/chan_sip.c
    team/oej/moremanager/main/manager.c
    team/oej/moremanager/res/res_features.c

Modified: team/oej/moremanager/CHANGES.moremanager
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/CHANGES.moremanager?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/CHANGES.moremanager (original)
+++ team/oej/moremanager/CHANGES.moremanager Sun Apr 22 15:02:45 2007
@@ -1,3 +1,6 @@
+* CHANGED EVENTS
+----------------
+
 - Manager events Newstate and Newchannel have changed headers
 	"State"		-> ChannelStateDesc	Text based channel state
 			-> ChannelState		Numeric channel state
@@ -28,8 +31,53 @@
 	- CallerID	-> CallerIDnum
 	- The event does not send "<unknown>" for unknown caller IDs just an empty field
 	
-- The "Reload" event sent at manager reload now has a new header
+- The "Reload" event sent at manager reload now has a new header and is now implemented
+  in more modules than manager to alert a reload. For channels, there's a CHANNELRELOAD 
+  event to use.
 	(new)		-> Module: manager | CDR | DNSmgr | RTP | ENUM
 	(new)		-> Status: enabled | disabled
 	- To support reload events from other modules too
 		- cdr module added
+
+- The ExtensionStatus manager command now has a "StatusDesc" field with text description of the state
+
+- The Registry and Peerstatus events in chan_sip and chan_iax now use "ChannelType" instead of "ChannelDriver"
+
+* NEW EVENTS
+------------
+
+- Event: Transfer
+	Modules: res_features, chan_sip
+	Purpose:
+		Inform about call transfer, linking transferer with transfer target
+		You should be able to trace the call flow with this missing piece
+		of information. If it works out well, the "Transfer" event should
+		be followed by a "Bridge" event
+		The transfermethod: header informs if this is a pbx core transfer
+		or something done on channel driver level. For SIP, check the example:
+		
+				Event: Transfer
+				Privilege: call,all
+				TransferMethod: SIP
+				TransferType: Blind
+				Channel: SIP/device1-01849800
+				SIP-Callid: 091386f505842c87016c4d93195ec67d at 127.0.0.1
+				TargetChannel: SIP/device2-01841200
+				TransferExten: 100
+				TransferContext: default
+
+	
+
+- Event: ChannelUpdate
+	Modules: chan_sip.c, chan_iax2.c
+	Purpose:
+		Updates channel information with ID of PVT in channel driver, to
+		be able to link events on channel driver level.
+	
+			Event: ChannelUpdate
+			Privilege: system,all
+			Uniqueid: 1177271625.27
+			Channel: SIP/olle-01843c00
+			Channeltype: SIP
+			SIPcallid: NTQzYWFiOWM4NmE0MWRkZjExMzU2YzQ3OWQwNzg3ZmI.
+			SIPfullcontact: sip:olle at 127.0.0.1:49054

Modified: team/oej/moremanager/channels/chan_gtalk.c
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/channels/chan_gtalk.c?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/channels/chan_gtalk.c (original)
+++ team/oej/moremanager/channels/chan_gtalk.c Sun Apr 22 15:02:45 2007
@@ -511,8 +511,12 @@
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Answer!\n");
 	ast_mutex_lock(&p->lock);
-	gtalk_invite(p, p->them, p->us,p->sid, 0);
+	gtalk_invite(p, p->them, p->us, p->sid, 0);
 	ast_mutex_unlock(&p->lock);
+
+	manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
+		"Channel: %s\r\nChanneltype: %s\r\nGtalk-SID: %s\r\n",
+		ast->name, "GTALK", p->sid);
 	return res;
 }
 
@@ -967,6 +971,10 @@
 		tmp->hangupcause = AST_CAUSE_SWITCH_CONGESTION;
 		ast_hangup(tmp);
 		tmp = NULL;
+	} else {
+		manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
+			"Channel: %s\r\nChanneltype: %s\r\nGtalk-SID: %s\r\n",
+			i->owner ? i->owner->name : "", "Gtalk", i->sid);
 	}
 
 	return tmp;

Modified: team/oej/moremanager/channels/chan_iax2.c
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/channels/chan_iax2.c?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/channels/chan_iax2.c (original)
+++ team/oej/moremanager/channels/chan_iax2.c Sun Apr 22 15:02:45 2007
@@ -826,6 +826,17 @@
 	.fixup = iax2_fixup,
 };
 
+
+/*! \brief Send manager event at call setup to link between Asterisk channel name
+	and IAX2 call identifiers */
+static void iax2_ami_channelupdate(struct chan_iax2_pvt *pvt) 
+{
+	manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
+		"Channel: %s\r\nChanneltype: IAX2\r\nIAX2-callno-local: %d\r\nIAX2-callno-remote: %d\r\nIAX2-peer: %s\r\n",
+		pvt->owner ? pvt->owner->name : "",
+		pvt->callno, pvt->peercallno, pvt->peer ? pvt->peer : "");
+}
+
 static void insert_idle_thread(struct iax2_thread *thread)
 {
 	if (thread->type == IAX_TYPE_DYNAMIC) {
@@ -3182,6 +3193,7 @@
 	unsigned short callno = PTR_TO_CALLNO(c->tech_pvt);
 	if (option_debug)
 		ast_log(LOG_DEBUG, "Answering IAX2 call\n");
+	iax2_ami_channelupdate(c->tech_pvt);
 	return send_command_locked(callno, AST_FRAME_CONTROL, AST_CONTROL_ANSWER, 0, NULL, 0, -1);
 }
 
@@ -3272,6 +3284,7 @@
 	ast_mutex_unlock(&iaxsl[callno]);
 	tmp = ast_channel_alloc(1, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, i->amaflags, "IAX2/%s-%d", i->host, i->callno);
 	ast_mutex_lock(&iaxsl[callno]);
+	iax2_ami_channelupdate(i);
 	if (!tmp)
 		return NULL;
 	tmp->tech = &iax2_tech;
@@ -5402,7 +5415,7 @@
 			snprintf(ourip, sizeof(ourip), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port));
 			ast_verbose(VERBOSE_PREFIX_3 "Registered IAX2 to '%s', who sees us as %s%s\n", ast_inet_ntoa(sin->sin_addr), ourip, msgstatus);
 		}
-		manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelDriver: IAX2\r\nDomain: %s\r\nStatus: Registered\r\n", ast_inet_ntoa(sin->sin_addr));
+		manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: IAX2\r\nDomain: %s\r\nStatus: Registered\r\n", ast_inet_ntoa(sin->sin_addr));
 	}
 	reg->regstate = REG_STATE_REGISTERED;
 	return 0;
@@ -5499,7 +5512,7 @@
 	ast_log(LOG_DEBUG, "Expiring registration for peer '%s'\n", p->name);
 	if (ast_test_flag((&globalflags), IAX_RTUPDATE) && (ast_test_flag(p, IAX_TEMPONLY|IAX_RTCACHEFRIENDS)))
 		realtime_update_peer(p->name, &p->addr, 0);
-	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", p->name);
+	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", p->name);
 	/* Reset the address */
 	memset(&p->addr, 0, sizeof(p->addr));
 	/* Reset expiry value */
@@ -5603,14 +5616,14 @@
 			if  (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Registered IAX2 '%s' (%s) at %s:%d\n", p->name, 
 					    ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port));
-			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Registered\r\n", p->name);
+			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Registered\r\n", p->name);
 			register_peer_exten(p, 1);
 			ast_device_state_changed("IAX2/%s", p->name); /* Activate notification */
 		} else if (!ast_test_flag(p, IAX_TEMPONLY)) {
 			if  (option_verbose > 2)
 				ast_verbose(VERBOSE_PREFIX_3 "Unregistered IAX2 '%s' (%s)\n", p->name, 
 					    ast_test_flag(&iaxs[callno]->state, IAX_STATE_AUTHENTICATED) ? "AUTHENTICATED" : "UNAUTHENTICATED");
-			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Unregistered\r\n", p->name);
+			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unregistered\r\n", p->name);
 			register_peer_exten(p, 0);
 			ast_db_del("IAX/Registry", p->name);
 			ast_device_state_changed("IAX2/%s", p->name); /* Activate notification */
@@ -7077,13 +7090,13 @@
 					if ((peer->lastms < 0)  || (peer->historicms > peer->maxms)) {
 						if (iaxs[fr->callno]->pingtime <= peer->maxms) {
 							ast_log(LOG_NOTICE, "Peer '%s' is now REACHABLE! Time: %d\n", peer->name, iaxs[fr->callno]->pingtime);
-							manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime); 
+							manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Reachable\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime); 
 							ast_device_state_changed("IAX2/%s", peer->name); /* Activate notification */
 						}
 					} else if ((peer->historicms > 0) && (peer->historicms <= peer->maxms)) {
 						if (iaxs[fr->callno]->pingtime > peer->maxms) {
 							ast_log(LOG_NOTICE, "Peer '%s' is now TOO LAGGED (%d ms)!\n", peer->name, iaxs[fr->callno]->pingtime);
-							manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Lagged\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime); 
+							manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Lagged\r\nTime: %d\r\n", peer->name, iaxs[fr->callno]->pingtime); 
 							ast_device_state_changed("IAX2/%s", peer->name); /* Activate notification */
 						}
 					}
@@ -7367,7 +7380,7 @@
 				if (iaxs[fr->callno]->reg) {
 					if (authdebug) {
 						ast_log(LOG_NOTICE, "Registration of '%s' rejected: '%s' from: '%s'\n", iaxs[fr->callno]->reg->username, ies.cause ? ies.cause : "<unknown>", ast_inet_ntoa(sin.sin_addr));
-						manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelDriver: IAX2\r\nUsername: %s\r\nStatus: Rejected\r\nCause: %s\r\n", iaxs[fr->callno]->reg->username, ies.cause ? ies.cause : "<unknown>");
+						manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: IAX2\r\nUsername: %s\r\nStatus: Rejected\r\nCause: %s\r\n", iaxs[fr->callno]->reg->username, ies.cause ? ies.cause : "<unknown>");
 					}
 					iaxs[fr->callno]->reg->regstate = REG_STATE_REJECTED;
 				}
@@ -7871,7 +7884,7 @@
 	struct iax2_peer *peer = data;
 	if (peer->lastms > -1) {
 		ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE! Time: %d\n", peer->name, peer->lastms);
-		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, peer->lastms);
+		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: IAX2\r\nPeer: IAX2/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, peer->lastms);
 		ast_device_state_changed("IAX2/%s", peer->name); /* Activate notification */
 	}
 	if (peer->callno > 0) {

Modified: team/oej/moremanager/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/channels/chan_sip.c?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/channels/chan_sip.c (original)
+++ team/oej/moremanager/channels/chan_sip.c Sun Apr 22 15:02:45 2007
@@ -3470,8 +3470,8 @@
 		} else 
 			res = transmit_response_with_sdp(p, "200 OK", &p->initreq, XMIT_CRITICAL);
 		manager_event(EVENT_FLAG_SYSTEM, "ChannelUpdate",
-			"Channel: %s\r\nChanneltype: %s\r\nSIPcallid: %s\r\nSIPfullcontact: %s\r\n",
-			ast->name, "SIP", p->callid, p->fullcontact);
+			"Channel: %s\r\nUniqueid: %s\r\nChanneltype: %s\r\nSIPcallid: %s\r\nSIPfullcontact: %s\r\n",
+			ast->name, ast->uniqueid, "SIP", p->callid, p->fullcontact);
 	}
 	ast_mutex_unlock(&p->lock);
 	return res;
@@ -7199,7 +7199,7 @@
 		r->timeout = -1;
 		res=transmit_register(r, SIP_REGISTER, NULL, NULL);
 	}
-	manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelDriver: SIP\r\nUsername: %s\r\nDomain: %s\r\nStatus: %s\r\n", r->username, r->hostname, regstate2str(r->regstate));
+	manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: SIP\r\nUsername: %s\r\nDomain: %s\r\nStatus: %s\r\n", r->username, r->hostname, regstate2str(r->regstate));
 	ASTOBJ_UNREF(r, sip_registry_destroy);
 	return 0;
 }
@@ -7577,7 +7577,7 @@
 
 	destroy_association(peer);	/* remove registration data from storage */
 	
-	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", peer->name);
+	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unregistered\r\nCause: Expired\r\n", peer->name);
 	register_peer_exten(peer, FALSE);	/* Remove regexten */
 	peer->expire = -1;
 	ast_device_state_changed("SIP/%s", peer->name);
@@ -7808,7 +7808,7 @@
 
 		if (option_verbose > 2)
 			ast_verbose(VERBOSE_PREFIX_3 "Unregistered SIP '%s'\n", peer->name);
-			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Unregistered\r\n", peer->name);
+			manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unregistered\r\n", peer->name);
 		return PARSE_REGISTER_UPDATE;
 	}
 
@@ -7877,7 +7877,7 @@
 	snprintf(data, sizeof(data), "%s:%d:%d:%s:%s", ast_inet_ntoa(peer->addr.sin_addr), ntohs(peer->addr.sin_port), expiry, peer->username, peer->fullcontact);
 	if (!ast_test_flag(&peer->flags[1], SIP_PAGE2_RT_FROMCONTACT)) 
 		ast_db_put("SIP/Registry", peer->name, data);
-	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Registered\r\n", peer->name);
+	manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Registered\r\n", peer->name);
 
 	/* Is this a new IP address for us? */
 	if (inaddrcmp(&peer->addr, &oldsin)) {
@@ -8368,7 +8368,7 @@
 			case PARSE_REGISTER_UPDATE:
 				/* Say OK and ask subsystem to retransmit msg counter */
 				transmit_response_with_date(p, "200 OK", req);
-				manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Registered\r\n", peer->name);
+				manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Registered\r\n", peer->name);
 				peer->lastmsgssent = -1;
 				res = 0;
 				break;
@@ -12058,7 +12058,7 @@
 
 		r->regstate = REG_STATE_REGISTERED;
 		r->regtime = time(NULL);		/* Reset time of last succesful registration */
-		manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelDriver: SIP\r\nDomain: %s\r\nStatus: %s\r\n", r->hostname, regstate2str(r->regstate));
+		manager_event(EVENT_FLAG_SYSTEM, "Registry", "ChannelType: SIP\r\nDomain: %s\r\nStatus: %s\r\n", r->hostname, regstate2str(r->regstate));
 		r->regattempts = 0;
 		if (option_debug)
 			ast_log(LOG_DEBUG, "Registration successful\n");
@@ -12160,7 +12160,7 @@
 			peer->name, s, pingtime, peer->maxms);
 		ast_device_state_changed("SIP/%s", peer->name);
 		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus",
-			"Peer: SIP/%s\r\nPeerStatus: %s\r\nTime: %d\r\n",
+			"ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: %s\r\nTime: %d\r\n",
 			peer->name, s, pingtime);
 	}
 
@@ -13748,6 +13748,10 @@
 	ast_set_flag(&transferer->flags[0], SIP_DEFER_BYE_ON_TRANSFER);	/* Delay hangup */
 
 	/* Perform the transfer */
+	manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: SIP\r\nTransferType: Attended\r\nChannel: %s\r\nSIP-Callid: %s\r\nTargetChannel: %s\r\n",
+		transferer->owner->name,
+		transferer->callid,
+		target.chan1->name);
 	res = attempt_transfer(current, &target);
 	ast_mutex_unlock(&targetcall_pvt->lock);
 	if (res) {
@@ -14012,6 +14016,11 @@
 		ast_clear_flag(&p->flags[0], SIP_GOTREFER);	
 		p->refer->status = REFER_200OK;
 		append_history(p, "Xfer", "REFER to call parking.");
+		manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: SIP\r\nTransferType: Blind\r\nChannel: %s\r\nSIP-Callid: %s\r\nTargetChannel: %s\r\nTransferExten: %s\r\n",
+			current.chan1->name,
+			p->callid,
+			current.chan2->name,
+			p->refer->refer_to);
 		if (sipdebug && option_debug > 3)
 			ast_log(LOG_DEBUG, "SIP transfer to parking: trying to park %s. Parked by %s\n", current.chan2->name, current.chan1->name);
 		sip_park(current.chan2, current.chan1, req, seqno);
@@ -14079,11 +14088,17 @@
 	}
 	ast_set_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER);	/* Delay hangup */
 
+
 	/* For blind transfers, move the call to the new extensions. For attended transfers on multiple
 	   servers - generate an INVITE with Replaces. Either way, let the dial plan decided  */
 	res = ast_async_goto(current.chan2, p->refer->refer_to_context, p->refer->refer_to, 1);
 
 	if (!res) {
+		manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: SIP\r\nTransferType: Blind\r\nChannel: %s\r\nSIP-Callid: %s\r\nTargetChannel: %s\r\nTransferExten: %s\r\nTransferContext: %s\r\n",
+			current.chan1->name,
+			p->callid,
+			current.chan2->name,
+			p->refer->refer_to, p->refer->refer_to_context);
 		/* Success  - we have a new channel */
 		if (option_debug > 2)
 			ast_log(LOG_DEBUG, "%s transfer succeeded. Telling transferer.\n", p->refer->attendedtransfer? "Attended" : "Blind");
@@ -15197,7 +15212,7 @@
 	peer->pokeexpire = -1;
 	if (peer->lastms > -1) {
 		ast_log(LOG_NOTICE, "Peer '%s' is now UNREACHABLE!  Last qualify: %d\n", peer->name, peer->lastms);
-		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "Peer: SIP/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, -1);
+		manager_event(EVENT_FLAG_SYSTEM, "PeerStatus", "ChannelType: SIP\r\nPeer: SIP/%s\r\nPeerStatus: Unreachable\r\nTime: %d\r\n", peer->name, -1);
 	}
 	if (peer->call)
 		sip_destroy(peer->call);

Modified: team/oej/moremanager/main/manager.c
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/main/manager.c?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/main/manager.c (original)
+++ team/oej/moremanager/main/manager.c Sun Apr 22 15:02:45 2007
@@ -2367,7 +2367,7 @@
 static int manager_state_cb(char *context, char *exten, int state, void *data)
 {
 	/* Notify managers of change */
-	manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\n", exten, context, state);
+	manager_event(EVENT_FLAG_CALL, "ExtensionStatus", "Exten: %s\r\nContext: %s\r\nStatus: %d\r\nStatus-desc: %s\r\n", exten, context, state, ast_extension_state2str(state));
 	return 0;
 }
 

Modified: team/oej/moremanager/res/res_features.c
URL: http://svn.digium.com/view/asterisk/team/oej/moremanager/res/res_features.c?view=diff&rev=61758&r1=61757&r2=61758
==============================================================================
--- team/oej/moremanager/res/res_features.c (original)
+++ team/oej/moremanager/res/res_features.c Sun Apr 22 15:02:45 2007
@@ -676,7 +676,6 @@
 			   the thread dies -- We have to be careful now though.  We are responsible for 
 			   hanging up the channel, else it will never be hung up! */
 
-			return (transferer == peer) ? AST_PBX_KEEPALIVE : AST_PBX_NO_HANGUP_PEER;
 		} else {
 			ast_log(LOG_WARNING, "Unable to park call %s\n", transferee->name);
 		}
@@ -703,6 +702,10 @@
 								,transferee->name, xferto, transferer_real_context);
 			if (ast_async_goto(transferee, transferer_real_context, xferto, 1))
 				ast_log(LOG_WARNING, "Async goto failed :-(\n");
+			else  {
+				manager_event(EVENT_FLAG_CALL, "Transfer", "TransferMethod: PBX\r\nTransferType: Blind\r\nChannel: %s\r\nTransferExten: %s\r\nTransferContext: %s\r\n",
+					transferee->name, xferto, transferer_real_context);
+			}
 			res = -1;
 		} else {
 			/* Set the channel's new extension, since it exists, using transferer context */



More information about the asterisk-commits mailing list