Don't do reinvite if both parties talk diffrent codecs
authorMartin Pycko <martinp@digium.com>
Sat, 15 Nov 2003 00:52:49 +0000 (00:52 +0000)
committerMartin Pycko <martinp@digium.com>
Sat, 15 Nov 2003 00:52:49 +0000 (00:52 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1752 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
include/asterisk/rtp.h

index de0712a..71cc572 100755 (executable)
@@ -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()
index cc8d24d..385b24a 100755 (executable)
@@ -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;
 };