[svn-commits] tzafrir: branch tzafrir/monitor-rtp r214862 - /team/tzafrir/monitor-rtp/res/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Aug 30 08:03:40 CDT 2009


Author: tzafrir
Date: Sun Aug 30 08:03:36 2009
New Revision: 214862

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=214862
Log:
fix INVITE SDP destination address.

Now wireshark understands the generated streams.

Modified:
    team/tzafrir/monitor-rtp/res/res_monitor.c

Modified: team/tzafrir/monitor-rtp/res/res_monitor.c
URL: http://svn.asterisk.org/svn-view/asterisk/team/tzafrir/monitor-rtp/res/res_monitor.c?view=diff&rev=214862&r1=214861&r2=214862
==============================================================================
--- team/tzafrir/monitor-rtp/res/res_monitor.c (original)
+++ team/tzafrir/monitor-rtp/res/res_monitor.c Sun Aug 30 08:03:36 2009
@@ -382,6 +382,7 @@
 	char packet[BUFSIZ];
 	struct sockaddr_in my_addr;
 	char my_ip[INET_ADDRSTRLEN + 1];
+	char dst_ip[INET_ADDRSTRLEN + 1];
 	in_port_t rtp_port = rtp_state->dest.sin_port;
 	struct ast_cdr *cdr = chan ? chan->cdr : NULL;
 	int content_length;
@@ -423,6 +424,10 @@
 	}
 	if (inet_ntop(AF_INET, &my_addr.sin_addr, my_ip, sizeof(my_ip)) == NULL) {
 		ast_log(LOG_WARNING, "Cannot convert ip address: %s\n", strerror(errno));
+		return -1;
+	}
+	if(inet_ntop(AF_INET, &sip_server_addr.sin_addr, dst_ip, sizeof(dst_ip)) == NULL) {
+		ast_log(LOG_WARNING, "Cannot convert server ip address: %s\n", strerror(errno));
 		return -1;
 	}
 	ast_cdr_getvar(cdr, "src", &src, srcbuf, sizeof(srcbuf), 0, 0);
@@ -438,7 +443,7 @@
 				"m=audio %d RTP/AVP 0 \r\n"
 				"a=rtpmap:0 PCMU/8000\r\n",
 				chan->uniqueid, my_ip,
-				my_ip,
+				dst_ip,
 				(is_rx) ? "RX" : "TX",
 				getpid(),
 				ntohs(rtp_port));




More information about the svn-commits mailing list