Don't send 180 "Ringing" after 183 Session Progres
authorMark Spencer <markster@digium.com>
Wed, 9 Apr 2003 05:38:39 +0000 (05:38 +0000)
committerMark Spencer <markster@digium.com>
Wed, 9 Apr 2003 05:38:39 +0000 (05:38 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@794 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index a1bd9d7..36aa294 100755 (executable)
@@ -1045,8 +1045,12 @@ static int sip_indicate(struct ast_channel *ast, int condition)
        switch(condition) {
        case AST_CONTROL_RINGING:
                if (ast->_state == AST_STATE_RING) {
-                       transmit_response(p, "180 Ringing", &p->initreq);
-                       break;
+                       if (!p->progress) {
+                               transmit_response(p, "180 Ringing", &p->initreq);
+                               break;
+                       } else {
+                               /* Oops, we've sent progress tones.  Let Asterisk do it instead */
+                       }
                }
                return -1;
        case AST_CONTROL_BUSY: