Module: sems
Branch: master
Commit: 27792e56be2c8234629e8d4680b97e00b9eb3192
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=27792e56be2c8234629e8d4680b97e00b9eb3192

Author: Raphael Coeffic <[email protected]>
Committer: Raphael Coeffic <[email protected]>
Date:   Fri Feb  3 20:51:54 2012 +0100

b/f: use 5060 if no port in 'sent-by' Via-address.

---

 core/sip/trans_layer.cpp |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/core/sip/trans_layer.cpp b/core/sip/trans_layer.cpp
index 1c9454c..5a34192 100644
--- a/core/sip/trans_layer.cpp
+++ b/core/sip/trans_layer.cpp
@@ -408,7 +408,11 @@ int _trans_layer::send_reply(trans_ticket* tt,
                // use port from 'sent-by' via address
                ((sockaddr_in*)&remote_ip)->sin_port = 
htons(req->via_p1->port_i);
            }
-           // else: use the source port from the replied request (from IP hdr)
+           else {
+               // use 5060
+               ((sockaddr_in*)&remote_ip)->sin_port = htons(5060);
+           }
+       }
 
        if(local_socket->is_opt_set(trsp_socket::force_via_address)) {
            DBG("force_via_address\n");

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to