SIP: Fix incoming re-invite
[lcr.git] / remote.cpp
index f8c8621..cb6e528 100644 (file)
@@ -140,6 +140,8 @@ void Premote::message_remote(int message_type, union parameter *param)
 
        switch (message_type) {
        case MESSAGE_TRAFFIC:
+               if (p_dov_rx)
+                       dov_rx(param->traffic.data, param->traffic.len);
                /* record audio */
                if (p_record)
                        record(param->traffic.data, param->traffic.len, 0); // from down
@@ -154,6 +156,10 @@ void Premote::message_remote(int message_type, union parameter *param)
                        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);
+               } else if (p_dov_tx) {
+                       /* use receeived traffic to trigger sending DOV */
+                       dov_tx(param->traffic.data, param->traffic.len);
+                       admin_message_from_lcr(p_r_remote_id, p_r_ref, MESSAGE_TRAFFIC, param);
                }
                return;
 
@@ -233,6 +239,10 @@ int Premote::bridge_rx(unsigned char *data, int len)
 {
        union parameter newparam;
        int l;
+       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