[Asterisk-cvs] asterisk/channels chan_sip.c,1.563,1.564
markster at lists.digium.com
markster at lists.digium.com
Sun Nov 14 10:12:24 CST 2004
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv2259/channels
Modified Files:
chan_sip.c
Log Message:
On second thought, add new "never" option for progressinband
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.563
retrieving revision 1.564
diff -u -d -r1.563 -r1.564
--- chan_sip.c 14 Nov 2004 14:54:54 -0000 1.563
+++ chan_sip.c 14 Nov 2004 15:13:13 -0000 1.564
@@ -1900,16 +1900,14 @@
switch(condition) {
case AST_CONTROL_RINGING:
if (ast->_state == AST_STATE_RING) {
- /* Send 180 ringing no matter what */
- transmit_response(p, "180 Ringing", &p->initreq);
- if (!p->progress) {
+ if (!p->progress || !p->progressinband) {
+ /* Send 180 ringing if out-of-band seems reasonable */
+ transmit_response(p, "180 Ringing", &p->initreq);
p->ringing = 1;
- if (!p->progressinband)
+ if (!p->progressinband > 1)
break;
} else {
- /* Oops, we've sent progress tones. Some devices don't seem to
- handle a 180 after a 183, so we'll go ahead and send the
- ringback in-band, too. */
+ /* Well, if it's not reasonable, just send in-band */
}
}
return -1;
@@ -8208,7 +8206,12 @@
} else if (!strcasecmp(v->name, "useclientcode")) {
user->useclientcode = ast_true(v->value);
} else if (!strcasecmp(v->name, "progressinband")) {
- user->progressinband = ast_true(v->value);
+ if (!strcasecmp(v->value, "never"))
+ user->progressinband = 0;
+ else if (ast_true(v->value))
+ user->progressinband = 2;
+ else
+ user->progressinband = 1;
#ifdef OSP_SUPPORT
} else if (!strcasecmp(v->name, "ospauth")) {
if (!strcasecmp(v->value, "exclusive")) {
@@ -8474,7 +8477,12 @@
} else if (!strcasecmp(v->name, "trustrpid")) {
peer->trustrpid = ast_true(v->value);
} else if (!strcasecmp(v->name, "progressinband")) {
- peer->progressinband = ast_true(v->value);
+ if (!strcasecmp(v->value, "never"))
+ peer->progressinband = 0;
+ else if (ast_true(v->value))
+ peer->progressinband = 2;
+ else
+ peer->progressinband = 1;
#ifdef OSP_SUPPORT
} else if (!strcasecmp(v->name, "ospauth")) {
if (!strcasecmp(v->value, "exclusive")) {
@@ -8625,7 +8633,12 @@
} else if (!strcasecmp(v->name, "trustrpid")) {
global_trustrpid = ast_true(v->value);
} else if (!strcasecmp(v->name, "progressinband")) {
- global_progressinband = ast_true(v->value);
+ if (!strcasecmp(v->value, "never"))
+ global_progressinband = 0;
+ else if (ast_true(v->value))
+ global_progressinband = 2;
+ else
+ global_progressinband = 1;
#ifdef OSP_SUPPORT
} else if (!strcasecmp(v->name, "ospauth")) {
if (!strcasecmp(v->value, "exclusive")) {
More information about the svn-commits
mailing list