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));
{
union parameter newparam;
int l;
-
- /* don't send tones, if not enabled or not connected */
- if (!p_r_tones
- && p_state != PORT_STATE_CONNECT)
+ int ret;
+
+ if ((ret = Port::bridge_rx(data, len)))
+ return ret;
+
+ /* 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])