strncpy(newparam.setup.dialinginfo.keypad, call->dialstring, sizeof(newparam.setup.dialinginfo.keypad)-1);
else
strncpy(newparam.setup.dialinginfo.id, call->dialstring, sizeof(newparam.setup.dialinginfo.id)-1);
- if (!!strcmp(call->interface, "pbx"))
- strncpy(newparam.setup.dialinginfo.interfaces, call->interface, sizeof(newparam.setup.dialinginfo.interfaces)-1);
newparam.setup.callerinfo.itype = INFO_ITYPE_CHAN;
newparam.setup.callerinfo.ntype = INFO_NTYPE_UNKNOWN;
strncpy(newparam.setup.callerinfo.display, call->display, sizeof(newparam.setup.callerinfo.display)-1);
/* use bridge to forware message not supported by asterisk */
if (call->state == CHAN_LCR_STATE_CONNECT) {
- CDEBUG(call, call->ast, "Call is connected, bridging.\n");
- bridge_message_if_bridged(call, message_type, param);
+ if (call->bridge_call) {
+ CDEBUG(call, call->ast, "Call is connected, bridging.\n");
+ bridge_message_if_bridged(call, message_type, param);
+ } else {
+ if (call->dsp_dtmf) {
+ if (!wake_global) {
+ wake_global = 1;
+ char byte = 0;
+ int rc;
+ rc = write(wake_pipe[1], &byte, 1);
+ }
+ strncat(call->queue_string, param->information.id, sizeof(call->queue_string)-1);
+ } else
+ CDEBUG(call, call->ast, "LCR's DTMF detection is disabled.\n");
+ }
}
}
return 0;
}
}
+ send_message(MESSAGE_ENABLEKEYPAD, call->ref, &newparam);
return 0;
}
/* send MESSAGE_NEWREF */
memset(&newparam, 0, sizeof(union parameter));
newparam.newref.direction = 0; /* request from app */
+ strncpy(newparam.newref.interface, call->interface, sizeof(newparam.newref.interface) - 1);
send_message(MESSAGE_NEWREF, 0, &newparam);
/* set hdlc if capability requires hdlc */
call = ast_channel_tech_pvt(ast);
#endif
if (!call || !call->ref) {
+ /* drop the frame, if no ref exists, but return successfull delivery, or asterisk will abort connection */
ast_mutex_unlock(&chan_lock);
if (f != fr) {
ast_frfree(f);
}
- return -1;
+ return 0;
}
len = f->samples;
p = *((unsigned char **)&(f->data));
{
struct chan_call *call;
int len = 0;
- struct ast_frame *f;
+ struct ast_frame *f = NULL;
ast_mutex_lock(&chan_lock);
#if ASTERISK_VERSION_NUM < 110000
call->read_fr.delivery = ast_tv(0,0);
*((unsigned char **)&(call->read_fr.data)) = call->read_buff;
- f = ast_dsp_process(ast, call->dsp, &call->read_fr);
+ if (call->dsp)
+ f = ast_dsp_process(ast, call->dsp, &call->read_fr);
if (f && f->frametype == AST_FRAME_DTMF)
CDEBUG(call, ast, "Asterisk detected inband DTMF: %c.\n", f->subclass.integer);
"\n"
"The available options are:\n"
" d - Send display text on called phone, text is the optarg.\n"
- " n - Don't detect dtmf tones on called channel.\n"
+ " n - Don't detect dtmf tones from LCR.\n"
" h - Force data call (HDLC).\n"
" q - Add queue to make fax stream seamless (required for fax app).\n"
" Use queue size in miliseconds for optarg. (try 250)\n"
" e - Perform echo cancelation on this channel.\n"
#endif
" Takes mISDN pipeline option as optarg.\n"
- " s - Send Non Inband DTMF as inband.\n"
+ " s - Send Non Inband DTMF as inband. (disables LCR's DTMF)\n"
" r - re-buffer packets (160 bytes). Required for some SIP-phones and fax applications.\n"
#if 0
" vr - rxgain control\n"