X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=remote.cpp;h=f8c862144a4d730ed47d0a01ecef1d4e13b1e27a;hp=4917f3b9239b1e591e718a48cf2fe020650b2967;hb=705f2dac84720c9c3d24d5c26f23733773077536;hpb=d2bcbfbaf06eafcf44d8884fd6fb0a7f334b479b diff --git a/remote.cpp b/remote.cpp index 4917f3b..f8c8621 100644 --- a/remote.cpp +++ b/remote.cpp @@ -24,6 +24,7 @@ Premote::Premote(int type, char *portname, struct port_settings *settings, struc p_r_ref = new_remote++; SCPY(p_r_remote_app, interface->remote_app); p_r_tones = (interface->is_tones == IS_YES); + p_r_earlyb = (interface->is_earlyb == IS_YES); /* send new ref to remote socket */ memset(¶m, 0, sizeof(union parameter)); @@ -233,9 +234,14 @@ int Premote::bridge_rx(unsigned char *data, int len) union parameter newparam; int l; - /* don't send tones, if not enabled or not connected */ - if (!p_r_tones - && p_state != PORT_STATE_CONNECT) + /* send tones, if connected, or if early audio is enabled in proceeding/alerting state */ + if (p_state != PORT_STATE_CONNECT + && !(p_r_earlyb + && (p_state == PORT_STATE_OUT_PROCEEDING + || p_state == PORT_STATE_OUT_ALERTING)) + && !(p_r_tones + && (p_state == PORT_STATE_IN_PROCEEDING + || p_state == PORT_STATE_IN_ALERTING))) return 0; if (p_tone_name[0])