Index: channels/chan_sip.c
===================================================================
--- channels/chan_sip.c	(revision 379118)
+++ channels/chan_sip.c	(working copy)
@@ -12599,6 +12599,12 @@
 	i = ao2_iterator_init(candidates, 0);
 
 	while ((candidate = ao2_iterator_next(&i))) {
+		static const int generation = 0;
+		static const int svn = 165;
+		int i, len = strlen(candidate->transport);
+		for(i = 0; i < len; ++i){
+   			candidate->transport[i] = tolower(candidate->transport[i]);
+		}
 		ast_str_append(a_buf, 0, "a=candidate:%s %d %s %d ", candidate->foundation, candidate->id, candidate->transport, candidate->priority);
 		ast_str_append(a_buf, 0, "%s ", ast_sockaddr_stringify_host(&candidate->address));
 		ast_str_append(a_buf, 0, "%s typ ", ast_sockaddr_stringify_port(&candidate->address));
@@ -12615,7 +12621,8 @@
 			ast_str_append(a_buf, 0, " raddr %s ", ast_sockaddr_stringify_host(&candidate->relay_address));
 			ast_str_append(a_buf, 0, "rport %s", ast_sockaddr_stringify_port(&candidate->relay_address));
 		}
-
+		
+		ast_str_append(a_buf, 0, " generation %d svn %d", generation, svn);
 		ast_str_append(a_buf, 0, "\r\n");
 		ao2_ref(candidate, -1);
 	}
@@ -13273,7 +13280,16 @@
 		}
 
 		ast_debug(3, "-- Done with adding codecs to SDP\n");
+		
+		{
+			struct ast_rtp_instance_stats stats = { 0, };
+			ast_rtp_instance_get_stats(p->rtp, &stats, AST_RTP_INSTANCE_STAT_LOCAL_SSRC);
 
+			ast_str_append(&a_audio, 0, "a=ssrc:%u cname:%s\r\n", stats.local_ssrc, "ldjWoB60jbyQlR6e");
+			ast_str_append(&a_audio, 0, "a=ssrc:%u mslabel:%s\r\n", stats.local_ssrc, "6994f7d1-6ce9-4fbd-acfd-84e5131ca2e2");
+			ast_str_append(&a_audio, 0, "a=ssrc:%u label:%s\r\n", stats.local_ssrc, "Doubango");
+		}
+		
 		if (!p->owner || !ast_internal_timing_enabled(p->owner))
 			ast_str_append(&a_audio, 0, "a=silenceSupp:off - - - -\r\n");
 
Index: channels/sip/sdp_crypto.c
===================================================================
--- channels/sip/sdp_crypto.c	(revision 379118)
+++ channels/sip/sdp_crypto.c	(working copy)
@@ -48,6 +48,7 @@
 
 struct sdp_crypto {
 	char *a_crypto;
+	char* tag;
 	unsigned char local_key[SRTP_MASTER_LEN];
 	char local_key64[SRTP_MASTER_LEN64];
 	unsigned char remote_key[SRTP_MASTER_LEN];
@@ -63,6 +64,7 @@
 void sdp_crypto_destroy(struct sdp_crypto *crypto)
 {
 	ast_free(crypto->a_crypto);
+	ast_free(crypto->tag);
 	crypto->a_crypto = NULL;
 	ast_free(crypto);
 }
@@ -281,6 +283,7 @@
 			ast_log(LOG_ERROR, "Could not allocate memory for a_crypto\n");
 			return -1;
 		}
+    		p->tag = strdup(tag);
 		snprintf(p->a_crypto, attr_len + 10, "a=crypto:%s %s inline:%s\r\n", tag, suite, p->local_key64);
 	}
 	return 0;
@@ -294,8 +297,8 @@
 		ast_free(p->a_crypto);
 	}
 
-	if (snprintf(crypto_buf, sizeof(crypto_buf), "a=crypto:1 AES_CM_128_HMAC_SHA1_%i inline:%s\r\n",
-			taglen, p->local_key64) < 1) {
+	if (snprintf(crypto_buf, sizeof(crypto_buf), "a=crypto:%s AES_CM_128_HMAC_SHA1_%i inline:%s\r\n",
+			p->tag ? p->tag : "0", taglen, p->local_key64) < 1) {
 		return -1;
 	}
 
