[svn-commits] mnicholson: branch 1.4 r288412 - /branches/1.4/channels/chan_sip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Sep 22 12:39:19 CDT 2010


Author: mnicholson
Date: Wed Sep 22 12:39:12 2010
New Revision: 288412

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=288412
Log:
Handle media specific T.38 SDP information

(closes issue #16647)
Reported by: kwemheuer


Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=288412&r1=288411&r2=288412
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Wed Sep 22 12:39:12 2010
@@ -5463,9 +5463,11 @@
 	/* 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 @@
 				processed = TRUE;
 				hp = &sessionhp.hp;
 				vhp = hp;
+				ihp = hp;
 			}
 			break;
 		case 'a':
@@ -5675,6 +5678,11 @@
 						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 @@
 	}
 
 	/* 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 @@
 						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));




More information about the svn-commits mailing list