fixed a bridging-endless-loop also fixed the rdnis is not exported issue
authorChristian Richter <christian.richter@beronet.com>
Fri, 7 Apr 2006 09:31:27 +0000 (09:31 +0000)
committerChristian Richter <christian.richter@beronet.com>
Fri, 7 Apr 2006 09:31:27 +0000 (09:31 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18190 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_misdn.c

index c91fe18..9952eb9 100644 (file)
@@ -1517,7 +1517,8 @@ static int read_config(struct chan_list *ch, int orig) {
                        ast->cid.cid_num=strdup(bc->oad);
                }
                
-               pbx_builtin_setvar_helper(ch->ast,"REDIRECTING_NUMBER",bc->rad);
+               if ( !ast_strlen_zero(bc->rad) ) 
+                       ast->cid.cid_rdnis=strdup(nc->rad);
        }
        return 0;
 }
@@ -2245,8 +2246,8 @@ enum ast_bridge_result  misdn_bridge (struct ast_channel *c0,
                who = ast_waitfor_n(carr, 2, &to);
 
                if (!who) {
-                       ast_log(LOG_DEBUG,"misdn_bridge: empty read\n");
-                       continue;
+                       ast_log(LOG_DEBUG,"misdn_bridge: empty read, breaking out\n");
+                       break;
                }
                f = ast_read(who);