X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=route.c;h=925bfe86e3334f2a7d0a3ed6ff40db20f80d7a49;hp=ce8dcf6971c54d542ce5e68e472e2cdb5df95d05;hb=5566f74eb29be75da44e29ba72ee6f015249ce61;hpb=42b2772d78f3c1ecd4a4e9e5f2e49db9b420554f diff --git a/route.c b/route.c index ce8dcf6..925bfe8 100644 --- a/route.c +++ b/route.c @@ -2392,7 +2392,7 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset) /* we must have greater or equal length to values */ if ((unsigned long)strlen(string) < comp_len) { /* special case for unfinished dialing */ - if (cond->match == MATCH_DIALING) { + if (cond->match == MATCH_DIALING && !e_dialinginfo.sending_complete) { couldbetrue = 1; /* could match */ comp_len = strlen(string); } else { @@ -2466,7 +2466,8 @@ struct route_action *EndpointAppPBX::route(struct route_ruleset *ruleset) cond = cond->next; } - if (timeout>now_ll && match==1) { /* the matching rule with timeout in the future */ + /* if sending complete, we use future match now, since waiting does not make sense anymore */ + if (timeout>now_ll && match==1 && !e_dialinginfo.sending_complete) { /* the matching rule with timeout in the future */ if (match_timeout == 0 || timeout < match_timeout) { /* first timeout or lower */ /* set timeout in the furture */ match_timeout = timeout;