Properly set the port number for UDPTL media sessions.
authorMatthew Nicholson <mnicholson@digium.com>
Wed, 21 Jul 2010 15:51:24 +0000 (15:51 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Wed, 21 Jul 2010 15:51:24 +0000 (15:51 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278461 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f5e6a75..6a624f3 100644 (file)
@@ -8266,8 +8266,7 @@ static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action
        /* Setup image address and port */
        if (p->udptl) {
                if (udptlportno > 0) {
-                       isin.sin_family = AF_INET;
-                       isin.sin_port = htons(udptlportno);
+                       ast_sockaddr_set_port(isa, udptlportno);
                        if (ast_test_flag(&p->flags[1], SIP_PAGE2_SYMMETRICRTP) && ast_test_flag(&p->flags[1], SIP_PAGE2_UDPTL_DESTINATION)) {
                                struct sockaddr_in remote_address = { 0, };
                                struct ast_sockaddr remote_address_tmp;