chan_lcr: Fixed automagic 's' extension and made pickup work.
Last commit by Andreas changed matching semantics to make it possible to go directly into the dialplan _without_ dialing any digits by implicitly dialing the 's' extension. That is fine, if there is one to match :) If we do not find an implicit 's' extension, we will wait for more digits instead of hanging up immediately. (If you _really_ depended on that 'feature' please add s => { Hangup(); } :) Pickup: the pickup application can be used with PICKUPMARK to match a channel, that is in RINGING state. Unfortunately, one has to explicitly use ast_setstate() in addition to ast_queue_event() to convince asterisk to change the channel state... => Pickup works now.
This commit is contained in:
parent
122a9b2329
commit
6c4b239a3a
|
@ -703,6 +703,12 @@ static void lcr_start_pbx(struct chan_call *call, struct ast_channel *ast, int c
|
||||||
return;
|
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 */
|
/* if not match */
|
||||||
cause = 1;
|
cause = 1;
|
||||||
release:
|
release:
|
||||||
|
@ -1495,6 +1501,7 @@ static int queue_send(void)
|
||||||
case 'R':
|
case 'R':
|
||||||
CDEBUG(call, ast, "Sending queued RINGING to Asterisk.\n");
|
CDEBUG(call, ast, "Sending queued RINGING to Asterisk.\n");
|
||||||
ast_queue_control(ast, AST_CONTROL_RINGING);
|
ast_queue_control(ast, AST_CONTROL_RINGING);
|
||||||
|
ast_setstate(ast, AST_STATE_RINGING);
|
||||||
break;
|
break;
|
||||||
case 'A':
|
case 'A':
|
||||||
CDEBUG(call, ast, "Sending queued ANSWER to Asterisk.\n");
|
CDEBUG(call, ast, "Sending queued ANSWER to Asterisk.\n");
|
||||||
|
|
Loading…
Reference in New Issue