if (!call->hdlc)
call->hdlc = 1;
break;
- case 't':
- if (opt[1] != '\0') {
- CERROR(call, call->ast, "Option 't' (no_dsp) expects no parameter.\n", opt);
- break;
- }
- CDEBUG(call, call->ast, "Option 't' (no dsp).\n");
- if (!call->nodsp)
- call->nodsp = 1;
- break;
case 'q':
if (opt[1] == '\0') {
CERROR(call, call->ast, "Option 'q' (queue) expects parameter.\n", opt);
break;
}
CDEBUG(call, call->ast, "Option 'q' (queue).\n");
- call->nodsp_queue = atoi(opt+1);
+ call->tx_queue = atoi(opt+1);
break;
#if 0
case 'e':
newparam.setup.capainfo.hlc = INFO_HLC_NONE;
newparam.setup.capainfo.exthlc = INFO_HLC_NONE;
send_message(MESSAGE_SETUP, call->ref, &newparam);
+ if (call->tx_queue) {
+ memset(&newparam, 0, sizeof(union parameter));
+ newparam.queue = call->tx_queue * 8;
+ send_message(MESSAGE_DISABLE_DEJITTER, call->ref, &newparam);
+ }
/* change to outgoing setup state */
call->state = CHAN_LCR_STATE_OUT_SETUP;
static void lcr_in_setup(struct chan_call *call, int message_type, union parameter *param)
{
struct ast_channel *ast;
+#ifdef AST_1_8_OR_HIGHER
struct ast_party_redirecting *ast_redir;
struct ast_party_caller *ast_caller;
+#else
+ struct ast_callerid *ast_caller;
+#endif
#if ASTERISK_VERSION_NUM >= 110000
struct ast_party_redirecting s_ast_redir;
struct ast_party_caller s_ast_caller;
#endif
#if ASTERISK_VERSION_NUM < 110000
+#ifdef AST_1_8_OR_HIGHER
ast_redir = &ast->redirecting;
ast_caller = &ast->caller;
#else
+ ast_caller = &ast->cid;
+#endif
+#else
ast_redir = &s_ast_redir;
ast_caller = &s_ast_caller;
#endif
char exten[256], *dial, *interface, *opt;
struct ast_channel *ast;
struct chan_call *call;
+#ifdef AST_1_8_OR_HIGHER
const struct ast_party_redirecting *req_redir;
const struct ast_party_caller *req_caller;
+#endif
ast_mutex_lock(&chan_lock);
CDEBUG(NULL, NULL, "Received request from Asterisk. (data=%s)\n", (char *)data);
#if ASTERISK_VERSION_NUM < 110000
ast->tech = &lcr_tech;
ast->tech_pvt = (void *)1L; // set pointer or asterisk will not call
+#ifdef AST_1_8_OR_HIGHER
req_redir = &requestor->redirecting;
req_caller = &requestor->caller;
+#endif
#else
ast_channel_tech_set(ast, &lcr_tech);
ast_channel_tech_pvt_set(ast, (void *)1L); // set pointer or asterisk will not call
/* join, if both call instances uses dsp
ignore the case of fax detection here it may be benificial for ISDN fax machines or pass through.
*/
- if (!call1->nodsp && !call2->nodsp) {
- CDEBUG(NULL, NULL, "Both calls use DSP, bridging via DSP.\n");
+ CDEBUG(NULL, NULL, "Both calls use DSP, bridging via DSP.\n");
- /* get bridge id and join */
- bridge_id = new_bridge_id();
+ /* get bridge id and join */
+ bridge_id = new_bridge_id();
#if 0
- call1->bridge_id = bridge_id;
- if (call1->bchannel)
- bchannel_join(call1->bchannel, bridge_id);
+ call1->bridge_id = bridge_id;
+ if (call1->bchannel)
+ bchannel_join(call1->bchannel, bridge_id);
- call2->bridge_id = bridge_id;
- if (call2->bchannel)
- bchannel_join(call2->bchannel, bridge_id);
+ call2->bridge_id = bridge_id;
+ if (call2->bchannel)
+ bchannel_join(call2->bchannel, bridge_id);
#else
- printf("FIXME");
- exit(0);
+ printf("FIXME");
+ exit(0);
#endif
- } else
- if (call1->nodsp && call2->nodsp)
- CDEBUG(NULL, NULL, "Both calls use no DSP, bridging in channel driver.\n");
- else
- CDEBUG(NULL, NULL, "One call uses no DSP, bridging in channel driver.\n");
call1->bridge_call = call2;
call2->bridge_call = call1;
apply_opt(call, (char *)argv[0]);
#endif
+ /* send options */
+ if (call->tx_queue) {
+ union parameter newparam;
+
+ memset(&newparam, 0, sizeof(union parameter));
+ newparam.queue = call->tx_queue * 8;
+ send_message(MESSAGE_DISABLE_DEJITTER, call->ref, &newparam);
+ }
else
CERROR(NULL, ast, "lcr_config app not called by chan_lcr channel.\n");
" d - Send display text on called phone, text is the optarg.\n"
" n - Don't detect dtmf tones on called channel.\n"
" h - Force data call (HDLC).\n"
- " t - Disable mISDN_dsp features (required for fax application).\n"
" q - Add queue to make fax stream seamless (required for fax app).\n"
" Use queue size in miliseconds for optarg. (try 250)\n"
" f - Adding fax detection. It it timeouts, mISDN_dsp is used.\n"