[asterisk-commits] branch crichter/0.3.0 r10226 - in
/team/crichter/0.3.0: channels/ channels/mi...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Feb 15 12:44:55 MST 2006
Author: crichter
Date: Wed Feb 15 13:44:50 2006
New Revision: 10226
URL: http://svn.digium.com/view/asterisk?rev=10226&view=rev
Log:
adde incoming_early_audio option, to avoid sending tone indications to the remote party on incoming calls from the pstn, this shouldnt be enabled, only if the provider allows it
Modified:
team/crichter/0.3.0/channels/chan_misdn.c
team/crichter/0.3.0/channels/misdn/chan_misdn_config.h
team/crichter/0.3.0/channels/misdn_config.c
team/crichter/0.3.0/configs/misdn.conf.sample
Modified: team/crichter/0.3.0/channels/chan_misdn.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/chan_misdn.c?rev=10226&r1=10225&r2=10226&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/chan_misdn.c (original)
+++ team/crichter/0.3.0/channels/chan_misdn.c Wed Feb 15 13:44:50 2006
@@ -148,6 +148,8 @@
int norxtone;
int notxtone;
+
+ int incoming_early_audio;
int pipe[2];
char ast_rd_buf[4096];
@@ -1212,6 +1214,8 @@
misdn_cfg_get( port, MISDN_CFG_TXGAIN, &bc->txgain, sizeof(int));
misdn_cfg_get( port, MISDN_CFG_RXGAIN, &bc->rxgain, sizeof(int));
+ misdn_cfg_get( port, MISDN_CFG_INCOMING_EARLY_AUDIO, &ch->incoming_early_audio, sizeof(int));
+
misdn_cfg_get( port, MISDN_CFG_SENDDTMF, &bc->send_dtmf, sizeof(int));
misdn_cfg_get( port, MISDN_CFG_NEED_MORE_INFOS, &bc->need_more_infos, sizeof(int));
@@ -1735,7 +1739,11 @@
p->state=MISDN_ALERTING;
chan_misdn_log(1, p->bc->port, " --> * IND :\tringing pid:%d\n",p->bc?p->bc->pid:-1);
misdn_lib_send_event( p->bc, EVENT_ALERTING);
- tone_indicate(p, TONE_ALERTING);
+
+ if ( !p->bc->nt && (p->orginator==ORG_MISDN) && !p->incoming_early_audio )
+ chan_misdn_log(1,p->bc->port, " --> incoming_early_audio off\n");
+ else
+ tone_indicate(p, TONE_ALERTING);
chan_misdn_log(1, p->bc->port, " --> * SEND: State Ring pid:%d\n",p->bc?p->bc->pid:-1);
ast_setstate(ast,AST_STATE_RINGING);
}
@@ -2861,7 +2869,11 @@
ret = misdn_lib_send_event(bc, EVENT_PROCEEDING );
}
}
- tone_indicate(ch,TONE_DIAL);
+
+ if ( !bc->nt && (ch->orginator==ORG_MISDN) && !ch->incoming_early_audio )
+ chan_misdn_log(1,bc->port, " --> incoming_early_audio off\n");
+ else
+ tone_indicate(ch,TONE_DIAL);
chan_misdn_log(1, bc->port, "* Starting Ast ctx:%s dad:%s oad:%s with 's' extension\n", ast->context, ast->exten, AST_CID_P(ast));
Modified: team/crichter/0.3.0/channels/misdn/chan_misdn_config.h
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn/chan_misdn_config.h?rev=10226&r1=10225&r2=10226&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn/chan_misdn_config.h (original)
+++ team/crichter/0.3.0/channels/misdn/chan_misdn_config.h Wed Feb 15 13:44:50 2006
@@ -43,6 +43,7 @@
MISDN_CFG_SENDDTMF, /* int (bool) */
MISDN_CFG_HOLD_ALLOWED, /* int (bool) */
MISDN_CFG_EARLY_BCONNECT, /* int (bool) */
+ MISDN_CFG_INCOMING_EARLY_AUDIO, /* int (bool) */
MISDN_CFG_ECHOCANCEL, /* int */
MISDN_CFG_ECHOCANCELWHENBRIDGED, /* int (bool) */
MISDN_CFG_ECHOTRAINING, /* int (bool) */
Modified: team/crichter/0.3.0/channels/misdn_config.c
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/channels/misdn_config.c?rev=10226&r1=10225&r2=10226&view=diff
==============================================================================
--- team/crichter/0.3.0/channels/misdn_config.c (original)
+++ team/crichter/0.3.0/channels/misdn_config.c Wed Feb 15 13:44:50 2006
@@ -104,6 +104,7 @@
{ "senddtmf", MISDN_CFG_SENDDTMF, MISDN_CTYPE_BOOL, "no", NONE },
{ "hold_allowed", MISDN_CFG_HOLD_ALLOWED, MISDN_CTYPE_BOOL, "no", NONE },
{ "early_bconnect", MISDN_CFG_EARLY_BCONNECT, MISDN_CTYPE_BOOL, "yes", NONE },
+ { "incoming_early_audio", MISDN_CFG_INCOMING_EARLY_AUDIO, MISDN_CTYPE_BOOL, "no", NONE },
{ "echocancel", MISDN_CFG_ECHOCANCEL, MISDN_CTYPE_BOOLINT, "0", 128 },
{ "echocancelwhenbridged", MISDN_CFG_ECHOCANCELWHENBRIDGED, MISDN_CTYPE_BOOL, "no", NONE },
{ "echotraining", MISDN_CFG_ECHOTRAINING, MISDN_CTYPE_BOOLINT, "0", 1 },
Modified: team/crichter/0.3.0/configs/misdn.conf.sample
URL: http://svn.digium.com/view/asterisk/team/crichter/0.3.0/configs/misdn.conf.sample?rev=10226&r1=10225&r2=10226&view=diff
==============================================================================
--- team/crichter/0.3.0/configs/misdn.conf.sample (original)
+++ team/crichter/0.3.0/configs/misdn.conf.sample Wed Feb 15 13:44:50 2006
@@ -196,6 +196,17 @@
; turn this to no if you don't mind correct handling of Progress Indicators
;
early_bconnect=yes
+
+
+;
+; turn this on if you like to send Tone Indications to a Incoming
+; isdn channel on a TE Port. Rarely used, only if the Telco allows
+; you to send indications by yourself, normally the Telco sends the
+; indications to the remote party.
+;
+; default: no
+;
+incoming_early_audio=no
; uncomment the following to get into s extension at extension conf
; there you can use DigitTimeout if you can't or don't want to use
More information about the asterisk-commits
mailing list