#include <sofia-sip/sdp.h>
#include <sofia-sip/sip_header.h>
+#ifndef SOFIA_SIP_GCC_4_8_PATCH_APLLIED
+#warning ********************************************************
+#warning Please apply the sofia-sip-gcc-4.8.patch !
+#warning If this issue is already fixed, just remove this check.
+#warning ********************************************************
+#error
+#endif
+
#undef NUTAG_AUTO100
unsigned char flip[256];
}
while(n--)
*to++ = flip[*from++];
+ if (psip->p_dov_rx)
+ psip->dov_rx(payload, payload_len);
psip->bridge_tx(payload, payload_len);
return 0;
int ret;
/* don't bridge, if tones are provided */
- if (p_tone_name[0])
+ if (p_tone_name[0] || p_dov_tx)
+ return -EBUSY;
+
+ if (p_dov_tx)
return -EBUSY;
if ((ret = Port::bridge_rx(data, len)))
, inet_ntoa(ia), inet_ntoa(ia), p_s_rtp_port_local, payload_type, payload_type, media_type2name(media_type));
PDEBUG(DEBUG_SIP, "Using SDP response: %s\n", sdp_str);
+ /* NOTE:
+ * If this response causes corrupt messages, like SDP body inside or
+ * before header, check if the sofia-sip-gcc-4.8.patch was applied.
+ * If it is still corrupted, try to disable optimization when compiling
+ * sofia-sip.
+ */
nua_respond(p_s_handle, SIP_200_OK,
NUTAG_MEDIA_ENABLE(0),
SIPTAG_CONTENT_TYPE_STR("application/sdp"),
return;
/* don't start timer if ... */
- if (!p_tone_name[0])
+ if (!p_tone_name[0] && !p_dov_tx)
return;
p_s_next_tv_sec = 0;
class Psip *psip = (class Psip *)instance;
/* stop timer if ... */
- if (!psip->p_tone_name[0])
+ if (!psip->p_tone_name[0] && !psip->p_dov_tx)
return 0;
psip->load_tx();
/* copy tones */
if (p_tone_name[0]) {
tosend -= read_audio(p, tosend);
+ } else
+ if (p_dov_tx) {
+ tosend -= dov_tx(p, tosend);
}
if (tosend) {
PERROR("buffer is not completely filled\n");