[asterisk-commits] file: trunk r38139 - /trunk/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Sun Jul 23 20:42:28 MST 2006


Author: file
Date: Sun Jul 23 22:42:27 2006
New Revision: 38139

URL: http://svn.digium.com/view/asterisk?rev=38139&view=rev
Log:
Only deal with getting the supported payloads on audio if an audio RTP stream exists

Modified:
    trunk/channels/chan_sip.c

Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?rev=38139&r1=38138&r2=38139&view=diff
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Sun Jul 23 22:42:27 2006
@@ -4447,7 +4447,7 @@
 	int old = 0;
 
 	/* Peer capability is the capability in the SDP, non codec is RFC2833 DTMF (101) */	
-	int peercapability, peernoncodeccapability;
+	int peercapability = 0, peernoncodeccapability = 0;
 	int vpeercapability = 0, vpeernoncodeccapability = 0;
 	struct sockaddr_in sin;		/*!< media socket address */
 	struct sockaddr_in vsin;	/*!< Video socket address */
@@ -4825,7 +4825,8 @@
 	}
 
 	/* Now gather all of the codecs that we are asked for: */
-	ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability);
+	if (p->rtp)
+		ast_rtp_get_current_formats(newaudiortp, &peercapability, &peernoncodeccapability);
 	if (p->vrtp)
 		ast_rtp_get_current_formats(newvideortp, &vpeercapability, &vpeernoncodeccapability);
 



More information about the asterisk-commits mailing list