[asterisk-commits] mmichelson: branch group/CCSS r246543 - /team/group/CCSS/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Feb 12 16:55:24 CST 2010
Author: mmichelson
Date: Fri Feb 12 16:55:20 2010
New Revision: 246543
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=246543
Log:
Revert the changes to sip_queryoption made regarding device name.
While they worked great for placing calls when using a native monitor,
they cause royal pains when using a generic monitor. The best approach
is to start from scratch here as far as I can tell.
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=246543&r1=246542&r2=246543
==============================================================================
--- team/group/CCSS/channels/chan_sip.c (original)
+++ team/group/CCSS/channels/chan_sip.c Fri Feb 12 16:55:20 2010
@@ -2540,7 +2540,7 @@
* refcount once the monitor destructor is called
*/
ast_module_ref(ast_module_info->self);
- ast_queue_cc_frame(pvt->owner, "SIP", pvt->dialstring, offered_service, monitor_instance);
+ ast_queue_cc_frame(pvt->owner, "SIP", p->dialstring, offered_service, monitor_instance);
ao2_ref(monitor_instance, -1);
return;
}
@@ -4284,9 +4284,6 @@
enum ast_t38_state state = T38_STATE_UNAVAILABLE;
struct sip_pvt *p = (struct sip_pvt *) chan->tech_pvt;
char *cp;
- char *peer_or_host;
- char *separator;
- char *chan_name_copy;
switch (option) {
case AST_OPTION_T38_STATE:
@@ -4324,41 +4321,6 @@
*cp = p->dsp ? 1 : 0;
ast_debug(1, "Reporting digit detection %sabled on %s\n", *cp ? "en" : "dis", chan->name);
break;
- case AST_OPTION_DEVICE_NAME:
- chan_name_copy = ast_strdupa(chan->name);
- if ((peer_or_host = strchr(chan_name_copy, '/'))) {
- *peer_or_host++ = '\0';
- }
- if ((separator = strrchr(peer_or_host, '-'))) {
- *separator = '\0';
- }
- /* If the channel name already has '@' in it, then
- * the device name is already specific enough for our needs.
- * ast_channel_get_device_name, will do our job for us in this
- * case.
- */
- if (strchr(peer_or_host, '@')) {
- break;
- }
-
- /* SIP channel names are not formulated all that well. Let's say
- * we have a second Asterisk box which is listed in our sip.conf
- * as a peer called "asterisk." This second Asterisk box has two
- * SIP phones defined in its sip.conf file called "1000" and "2000"
- *
- * From here, if we dial 1000 at asterisk, then the resulting channel
- * gets the name SIP/asterisk-<sequence>. The same name is what is
- * used for when we dial 2000 at asterisk as well.
- *
- * Since call completion requires finer granularity than this, the
- * channel name of a SIP channel is made distinct from the device
- * name by specifying p->username @ p->peername. In cases where
- * we are not dialing a peer, but rather some hostname, we make the
- * device name p->username @ host.
- */
- cp = (char *) data;
- snprintf(cp, *datalen, "SIP/%s%s%s", S_OR(p->username, ""), ast_strlen_zero(p->username) ? "" : "@", peer_or_host);
- res = 0;
default:
break;
}
More information about the asterisk-commits
mailing list