/* Host information */
struct ast_hostent audiohp;
struct ast_hostent videohp;
+ struct ast_hostent imagehp;
struct ast_hostent sessionhp;
struct hostent *hp = NULL; /*!< RTP Audio host IP */
struct hostent *vhp = NULL; /*!< RTP video host IP */
+ struct hostent *ihp = NULL; /*!< UDPTL host IP */
int portno = -1; /*!< RTP Audio port number */
int vportno = -1; /*!< RTP Video port number */
int udptlportno = -1; /*!< UDPTL Image port number */
processed = TRUE;
hp = &sessionhp.hp;
vhp = hp;
+ ihp = hp;
}
break;
case 'a':
processed = TRUE;
vhp = &videohp.hp;
}
+ } else if (image) {
+ if (process_sdp_c(value, &imagehp)) {
+ processed = TRUE;
+ ihp = &imagehp.hp;
+ }
}
break;
case 'a':
}
/* Sanity checks */
- if (!hp && !vhp) {
+ if (!hp && !vhp && !ihp) {
ast_log(LOG_WARNING, "Insufficient information in SDP (c=)...\n");
return -1;
}
ast_log(LOG_DEBUG, "Peer T.38 UDPTL is set behind NAT and with destination, destination address now %s\n", ast_inet_ntoa(isin.sin_addr));
}
} else
- memcpy(&isin.sin_addr, hp->h_addr, sizeof(isin.sin_addr));
+ memcpy(&isin.sin_addr, ihp->h_addr, sizeof(isin.sin_addr));
ast_udptl_set_peer(p->udptl, &isin);
if (debug)
ast_log(LOG_DEBUG,"Peer T.38 UDPTL is at port %s:%d\n",ast_inet_ntoa(isin.sin_addr), ntohs(isin.sin_port));