]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix a bug with setting t38pt_udptl at the user or peer level.
authorJoshua Colp <jcolp@digium.com>
Tue, 5 May 2009 14:22:47 +0000 (14:22 +0000)
committerJoshua Colp <jcolp@digium.com>
Tue, 5 May 2009 14:22:47 +0000 (14:22 +0000)
If an incoming call authenticated as a user or peer and t38pt_udptl was
not set to yes in general then no UDPTL session would be present and any
T38 related things would fail. This commit changes it so that if after
authenticating T38 is enabled but no UDPTL session is present one will be
created.

(issue AST-215)

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

channels/chan_sip.c

index c3fb59f15e8d895494cd6527a33e229200fdabe0..81111cb9da44ba917e1d27544ce253f252b55324 100644 (file)
@@ -19630,6 +19630,11 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
                        return 0;
                }
 
+               /* If T38 is needed but not present, then make it magically appear */
+               if (ast_test_flag(&p->flags[1], SIP_PAGE2_T38SUPPORT) && !p->udptl) {
+                       p->udptl = ast_udptl_new_with_bindaddr(sched, io, 0, bindaddr.sin_addr);
+               }
+
                /* We have a succesful authentication, process the SDP portion if there is one */
                if (find_sdp(req)) {
                        if (process_sdp(p, req, SDP_T38_INITIATE)) {