]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
(closes issue #12694)
authorSteve Murphy <murf@digium.com>
Tue, 25 Nov 2008 22:41:10 +0000 (22:41 +0000)
committerSteve Murphy <murf@digium.com>
Tue, 25 Nov 2008 22:41:10 +0000 (22:41 +0000)
Reported by: yraber
Patches:
      12694.2nd.diff uploaded by murf (license 17)
Tested by: murf, laurav

Thanks to file (Joshua Colp) for his IAX fix.

the change to cdr.c allows no-answer to percolate
up into CDR's, and feels like the right place to
locate this fix; if BUSY is done here, no-answer
should be, too.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@159316 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_iax2.c
main/cdr.c

index 6349f3249e4b72bffafeb0f16ef1d0b4b2b9e301..4d9165cac8318fb289efa764d796b8b246247f38 100644 (file)
@@ -7534,6 +7534,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 */
index 353ff97c8787352e4f597b3e3a2c1e24c0276cd7..39045c9edddec7309fa657af4857608cf2251a16 100644 (file)
@@ -766,6 +766,9 @@ int ast_cdr_disposition(struct ast_cdr *cdr, int cause)
                case AST_CAUSE_BUSY:
                        ast_cdr_busy(cdr);
                        break;
+               case AST_CAUSE_NO_ANSWER:
+                       ast_cdr_noanswer(cdr);
+                       break;
                case AST_CAUSE_NORMAL:
                        break;
                default: