[svn-commits] mmichelson: branch group/CCSS r248349 - in /team/group/CCSS: apps/ channels/ ...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Feb 22 15:08:20 CST 2010


Author: mmichelson
Date: Mon Feb 22 15:08:15 2010
New Revision: 248349

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=248349
Log:
Address comments made by myself on reviewboard.

After I do some quick SIP sanity tests, I will
upload a new diff to ReviewBoard.


Modified:
    team/group/CCSS/apps/app_dial.c
    team/group/CCSS/channels/chan_local.c
    team/group/CCSS/channels/chan_sip.c
    team/group/CCSS/channels/sip/include/sip.h
    team/group/CCSS/include/asterisk/ccss.h
    team/group/CCSS/main/ccss.c

Modified: team/group/CCSS/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/apps/app_dial.c?view=diff&rev=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/apps/app_dial.c (original)
+++ team/group/CCSS/apps/app_dial.c Mon Feb 22 15:08:15 2010
@@ -817,7 +817,7 @@
 			 * any Dial operations that happen later won't record CC interfaces.
 			 */
 			ast_ignore_cc(o->chan);
-			ast_log(LOG_NOTICE, "Since we're forwarding to %s, we will not accept CC offers from him\n", o->chan->name);
+			ast_log(LOG_NOTICE, "Not accepting call completion offers from call-forward recipient %s\n", o->chan->name);
 		} else
 			ast_log(LOG_NOTICE, "Unable to create local channel for call forward to '%s/%s' (cause = %d)\n", tech, stuff, cause);
 	}
@@ -1946,7 +1946,7 @@
 			if (!rest) /* we are on the last destination */
 				chan->hangupcause = cause;
 			chanlist_free(tmp);
-			if (cause == AST_CAUSE_BUSY || cause == AST_CAUSE_CONGESTION) {
+			if (!ignore_cc && (cause == AST_CAUSE_BUSY || cause == AST_CAUSE_CONGESTION)) {
 				if (!ast_cc_callback(chan, tech, numsubst, ast_cc_busy_interface)) {
 					ast_cc_extension_monitor_add_dialstring(chan, interface, "");
 				}

Modified: team/group/CCSS/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_local.c?view=diff&rev=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/channels/chan_local.c (original)
+++ team/group/CCSS/channels/chan_local.c Mon Feb 22 15:08:15 2010
@@ -597,7 +597,6 @@
 	struct ast_var_t *varptr = NULL, *new;
 	size_t len, namelen;
 	char *reduced_dest = ast_strdupa(dest);
-	char full_dest[AST_CHANNEL_NAME];
 	char *slash;
 
 	if (!p)
@@ -688,9 +687,7 @@
 	if ((slash = strrchr(reduced_dest, '/'))) {
 		*slash = '\0';
 	}
-	snprintf(full_dest, sizeof(full_dest), "Local/%s", dest);
 	ast_set_cc_interfaces_chanvar(p->chan, reduced_dest);
-	ast_cc_set_extension_dialstring(p->chan, full_dest);
 
 	/* Start switch on sub channel */
 	if (!(res = ast_pbx_start(p->chan)))

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=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Mon Feb 22 15:08:15 2010
@@ -928,24 +928,6 @@
  * the reference count by 1.
  */
 
-enum sip_cc_publish_state {
-	CC_CLOSED,
-	CC_OPEN,
-};
-
-enum sip_cc_notify_state {
-	CC_QUEUED,
-	CC_READY,
-};
-
-enum sip_publish_type {
-	SIP_PUBLISH_UNKNOWN,
-	SIP_PUBLISH_INITIAL,
-	SIP_PUBLISH_REFRESH,
-	SIP_PUBLISH_MODIFY,
-	SIP_PUBLISH_REMOVE,
-};
-
 static struct {
 	enum ast_cc_service_type service;
 	const char *service_string;
@@ -974,41 +956,6 @@
 	[CC_READY] = {CC_READY, "cc-state: ready"},
 };
 
-struct cc_epa_entry {
-	/*!
-	 * The core ID of the CC transaction
-	 * for which this EPA entry belongs. This
-	 * essentially acts as a unique identifier
-	 * for the entry and is used in the hash
-	 * and comparison functions
-	 */
-	int core_id;
-	/*!
-	 * We keep the last known state of the
-	 * device in question handy in case
-	 * it needs to be known by a third party.
-	 * Also, in the case where for some reason
-	 * we get asked to transmit state that we
-	 * already sent, we can just ignore the
-	 * request.
-	 */
-	enum sip_cc_publish_state current_state;
-};
-
-struct sip_epa_entry;
-
-struct epa_static_data {
-	enum subscriptiontype event;
-	const char *name;
-	void (*handle_ok)(struct sip_pvt *, struct sip_request *, struct sip_epa_entry *);
-	void (*handle_error)(struct sip_pvt *, const int resp, struct sip_request *, struct sip_epa_entry *);
-	void (*destructor)(void *instance_data);
-};
-
-struct epa_backend {
-	const struct epa_static_data *static_data;
-	AST_LIST_ENTRY(epa_backend) next;
-};
 AST_LIST_HEAD_STATIC(epa_static_data_list, epa_backend);
 
 static int sip_epa_register(const struct epa_static_data *static_data)
@@ -1028,45 +975,6 @@
 }
 
 static void cc_handle_publish_error(struct sip_pvt *pvt, const int resp, struct sip_request *req, struct sip_epa_entry *epa_entry);
-
-struct sip_epa_entry {
-	/*!
-	 * When we are going to send a publish, we need to
-	 * know the type of PUBLISH to send.
-	 */
-	enum sip_publish_type publish_type;
-	/*!
-	 * When we send a PUBLISH, we have to be
-	 * sure to include the entity tag that we
-	 * received in the previous response.
-	 */
-	char entity_tag[SIPBUFSIZE];
-	/*!
-	 * The destination to which this EPA should send
-	 * PUBLISHes. This may be the name of a SIP peer
-	 * or a hostname.
-	 */
-	char destination[SIPBUFSIZE];
-	/*!
-	 * The body of the most recently-sent PUBLISH message.
-	 * This is useful for situations such as authentication,
-	 * in which we must send a message identical to the
-	 * one previously sent
-	 */
-	char body[SIPBUFSIZE];
-	/*!
-	 * Every event package has some constant data and
-	 * callbacks that all instances will share. This
-	 * data resides in this field.
-	 */
-	const struct epa_static_data *static_data;
-	/*!
-	 * In addition to the static data that all instances
-	 * of sip_epa_entry will have, each instance will
-	 * require its own instance-specific data.
-	 */
-	void *instance_data;
-};
 
 static void cc_epa_destructor(void *data)
 {
@@ -1117,94 +1025,8 @@
 /*!
  * Used to create new entity IDs by ESCs.
  */
-int esc_etag_counter;
+static int esc_etag_counter;
 static const int DEFAULT_PUBLISH_EXPIRES = 3600;
-
-/*!
- * \brief common ESC items for all event types
- *
- * The entity_id field serves as a means by which
- * A specific entry may be found.
- */
-struct sip_esc_entry {
-	/*!
-	 * The name of the party who
-	 * sent us the PUBLISH. This will more
-	 * than likely correspond to a peer name.
-	 *
-	 * This field's utility isn't really that
-	 * great. It's mainly just a user-recognizable
-	 * handle that can be printed in debug messages.
-	 */
-	const char *device_name;
-	/*!
-	 * The event package for which this esc_entry
-	 * exists. Most of the time this isn't really
-	 * necessary since you'll have easy access to the
-	 * ESC which contains this entry. However, in
-	 * some circumstances, we won't have the ESC
-	 * available.
-	 */
-	const char *event;
-	/*!
-	 * The entity ID used when corresponding
-	 * with the EPA on the other side. As the
-	 * ESC, we generate an entity ID for each
-	 * received PUBLISH and store it in this
-	 * structure.
-	 */
-	char entity_tag[30];
-	/*!
-	 * The ID for the scheduler. We schedule
-	 * destruction of a sip_esc_entry when we
-	 * receive a PUBLISH. The destruction is
-	 * scheduled for the duration received in
-	 * the Expires header.
-	 */
-	int sched_id;
-	/*!
-	 * Each ESC entry will be for a specific
-	 * event type. Those entries will need to
-	 * carry data which is intrinsic to the
-	 * ESC entry but which is specific to
-	 * the event package
-	 */
-	void *event_specific_data;
-};
-
-/*!
- * \brief Data specific to CC ESC entries.
- *
- * This structure lives in the event_specific_data
- * section of a sip_esc_entry for the CC ESC.
- */
-struct cc_esc_data {
-	/*!
-	 * The current state of the device from which
-	 * we have received a PUBLISH.
-	 */
-	enum sip_cc_publish_state current_state;
-	/*!
-	 * The core_id to which this particular ESC entry
-	 * pertains. We can determine this information using
-	 * either the Request-URI to which the received PUBLISH
-	 * was sent, or by seeing in which dialog the PUBLISH
-	 * arrived if sent in the same dialog as the SUBSCRIBE-
-	 * NOTIFY
-	 */
-	int core_id;
-};
-
-struct event_state_compositor;
-
-typedef int (* const esc_publish_callback)(struct sip_pvt *, struct sip_request *, struct event_state_compositor *, struct sip_esc_entry *);
-
-struct sip_esc_publish_callbacks {
-	const esc_publish_callback initial_handler;
-	const esc_publish_callback refresh_handler;
-	const esc_publish_callback modify_handler;
-	const esc_publish_callback remove_handler;
-};
 
 #ifdef HAVE_LIBXML2
 static int cc_esc_publish_handler(struct sip_pvt *pvt, struct sip_request *req, struct event_state_compositor *esc, struct sip_esc_entry *esc_entry);
@@ -1240,52 +1062,12 @@
 
 static const int ESC_MAX_BUCKETS = 37;
 
-#ifdef HAVE_LIBXML2
-/* I don't actually know if I'll need to do anything here yet,
- * but this helps to fit the skeleton that I've designed for
- * PUBLISH support
- */
-static void cc_esc_destructor(struct sip_esc_entry *esc_entry)
-{
-	struct cc_esc_data *cc_data = esc_entry->event_specific_data;
-	ast_free(cc_data);
-	return;
-}
-
-static int cc_esc_init(struct sip_esc_entry *sip_esc_entry, struct sip_request *req)
-{
-	struct cc_esc_data *cc_data = ast_calloc(1, sizeof(*cc_data));
-
-	if (!cc_data) {
-		return -1;
-	}
-
-	/* For CC, we can associate the incoming request with a CC core_id in one of two ways.
-	 * 1. The Request-URI will be one that we sent in a NOTIFY to let the phone know that
-	 * the called party has become available.
-	 * 2. The PUBLISH is sent in the SUBSCRIBE-NOTIFY dialog.
-	 *
-	 * Since we're focusing for now specifically on SIP PUBLISH support, and not how it ties
-	 * in with CC specifically, I'm leaving this as a TODO XXX type thing.
-	 */
-
-	sip_esc_entry->event_specific_data = cc_data;
-
-	return 0;
-}
-#endif
-
 static void esc_entry_destructor(void *obj)
 {
 	struct sip_esc_entry *esc_entry = obj;
 	if (esc_entry->sched_id > -1) {
 		AST_SCHED_DEL(sched, esc_entry->sched_id);
 	}
-#ifdef HAVE_LIBXML2
-	if (!strcasecmp(esc_entry->event, "call-completion")) {
-		cc_esc_destructor(esc_entry);
-	}
-#endif
 }
 
 static int esc_hash_fn(const void *obj, const int flags)
@@ -1358,16 +1140,6 @@
 	}
 
 	esc_entry->event = esc->name;
-
-	switch (esc->event) {
-#ifdef HAVE_LIBXML2
-	case CALL_COMPLETION:
-		cc_esc_init(esc_entry, req);
-		break;
-#endif
-	default:
-		break;
-	}
 
 	expires_ms = expires * 1000;
 	/* Bump refcount for scheduler */
@@ -2284,6 +2056,12 @@
 	 * body gets a lot more extra junk that isn't necessary, so we'll leave it out here.
 	 */
 	ast_str_append(&body, 0, "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+	/* XXX The entity attribute is currently set to the peer name associated with the
+	 * dialog. This is because we currently only call this function for call-completion
+	 * PUBLISH bodies. In such cases, the entity is completely disregarded. For other
+	 * event packages, it may be crucial to have a proper URI as the presentity so this
+	 * should be revisited as support is expanded.
+	 */
 	ast_str_append(&body, 0, "<presence xmlns=\"urn:ietf:params:xml:ns:pidf\" entity=\"%s\">\n", presentity);
 	ast_str_append(&body, 0, "<tuple id=\"%s\">\n", tuple_id);
 	ast_str_append(&body, 0, "<status><basic>%s</basic></status>\n", state == CC_OPEN ? "open" : "closed");
@@ -2349,6 +2127,7 @@
 	/* This will never be called because the SIP monitor will never make a status request to
 	 * begin with
 	 */
+	ast_log(LOG_WARNING, "sip_cc_monitor_status_response called. Something dreadfully wrong must have happened.\n");
 	return 0;
 }
 
@@ -2398,6 +2177,8 @@
 	char *uri;
 	char *purpose;
 	char *service_str;
+	static const char cc_purpose[] = "purpose=call-completion";
+	static const int cc_purpose_len = sizeof(cc_purpose) - 1;
 
 	if (ast_strlen_zero(call_info)) {
 		/* No Call-Info present. Definitely no CC offer */
@@ -2407,7 +2188,7 @@
 	uri = strsep(&call_info, ";");
 
 	while ((purpose = strsep(&call_info, ";"))) {
-		if (!strncmp(purpose, "purpose=call-completion", 23)) {
+		if (!strncmp(purpose, cc_purpose, cc_purpose_len)) {
 			break;
 		}
 	}
@@ -11007,22 +10788,24 @@
 		if (ast_str_strlen(p->notify->content))
 			add_line(&req, ast_str_buffer(p->notify->content));
 	} else if (sipmethod == SIP_PUBLISH) {
-		/* XXX This would need to be modified in case other event packages get PUBLISH
-		 * support at any point. This can easily be done by checking the epa_entry->static_data->event
-		 */
 		char expires[SIPBUFSIZE];
-		snprintf(expires, sizeof(expires), "%d", p->expiry);
-		add_header(&req, "Event", "call-completion");
-		add_header(&req, "Expires", expires);
-		if (p->epa_entry->publish_type != SIP_PUBLISH_INITIAL) {
-			add_header(&req, "SIP-If-Match", p->epa_entry->entity_tag);
-		}
-		if (!ast_strlen_zero(p->epa_entry->body)) {
-			add_header(&req, "Content-Type", "application/pidf+xml");
-			add_header_contentLength(&req, strlen(p->epa_entry->body));
-			add_line(&req, p->epa_entry->body);
-		} else {
-			add_header_contentLength(&req, 0);
+		switch (p->epa_entry->static_data->event) {
+		case CALL_COMPLETION:
+			snprintf(expires, sizeof(expires), "%d", p->expiry);
+			add_header(&req, "Event", "call-completion");
+			add_header(&req, "Expires", expires);
+			if (p->epa_entry->publish_type != SIP_PUBLISH_INITIAL) {
+				add_header(&req, "SIP-If-Match", p->epa_entry->entity_tag);
+			}
+			if (!ast_strlen_zero(p->epa_entry->body)) {
+				add_header(&req, "Content-Type", "application/pidf+xml");
+				add_header_contentLength(&req, strlen(p->epa_entry->body));
+				add_line(&req, p->epa_entry->body);
+			} else {
+				add_header_contentLength(&req, 0);
+			}
+		default:
+			break;
 		}
 	} else {
 		add_header_contentLength(&req, 0);

Modified: team/group/CCSS/channels/sip/include/sip.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/sip/include/sip.h?view=diff&rev=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/channels/sip/include/sip.h (original)
+++ team/group/CCSS/channels/sip/include/sip.h Mon Feb 22 15:08:15 2010
@@ -1289,4 +1289,245 @@
 	struct ast_dnsmgr_entry *dnsmgr; /*!< DNS refresh manager for subscription */
 	struct sockaddr_in us;           /*!< Who the server thinks we are */
 };
+
+/*!
+ * \brief The states that can be represented in a SIP call-completion PUBLISH
+ */
+enum sip_cc_publish_state {
+	/*! Closed, i.e. unavailable */
+	CC_CLOSED,
+	/*! Open, i.e. available */
+	CC_OPEN,
+};
+
+/*!
+ * \brief The states that can be represented in a SIP call-completion NOTIFY
+ */
+enum sip_cc_notify_state {
+	/*! Queued, i.e. unavailable */
+	CC_QUEUED,
+	/*! Ready, i.e. available */
+	CC_READY,
+};
+
+/*!
+ * \brief The types of PUBLISH messages defined in RFC 3903
+ */
+enum sip_publish_type {
+	/*!
+	 * \brief Unknown
+	 *
+	 * \details
+	 * This actually is not defined in RFC 3903. We use this as a constant
+	 * to indicate that an incoming PUBLISH does not fit into any of the
+	 * other categories and is thus invalid.
+	 */
+	SIP_PUBLISH_UNKNOWN,
+	/*!
+	 * \brief Initial
+	 *
+	 * \details
+	 * The first PUBLISH sent. This will contain a non-zero Expires header
+	 * as well as a body that indicates the current state of the endpoint
+	 * that has sent the message. The initial PUBLISH is the only type
+	 * of PUBLISH to not contain a Sip-If-Match header in it.
+	 */
+	SIP_PUBLISH_INITIAL,
+	/*!
+	 * \brief Refresh
+	 *
+	 * \details
+	 * Used to keep a published state from expiring. This will contain a
+	 * non-zero Expires header but no body since its purpose is not to
+	 * update state.
+	 */
+	SIP_PUBLISH_REFRESH,
+	/*!
+	 * \brief Modify
+	 *
+	 * \details
+	 * Used to change state from its previous value. This will contain
+	 * a body updating the published state. May or may not contain an
+	 * Expires header.
+	 */
+	SIP_PUBLISH_MODIFY,
+	/*!
+	 * \brief Remove
+	 * 
+	 * \details
+	 * Used to remove published state from an ESC. This will contain
+	 * an Expires header set to 0 and likely no body.
+	 */
+	SIP_PUBLISH_REMOVE,
+};
+
+/*!
+ * Data which is the same for all instances of an EPA for a
+ * particular event package
+ */
+struct epa_static_data {
+	/*! The event type */
+	enum subscriptiontype event;
+	/*!
+	 * The name of the event as it would
+	 * appear in a SIP message
+	 */
+	const char *name;
+	/*!
+	 * The callback called when a 200 OK is received on an outbound PUBLISH
+	 */
+	void (*handle_ok)(struct sip_pvt *, struct sip_request *, struct sip_epa_entry *);
+	/*!
+	 * The callback called when an error response is received on an outbound PUBLISH
+	 */
+	void (*handle_error)(struct sip_pvt *, const int resp, struct sip_request *, struct sip_epa_entry *);
+	/*!
+	 * Destructor to call to clean up instance data
+	 */
+	void (*destructor)(void *instance_data);
+};
+
+/*!
+ * \brief backend for an event publication agent
+ */
+struct epa_backend {
+	const struct epa_static_data *static_data;
+	AST_LIST_ENTRY(epa_backend) next;
+};
+
+struct sip_epa_entry {
+	/*!
+	 * When we are going to send a publish, we need to
+	 * know the type of PUBLISH to send.
+	 */
+	enum sip_publish_type publish_type;
+	/*!
+	 * When we send a PUBLISH, we have to be
+	 * sure to include the entity tag that we
+	 * received in the previous response.
+	 */
+	char entity_tag[SIPBUFSIZE];
+	/*!
+	 * The destination to which this EPA should send
+	 * PUBLISHes. This may be the name of a SIP peer
+	 * or a hostname.
+	 */
+	char destination[SIPBUFSIZE];
+	/*!
+	 * The body of the most recently-sent PUBLISH message.
+	 * This is useful for situations such as authentication,
+	 * in which we must send a message identical to the
+	 * one previously sent
+	 */
+	char body[SIPBUFSIZE];
+	/*!
+	 * Every event package has some constant data and
+	 * callbacks that all instances will share. This
+	 * data resides in this field.
+	 */
+	const struct epa_static_data *static_data;
+	/*!
+	 * In addition to the static data that all instances
+	 * of sip_epa_entry will have, each instance will
+	 * require its own instance-specific data.
+	 */
+	void *instance_data;
+};
+
+/*!
+ * \brief Instance data for a Call completion EPA entry
+ */
+struct cc_epa_entry {
+	/*!
+	 * The core ID of the CC transaction
+	 * for which this EPA entry belongs. This
+	 * essentially acts as a unique identifier
+	 * for the entry and is used in the hash
+	 * and comparison functions
+	 */
+	int core_id;
+	/*!
+	 * We keep the last known state of the
+	 * device in question handy in case
+	 * it needs to be known by a third party.
+	 * Also, in the case where for some reason
+	 * we get asked to transmit state that we
+	 * already sent, we can just ignore the
+	 * request.
+	 */
+	enum sip_cc_publish_state current_state;
+};
+
+struct sip_esc_entry;
+struct event_state_compositor;
+
+typedef int (* const esc_publish_callback)(struct sip_pvt *, struct sip_request *, struct event_state_compositor *, struct sip_esc_entry *);
+
+/*!
+ * \brief Callbacks for SIP ESCs
+ *
+ * \details
+ * The names of the callbacks are self-explanatory. The
+ * corresponding handler is called whenever the specific
+ * type of PUBLISH is received.
+ */
+struct sip_esc_publish_callbacks {
+	const esc_publish_callback initial_handler;
+	const esc_publish_callback refresh_handler;
+	const esc_publish_callback modify_handler;
+	const esc_publish_callback remove_handler;
+};
+
+/*!
+ * \brief common ESC items for all event types
+ *
+ * The entity_id field serves as a means by which
+ * A specific entry may be found.
+ */
+struct sip_esc_entry {
+	/*!
+	 * The name of the party who
+	 * sent us the PUBLISH. This will more
+	 * than likely correspond to a peer name.
+	 *
+	 * This field's utility isn't really that
+	 * great. It's mainly just a user-recognizable
+	 * handle that can be printed in debug messages.
+	 */
+	const char *device_name;
+	/*!
+	 * The event package for which this esc_entry
+	 * exists. Most of the time this isn't really
+	 * necessary since you'll have easy access to the
+	 * ESC which contains this entry. However, in
+	 * some circumstances, we won't have the ESC
+	 * available.
+	 */
+	const char *event;
+	/*!
+	 * The entity ID used when corresponding
+	 * with the EPA on the other side. As the
+	 * ESC, we generate an entity ID for each
+	 * received PUBLISH and store it in this
+	 * structure.
+	 */
+	char entity_tag[30];
+	/*!
+	 * The ID for the scheduler. We schedule
+	 * destruction of a sip_esc_entry when we
+	 * receive a PUBLISH. The destruction is
+	 * scheduled for the duration received in
+	 * the Expires header.
+	 */
+	int sched_id;
+	/*!
+	 * Each ESC entry will be for a specific
+	 * event type. Those entries will need to
+	 * carry data which is intrinsic to the
+	 * ESC entry but which is specific to
+	 * the event package
+	 */
+	void *event_specific_data;
+};
+
 #endif

Modified: team/group/CCSS/include/asterisk/ccss.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/include/asterisk/ccss.h?view=diff&rev=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/include/asterisk/ccss.h (original)
+++ team/group/CCSS/include/asterisk/ccss.h Mon Feb 22 15:08:15 2010
@@ -667,28 +667,6 @@
  * \retval void
  */
 void ast_ignore_cc(struct ast_channel *chan);
-
-/*!
- * \since 1.8
- *
- * \brief Set the dialable name for an extension
- *
- * \details
- * An extension will look like "exten at context." But when it
- * comes time to dial the extension again, what we actually will
- * need to dial may be "Local/exten at context" or "Local/exten at context/n"
- * or something like that. As such, we need to store this information
- * when we call the local channel.
- *
- * Currently, this function is only used by chan_local.c, and probably
- * will never be used outside of that file, so you can safely ignore
- * this function, most likely.
- *
- * \param chan The channel whose CC datastore we wish to modify
- * \param dialstring The dialstring we wish to set
- * \retval void
- */
-void ast_cc_set_extension_dialstring(struct ast_channel *chan, const char * const dialstring);
 
 /*!
  * \since 1.8

Modified: team/group/CCSS/main/ccss.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/main/ccss.c?view=diff&rev=248349&r1=248348&r2=248349
==============================================================================
--- team/group/CCSS/main/ccss.c (original)
+++ team/group/CCSS/main/ccss.c Mon Feb 22 15:08:15 2010
@@ -1617,23 +1617,6 @@
 	.destroy = dialed_cc_interfaces_destroy,
 };
 
-void ast_cc_set_extension_dialstring(struct ast_channel *chan, const char * const dialstring)
-{
-	struct ast_datastore *datastore;
-	struct dialed_cc_interfaces *cc_interfaces;
-
-	ast_channel_lock(chan);
-	if (!(datastore = ast_channel_datastore_find(chan, &dialed_cc_interfaces_info, NULL))) {
-		ast_channel_unlock(chan);
-		return;
-	}
-
-	cc_interfaces = datastore->data;
-	cc_interfaces->current_extension_dialstring = ast_strdup(dialstring);
-	ast_channel_unlock(chan);
-	return;
-}
-
 static struct extension_monitor_pvt *extension_monitor_pvt_init(void)
 {
 	struct extension_monitor_pvt *ext_pvt = ast_calloc(1, sizeof(*ext_pvt));




More information about the svn-commits mailing list