/* change state */
call->state = CHAN_LCR_STATE_IN_PROCEEDING;
+ ast_setstate(ast, AST_STATE_OFFHOOK);
goto start;
}
/* change state */
call->state = CHAN_LCR_STATE_IN_DIALING;
+ ast_setstate(ast, AST_STATE_OFFHOOK);
/* if match, start pbx */
if (ast_exists_extension(ast, ast->context, ast->exten, 1, call->oad)) {
return NULL;
}
if (call->pipe[0] > -1) {
- len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
+ if (call->rebuffer) {
+ len = read(call->pipe[0], call->read_buff, 160);
+ } else {
+ len = read(call->pipe[0], call->read_buff, sizeof(call->read_buff));
+ }
if (len <= 0) {
close(call->pipe[0]);
call->pipe[0] = -1;