[Asterisk-cvs] asterisk/channels chan_sip.c,1.464,1.465
markster at lists.digium.com
markster at lists.digium.com
Fri Jul 30 22:45:21 CDT 2004
Update of /usr/cvsroot/asterisk/channels
In directory localhost.localdomain:/tmp/cvs-serv3242/channels
Modified Files:
chan_sip.c
Log Message:
Improve debugging of RTP ports (bug #2131, heavily modified)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.464
retrieving revision 1.465
diff -u -d -r1.464 -r1.465
--- chan_sip.c 29 Jul 2004 18:58:57 -0000 1.464
+++ chan_sip.c 31 Jul 2004 02:31:24 -0000 1.465
@@ -2682,17 +2682,25 @@
/* RTP addresses and ports for audio and video */
sin.sin_family = AF_INET;
memcpy(&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
+
/* Setup audio port number */
sin.sin_port = htons(portno);
- if (p->rtp && sin.sin_port)
+ if (p->rtp && sin.sin_port) {
ast_rtp_set_peer(p->rtp, &sin);
+ if (debug) {
+ ast_verbose("Peer audio RTP is at port %s:%d\n", ast_inet_ntoa(iabuf,sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
+ ast_log(LOG_DEBUG,"Peer audio RTP is at port %s:%d\n",ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
+ }
+ }
/* Setup video port number */
sin.sin_port = htons(vportno);
- if (p->vrtp && sin.sin_port)
+ if (p->vrtp && sin.sin_port) {
ast_rtp_set_peer(p->vrtp, &sin);
-
- if (sipdebug)
- ast_verbose("Peer RTP is at port %s:%d\n", ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
+ if (debug) {
+ ast_verbose("Peer video RTP is at port %s:%d\n", ast_inet_ntoa(iabuf,sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
+ ast_log(LOG_DEBUG,"Peer video RTP is at port %s:%d\n",ast_inet_ntoa(iabuf, sizeof(iabuf), sin.sin_addr), ntohs(sin.sin_port));
+ }
+ }
/* Next, scan through each "a=rtpmap:" line, noting each
* specified RTP payload type (with corresponding MIME subtype):
More information about the svn-commits
mailing list