ensure cause code supplied by IAX2 peer is passed up to caller properly (bug #4064)
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 22 Apr 2005 02:30:36 +0000 (02:30 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 22 Apr 2005 02:30:36 +0000 (02:30 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5494 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c

index b4b14c8..7b05361 100755 (executable)
@@ -6751,6 +6751,11 @@ retryowner:
                                memset(&f, 0, sizeof(f));
                                f.frametype = AST_FRAME_CONTROL;
                                f.subclass = AST_CONTROL_CONGESTION;
+
+                               /* Set hangup cause according to remote */
+                               if (ies.causecode && iaxs[fr.callno]->owner)
+                                       iaxs[fr.callno]->owner->hangupcause = ies.causecode;
+
                                iax2_queue_frame(fr.callno, &f);
                                if (ast_test_flag(iaxs[fr.callno], IAX_PROVISION)) {
                                        /* Send ack immediately, before we destroy */