if (rtp->ice) {
pj_str_t combined = pj_str(ast_sockaddr_stringify(sa));
pj_sockaddr address;
+ pj_status_t status;
pj_thread_register_check();
pj_sockaddr_parse(pj_AF_UNSPEC(), 0, &combined, &address);
- if (pj_ice_sess_on_rx_pkt(rtp->ice, rtcp ? COMPONENT_RTCP : COMPONENT_RTP, rtcp ? TRANSPORT_SOCKET_RTCP : TRANSPORT_SOCKET_RTP,
- buf, len, &address, pj_sockaddr_get_len(&address)) != PJ_SUCCESS) {
+ status = pj_ice_sess_on_rx_pkt(rtp->ice, rtcp ? COMPONENT_RTCP : COMPONENT_RTP,
+ rtcp ? TRANSPORT_SOCKET_RTCP : TRANSPORT_SOCKET_RTP, buf, len, &address,
+ pj_sockaddr_get_len(&address));
+ if (status != PJ_SUCCESS) {
+ char buf[100];
+
+ pj_strerror(status, buf, sizeof(buf));
+ ast_log(LOG_WARNING, "PJ ICE Rx error status code: %d '%s'.\n",
+ (int) status, buf);
return -1;
}
if (!rtp->passthrough) {
0, &addr)) < 0) {
ast_assert(errno != EBADF);
if (errno != EAGAIN) {
- ast_log(LOG_WARNING, "RTCP Read error: %s. Hanging up.\n", strerror(errno));
+ ast_log(LOG_WARNING, "RTCP Read error: %s. Hanging up.\n",
+ (errno) ? strerror(errno) : "Unspecified");
return NULL;
}
return &ast_null_frame;
}
/* If the payload coming in is not one of the negotiated ones then send it to the core, this will cause formats to change and the bridge to break */
- if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1),bridged_payload) == -1)
- {
+ if (ast_rtp_codecs_find_payload_code(ast_rtp_instance_get_codecs(instance1), bridged_payload) == -1) {
ast_debug(1, "Unsupported payload type received \n");
return -1;
}
&addr)) < 0) {
ast_assert(errno != EBADF);
if (errno != EAGAIN) {
- ast_log(LOG_WARNING, "RTP Read error: %s. Hanging up.\n", strerror(errno));
+ ast_log(LOG_WARNING, "RTP Read error: %s. Hanging up.\n",
+ (errno) ? strerror(errno) : "Unspecified");
return NULL;
}
return &ast_null_frame;