]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Resolve a T.38 negotiation issue left over from the udptl-updates merge.
authorKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jul 2009 15:02:53 +0000 (15:02 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Fri, 24 Jul 2009 15:02:53 +0000 (15:02 +0000)
The udptl-updates branch that was merged yesterday failed to properly send back
T.38 SDP responses with the correct error correction mode, if the incoming SDP
from the other end caused us to change error correction modes. This patch
corrects that situation.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@208548 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c
include/asterisk/udptl.h
main/udptl.c

index 29e0f959513e9b51a6be1ca4314bcd9a24266971..35ca1409f7a8e26e29bd2e1bc46f503ef797ab44 100644 (file)
@@ -10087,13 +10087,13 @@ static enum sip_result add_sdp(struct sip_request *resp, struct sip_pvt *p, int
                        break;
                }
                ast_str_append(&a_modem, 0, "a=T38FaxMaxDatagram:%d\r\n", ast_udptl_get_local_max_datagram(p->udptl));
-               switch (ast_test_flag(&p->flags[1],  SIP_PAGE2_T38SUPPORT)) {
-               case SIP_PAGE2_T38SUPPORT_UDPTL:
+               switch (ast_udptl_get_error_correction_scheme(p->udptl)) {
+               case UDPTL_ERROR_CORRECTION_NONE:
                        break;
-               case SIP_PAGE2_T38SUPPORT_UDPTL_FEC:
+               case UDPTL_ERROR_CORRECTION_FEC:
                        ast_str_append(&a_modem, 0, "a=T38FaxUdpEC:t38UDPFEC\r\n");
                        break;
-               case SIP_PAGE2_T38SUPPORT_UDPTL_REDUNDANCY:
+               case UDPTL_ERROR_CORRECTION_REDUNDANCY:
                        ast_str_append(&a_modem, 0, "a=T38FaxUdpEC:t38UDPRedundancy\r\n");
                        break;
                }
index 72b9af4aaab46a4b75a8bcb1410b1570c61aa861..ec96f7249ba6b8ce0c834c37bab58c54c0ae6c6e 100644 (file)
@@ -87,7 +87,7 @@ void ast_udptl_set_m_type(struct ast_udptl *udptl, unsigned int pt);
 void ast_udptl_set_udptlmap_type(struct ast_udptl *udptl, unsigned int pt,
                                 char *mimeType, char *mimeSubtype);
 
-int ast_udptl_get_error_correction_scheme(const struct ast_udptl *udptl);
+enum ast_t38_ec_modes ast_udptl_get_error_correction_scheme(const struct ast_udptl *udptl);
 
 void ast_udptl_set_error_correction_scheme(struct ast_udptl *udptl, enum ast_t38_ec_modes ec);
 
index 86a198202aa1a7bca49c546da8492fd114f9d451..f1ca1842825eb9f4a3dc9105795538a1e208edc3 100644 (file)
@@ -769,7 +769,7 @@ static void calculate_far_max_ifp(struct ast_udptl *udptl)
        udptl->far_max_ifp = new_max * 0.75;
 }
 
-int ast_udptl_get_error_correction_scheme(const struct ast_udptl *udptl)
+enum ast_t38_ec_modes ast_udptl_get_error_correction_scheme(const struct ast_udptl *udptl)
 {
        if (udptl)
                return udptl->error_correction_scheme;