[asterisk-commits] trunk r14521 - in /trunk: channels/chan_zap.c
configs/zapata.conf.sample
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Mar 23 14:41:24 MST 2006
Author: mattf
Date: Thu Mar 23 15:41:23 2006
New Revision: 14521
URL: http://svn.digium.com/view/asterisk?rev=14521&view=rev
Log:
Allow channels to be moved if channel change is requested in SETUP_ACK, also add a WAY cool new field to the nsf option
Modified:
trunk/channels/chan_zap.c
trunk/configs/zapata.conf.sample
Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?rev=14521&r1=14520&r2=14521&view=diff
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Thu Mar 23 15:41:23 2006
@@ -9249,15 +9249,19 @@
ast_log(LOG_WARNING, "Received SETUP_ACKNOWLEDGE on unconfigured channel %d/%d span %d\n",
PRI_SPAN(e->setup_ack.channel), PRI_CHANNEL(e->setup_ack.channel), pri->span);
} else {
- ast_mutex_lock(&pri->pvts[chanpos]->lock);
- pri->pvts[chanpos]->setup_ack = 1;
- /* Send any queued digits */
- for (x=0;x<strlen(pri->pvts[chanpos]->dialdest);x++) {
- ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);
- pri_information(pri->pri, pri->pvts[chanpos]->call,
- pri->pvts[chanpos]->dialdest[x]);
- }
- ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ chanpos = pri_fixup_principle(pri, chanpos, e->ring.call);
+ if (chanpos > -1) {
+ ast_mutex_lock(&pri->pvts[chanpos]->lock);
+ pri->pvts[chanpos]->setup_ack = 1;
+ /* Send any queued digits */
+ for (x=0;x<strlen(pri->pvts[chanpos]->dialdest);x++) {
+ ast_log(LOG_DEBUG, "Sending pending digit '%c'\n", pri->pvts[chanpos]->dialdest[x]);
+ pri_information(pri->pri, pri->pvts[chanpos]->call,
+ pri->pvts[chanpos]->dialdest[x]);
+ }
+ ast_mutex_unlock(&pri->pvts[chanpos]->lock);
+ } else
+ ast_log(LOG_WARNING, "Unable to move channel %d!\n", e->setup_ack.channel);
}
break;
case PRI_EVENT_NOTIFY:
@@ -10973,6 +10977,8 @@
nsf = PRI_NSF_SDN;
else if (!strcasecmp(v->value, "megacom"))
nsf = PRI_NSF_MEGACOM;
+ else if (!strcasecmp(v->value, "tollfreemegacom"))
+ nsf = PRI_NSF_TOLL_FREE_MEGACOM;
else if (!strcasecmp(v->value, "accunet"))
nsf = PRI_NSF_ACCUNET;
else if (!strcasecmp(v->value, "none"))
Modified: trunk/configs/zapata.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/zapata.conf.sample?rev=14521&r1=14520&r2=14521&view=diff
==============================================================================
--- trunk/configs/zapata.conf.sample (original)
+++ trunk/configs/zapata.conf.sample Thu Mar 23 15:41:23 2006
@@ -62,7 +62,7 @@
switchtype=national
;
; Some switches (AT&T especially) require network specific facility IE
-; supported values are currently 'none', 'sdn', 'megacom', 'accunet'
+; supported values are currently 'none', 'sdn', 'megacom', 'tollfreemegacom', 'accunet'
;
;nsf=none
;
More information about the asterisk-commits
mailing list