aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-11-15 00:52:49 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-11-15 00:52:49 +0000
commitecf766d435fc18559b645a30f3b31d1f6832be97 (patch)
tree716e601171e9673cc9ce68df4d2c14576fcdf21c
parent27ad23c8d920269caedfa5529b0d37b305d50cde (diff)
Don't do reinvite if both parties talk diffrent codecs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1752 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xchannels/chan_sip.c7
-rwxr-xr-xinclude/asterisk/rtp.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index de0712aeb..71cc57240 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6287,10 +6287,17 @@ static int sip_dtmfmode(struct ast_channel *chan, void *data)
return 0;
}
+static int sip_get_codec(struct ast_channel *chan)
+{
+ struct sip_pvt *p = chan->pvt->pvt;
+ return p->capability;
+}
+
static struct ast_rtp_protocol sip_rtp = {
get_rtp_info: sip_get_rtp_peer,
get_vrtp_info: sip_get_vrtp_peer,
set_rtp_peer: sip_set_rtp_peer,
+ get_codec: sip_get_codec,
};
int load_module()
diff --git a/include/asterisk/rtp.h b/include/asterisk/rtp.h
index cc8d24da7..385b24a6a 100755
--- a/include/asterisk/rtp.h
+++ b/include/asterisk/rtp.h
@@ -39,6 +39,7 @@ struct ast_rtp_protocol {
struct ast_rtp *(*get_rtp_info)(struct ast_channel *chan); /* Get RTP struct, or NULL if unwilling to transfer */
struct ast_rtp *(*get_vrtp_info)(struct ast_channel *chan); /* Get RTP struct, or NULL if unwilling to transfer */
int (*set_rtp_peer)(struct ast_channel *chan, struct ast_rtp *peer, struct ast_rtp *vpeer); /* Set RTP peer */
+ int (*get_codec)(struct ast_channel *chan);
char *type;
struct ast_rtp_protocol *next;
};