[asterisk-commits] mmichelson: branch group/CCSS r235571 - /team/group/CCSS/channels/chan_dahdi.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Dec 18 14:43:24 CST 2009
Author: mmichelson
Date: Fri Dec 18 14:43:22 2009
New Revision: 235571
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=235571
Log:
Use create_channel_name in dahdi_cc_callback
Modified:
team/group/CCSS/channels/chan_dahdi.c
Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=235571&r1=235570&r2=235571
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Fri Dec 18 14:43:22 2009
@@ -8650,6 +8650,7 @@
}
tmp = ast_channel_alloc(0, state, i->cid_num, i->cid_name, i->accountcode, i->exten, i->context, linkedid, i->amaflags, "DAHDI/%s", ast_str_buffer(chan_name));
+ ast_free(chan_name);
if (!tmp)
return NULL;
tmp->tech = &dahdi_tech;
@@ -12311,9 +12312,19 @@
for(;;) {
if (is_group_or_channel_match(p, groupmatch, &groupmatched, channelmatch, &channelmatched)) {
/* We found a potential match. call the callback */
- char interface_name[128];
- snprintf(interface_name, sizeof(interface_name) - 1, "DAHDI/%s", dest);
- callback(inbound, p->cc_params, interface_name);
+ struct ast_str *interface_name;
+#ifdef HAVE_PRI
+ char dnid[AST_CHANNEL_NAME];
+ sig_pri_extract_called_num_subaddr(p->sig_pvt, dest, dnid, sizeof(dnid));
+ /* XXX I have no idea how chan_dahdi works and I have no idea where to get the
+ * proper "pri" argument for create_channel_name in this case
+ */
+ interface_name = create_channel_name(p, dnid, NULL);
+#else
+ interface_name = create_channel_name(p);
+#endif
+ callback(inbound, p->cc_params, ast_str_buffer(interface_name));
+ ast_free(interface_name);
}
p = backwards ? p->prev : p->next;
if (!p) {
More information about the asterisk-commits
mailing list