diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index 46b75bf31989b7698df91d2f58a702f9a3526640..21d1a9ad4a12b52b41615aa14a50f7b48508d05a 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -2167,12 +2167,8 @@ static int transmit_modify_with_sdp(struct mgcp_subchannel *sub, struct ast_rtp
 	char local[256];
 	char tmp[80];
 	int x;
-	int capability;
 	struct mgcp_endpoint *p = sub->parent;
 
-	capability = p->capability;
-	if (codecs)
-		capability = codecs;
 	if (ast_strlen_zero(sub->cxident) && rtp) {
 		/* We don't have a CXident yet, store the destination and
 		   wait a bit */