Merge branch 'master' of ssh://jolly@www.mISDN.org/var/git/lcr
authorAndreas Eversberg <andreas@eversberg.eu>
Mon, 27 Oct 2008 22:51:03 +0000 (23:51 +0100)
committerAndreas Eversberg <andreas@eversberg.eu>
Mon, 27 Oct 2008 22:51:03 +0000 (23:51 +0100)
chan_lcr.c

index cfd3c61..3573e27 100644 (file)
@@ -703,6 +703,12 @@ static void lcr_start_pbx(struct chan_call *call, struct ast_channel *ast, int c
                return;
        }
 
+       if (!*ast->exten) {
+               /* if can match */
+               CDEBUG(call, ast, "There is no 's' extension (and we tried to match it implicitly). Extensions may match, if more digits are dialed.\n");
+               return;
+       }
+
        /* if not match */
        cause = 1;
        release:
@@ -1495,6 +1501,7 @@ static int queue_send(void)
                                        case 'R':
                                                CDEBUG(call, ast, "Sending queued RINGING to Asterisk.\n");
                                                ast_queue_control(ast, AST_CONTROL_RINGING);
+                                               ast_setstate(ast, AST_STATE_RINGING);
                                                break;
                                        case 'A':
                                                CDEBUG(call, ast, "Sending queued ANSWER to Asterisk.\n");
@@ -2125,7 +2132,7 @@ static int lcr_indicate(struct ast_channel *ast, int cond, const void *data, siz
                        ast_moh_stop(ast);
                        call->on_hold = 0;
                        break;
-#if ASTERISK_VERSION_NUM >= 10600
+#ifdef AST_CONTROL_SRCUPDATE
                case AST_CONTROL_SRCUPDATE:
                        CDEBUG(call, ast, "Received AST_CONTROL_SRCUPDATE from Asterisk.\n");
                         break;