Merged revisions 159316 via svnmerge from
[asterisk/asterisk.git] / channels / chan_iax2.c
index 38fb998..378550a 100644 (file)
@@ -8688,6 +8688,13 @@ retryowner:
                                iaxs[fr->callno]->videoformat = f.subclass & ~0x1;
                        }
                }
+               if (f.frametype == AST_FRAME_CONTROL && iaxs[fr->callno]->owner) {
+                       if (f.subclass == AST_CONTROL_BUSY) {
+                               iaxs[fr->callno]->owner->hangupcause = AST_CAUSE_BUSY;
+                       } else if (f.subclass == AST_CONTROL_CONGESTION) {
+                               iaxs[fr->callno]->owner->hangupcause = AST_CAUSE_CONGESTION;
+                       }
+               }
                if (f.frametype == AST_FRAME_IAX) {
                        AST_SCHED_DEL(sched, iaxs[fr->callno]->initid);
                        /* Handle the IAX pseudo frame itself */