summaryrefslogtreecommitdiffstats
path: root/chan_lcr.c
diff options
context:
space:
mode:
authorAndreas Eversberg2010-01-24 14:22:34 +0100
committerAndreas Eversberg2010-01-24 14:22:34 +0100
commit34b17bad86b02fae864505ae5fe7055a2bd63290 (patch)
tree5bc4fe77434528ae57e7aa6f2f2a5e577fec5d96 /chan_lcr.c
parentAdded "release" action and timeout to "execute" action. (diff)
downloadlcr-34b17bad86b02fae864505ae5fe7055a2bd63290.tar.gz
lcr-34b17bad86b02fae864505ae5fe7055a2bd63290.tar.xz
lcr-34b17bad86b02fae864505ae5fe7055a2bd63290.zip
Added queue buffer for chan_lcr sending faxes without interruption.
Use options "t:q250" for disabling mISDN_dsp and adding a 250ms delay. modified: README modified: bchannel.c modified: bchannel.h modified: chan_lcr.c modified: chan_lcr.h modified: select.c
Diffstat (limited to 'chan_lcr.c')
-rw-r--r--chan_lcr.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/chan_lcr.c b/chan_lcr.c
index d0993b7..0013f2f 100644
--- a/chan_lcr.c
+++ b/chan_lcr.c
@@ -496,6 +496,14 @@ void apply_opt(struct chan_call *call, char *data)
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);
+ break;
case 'e':
if (opt[1] == '\0') {
CERROR(call, call->ast, "Option 'e' (echo cancel) expects parameter.\n", opt);
@@ -591,7 +599,7 @@ void apply_opt(struct chan_call *call, char *data)
/* re-open, if bchannel is created */
if (call->bchannel && call->bchannel->b_sock > -1) {
bchannel_destroy(call->bchannel);
- if (bchannel_create(call->bchannel, ((call->nodsp || call->faxdetect > 0)?1:0) + ((call->hdlc)?2:0)))
+ if (bchannel_create(call->bchannel, ((call->nodsp || call->faxdetect > 0)?1:0) + ((call->hdlc)?2:0), call->nodsp_queue))
bchannel_activate(call->bchannel, 1);
}
}
@@ -1287,7 +1295,7 @@ int receive_message(int message_type, unsigned int ref, union parameter *param)
bchannel_join(bchannel, call->bridge_id);
}
/* create only, if call exists, othewhise it bchannel is freed below... */
- if (bchannel_create(bchannel, ((call->nodsp || call->faxdetect > 0)?1:0) + ((call->hdlc)?2:0)))
+ if (bchannel_create(bchannel, ((call->nodsp || call->faxdetect > 0)?1:0) + ((call->hdlc)?2:0), call->nodsp_queue))
bchannel_activate(bchannel, 1);
}
/* acknowledge */
@@ -2802,6 +2810,8 @@ int load_module(void)
" 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"
" Use time to detect for optarg.\n"
" c - Make crypted outgoing call, optarg is keyindex.\n"