aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authordhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-17 21:59:38 +0000
committerdhubbard <dhubbard@f38db490-d61c-443f-a65b-d21fe96a405b>2009-02-17 21:59:38 +0000
commit9f40716814f37256f33ea9a0ddbe41880c19012a (patch)
treea2ac8e7ed65de54becedca053df4ef52c2cc5c69 /channels
parent509eed412d8799df9e4bcad9fa5299407219bc48 (diff)
create a UDPTL structure in create_addr_from_peer() if it does not already exist for T38
This is required to create a UDPTL structure in create_addr_from_peer() to handle the scenario where 't38pt_udptl=yes' is not defined in the [general] section of sip.conf but is defined the peer's context. I tested this patch by enabling t38pt_udptl in the [general] section on one system and only enabling t38pt_udptl in a peer's context on the system sending a fax. Without the patch, the sending system will fail to initiate T38 negotiation with the warning message, "No way to add SDP without an UDPTL structure". When this patch is applied the sending side will successfully initiate T38 negotiation. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176705 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index da32f627a..d01a3c26b 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4709,6 +4709,10 @@ static int create_addr_from_peer(struct sip_pvt *dialog, struct sip_peer *peer)
}
dialog->prefs = peer->prefs;
if (ast_test_flag(&dialog->flags[1], SIP_PAGE2_T38SUPPORT)) {
+ if (!dialog->udptl) {
+ /* t38pt_udptl was enabled in the peer and not in [general] */
+ dialog->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr.sin_addr);
+ }
ast_copy_flags(&dialog->t38.t38support, &peer->flags[1], SIP_PAGE2_T38SUPPORT);
set_t38_capabilities(dialog);
dialog->t38.jointcapability = dialog->t38.capability;