aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authormnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-22 17:39:12 +0000
committermnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b>2010-09-22 17:39:12 +0000
commitf0c834965c8c9fec31e010bfa142a4e97be5315c (patch)
tree7c138431ed4ba1ae5e8868f80c391cec6db9d0d3 /channels
parent37b1259bc48fe301006499188a7697a3e7a039c9 (diff)
Handle media specific T.38 SDP information
(closes issue #16647) Reported by: kwemheuer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@288412 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index b9996c1a5..c652460eb 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5463,9 +5463,11 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
/* 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 */
@@ -5541,6 +5543,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
processed = TRUE;
hp = &sessionhp.hp;
vhp = hp;
+ ihp = hp;
}
break;
case 'a':
@@ -5675,6 +5678,11 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
processed = TRUE;
vhp = &videohp.hp;
}
+ } else if (image) {
+ if (process_sdp_c(value, &imagehp)) {
+ processed = TRUE;
+ ihp = &imagehp.hp;
+ }
}
break;
case 'a':
@@ -5709,7 +5717,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
}
/* Sanity checks */
- if (!hp && !vhp) {
+ if (!hp && !vhp && !ihp) {
ast_log(LOG_WARNING, "Insufficient information in SDP (c=)...\n");
return -1;
}
@@ -5844,7 +5852,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req)
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));