X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=lcr.git;a=blobdiff_plain;f=remote.cpp;h=4917f3b9239b1e591e718a48cf2fe020650b2967;hp=540a16fa8d10e42eeca676d3ab79d336bf7467f6;hb=d2bcbfbaf06eafcf44d8884fd6fb0a7f334b479b;hpb=b971fdeb6243a5ea64a75cce40cb698946b75411 diff --git a/remote.cpp b/remote.cpp index 540a16f..4917f3b 100644 --- a/remote.cpp +++ b/remote.cpp @@ -139,12 +139,22 @@ void Premote::message_remote(int message_type, union parameter *param) switch (message_type) { case MESSAGE_TRAFFIC: + /* record audio */ + if (p_record) + record(param->traffic.data, param->traffic.len, 0); // from down + if (p_tap) + tap(param->traffic.data, param->traffic.len, 0); // from down bridge_tx(param->traffic.data, param->traffic.len); if (p_tone_name[0]) { read_audio(param->traffic.data, param->traffic.len); + /* record audio */ + if (p_record) + record(param->traffic.data, param->traffic.len, 1); // from up + if (p_tap) + tap(param->traffic.data, param->traffic.len, 1); // from up admin_message_from_lcr(p_r_remote_id, p_r_ref, MESSAGE_TRAFFIC, param); } - break; + return; case MESSAGE_SETUP: interface = getinterfacebyname(p_interface_name); @@ -239,6 +249,11 @@ int Premote::bridge_rx(unsigned char *data, int len) len -= l; memcpy(newparam.traffic.data, data, l); data += l; + /* record audio */ + if (p_record) + record(data, len, 1); // from up + if (p_tap) + tap(data, len, 1); // from up admin_message_from_lcr(p_r_remote_id, p_r_ref, MESSAGE_TRAFFIC, &newparam); }