[asterisk-commits] mmichelson: branch group/CCSS r232349 - /team/group/CCSS/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Dec 2 10:55:45 CST 2009


Author: mmichelson
Date: Wed Dec  2 10:55:42 2009
New Revision: 232349

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=232349
Log:
Modify get_destination so that CC recall INVITEs will be
routed to the proper extension.

That was waaaaaaay easier than I expected. I think I'm going
to modify the CC SUBSCRIBE handling to use get_destination as
well.


Modified:
    team/group/CCSS/channels/chan_sip.c

Modified: team/group/CCSS/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_sip.c?view=diff&rev=232349&r1=232348&r2=232349
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Wed Dec  2 10:55:42 2009
@@ -15077,6 +15077,7 @@
 		char hint[AST_MAX_EXTENSION];
 		return (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, p->context, p->exten) ? 0 : -1);
 	} else {
+		struct ast_cc_agent *agent;
 		decoded_uri = ast_strdupa(uri);
 		ast_uri_decode(decoded_uri);
 		/* Check the dialplan for the username part of the request URI,
@@ -15088,6 +15089,17 @@
 		    !strcmp(decoded_uri, ast_pickup_ext())) {
 			if (!oreq)
 				ast_string_field_set(p, exten, decoded_uri);
+			return 0;
+		} else if ((agent = find_sip_cc_agent_by_notify_uri(decoded_uri))) {
+			struct sip_cc_agent_pvt *agent_pvt = agent->private_data;
+			/* This is a CC recall. We can set p's extension to the exten from
+			 * the original INVITE
+			 */
+			ast_string_field_set(p, exten, agent_pvt->original_call->exten);
+			/* And we need to let the CC core know that the caller is attempting
+			 * his recall
+			 */
+			ast_cc_agent_recalling(agent->core_id, "SIP caller is attempting recall");
 			return 0;
 		}
 	}




More information about the asterisk-commits mailing list