If a simple switch was started on a device and then a specific call
made (such as redial or speed dial), on timeout of the simple switch
the call would be attempted again. This patch only allows the simple
switch to make a call if the substate is still in the collecting
digits mode.
Also added small debug message to dialAndAactivate sub.
Tested by snuff and myself.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@340973
65c4cc65-6c06-0410-ace0-
fbb531ad65f3
}
return NULL;
} else {
- dialandactivatesub(sub, sub->exten);
+ if (sub->substate == SUBSTATE_OFFHOOK) {
+ dialandactivatesub(sub, sub->exten);
+ }
return NULL;
}
} else {
static void dialandactivatesub(struct skinny_subchannel *sub, char exten[AST_MAX_EXTENSION])
{
+ if (skinnydebug) {
+ ast_verb(3, "Sub %d - Dial %s and Activate\n", sub->callid, exten);
+ }
ast_copy_string(sub->exten, exten, sizeof(sub->exten));
activatesub(sub, SUBSTATE_DIALING);
}