]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
when overlapdial was used and no number was dialed, the call was dropped, now we...
authorChristian Richter <christian.richter@beronet.com>
Thu, 3 Jan 2008 12:08:40 +0000 (12:08 +0000)
committerChristian Richter <christian.richter@beronet.com>
Thu, 3 Jan 2008 12:08:40 +0000 (12:08 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96198 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index 2233ca02bd4163d9b4ae8b5c3273475506fd8ea0..b2d42ffe973c7f2b07d47c2ec9292fb4aececf7d 100644 (file)
@@ -672,9 +672,16 @@ static int misdn_overlap_dial_task (const void *data)
        diff = ast_tvdiff_ms(tv_end, tv_now);
 
        if (diff <= 100) {
+               char *dad=ch->bc->dad, sexten[]="s";
                /* if we are 100ms near the timeout, we are satisfied.. */
                stop_indicate(ch);
-               if (ast_exists_extension(ch->ast, ch->context, ch->bc->dad, 1, ch->bc->oad)) {
+               
+               if (ast_strlen_zero(ch->bc->dad)) {
+                       dad=sexten;
+                       strcpy(ch->ast->exten, sexten);
+               }
+
+               if (ast_exists_extension(ch->ast, ch->context, dad, 1, ch->bc->oad)) {
                        ch->state=MISDN_DIALING;
                        if (pbx_start_chan(ch) < 0) {
                                chan_misdn_log(-1, ch->bc->port, "ast_pbx_start returned < 0 in misdn_overlap_dial_task\n");