diff options
author | Mark Spencer <markster@digium.com> | 2003-05-22 14:24:06 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-05-22 14:24:06 +0000 |
commit | 921ffb5dd72f4b4bc2c1b16ccb758627839e7cc4 (patch) | |
tree | 26ea3a9c71f23e541f75145b9d1b764d042f5441 /channels | |
parent | bc75095a9ac7988f2bb29e9043be089d4e4c5cd2 (diff) |
Only send 180 ringing once, fix CTRL+D in main code
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_sip.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index df04adb39..e4bd5af94 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -179,6 +179,7 @@ static struct sip_pvt { int expiry; /* How long we take to expire */ int branch; /* One random number */ int canreinvite; /* Do we support reinvite */ + int ringing; /* Have sent 180 ringing */ int progress; /* Have sent 183 message progress */ int tag; /* Another random number */ int nat; /* Whether to try to support NAT */ @@ -1011,8 +1012,9 @@ static int sip_indicate(struct ast_channel *ast, int condition) switch(condition) { case AST_CONTROL_RINGING: if (ast->_state == AST_STATE_RING) { - if (!p->progress) { + if (!p->progress && !p->ringing) { transmit_response(p, "180 Ringing", &p->initreq); + p->ringing = 1; break; } else { /* Oops, we've sent progress tones. Let Asterisk do it instead */ |