diff options
author | Joshua Colp <jcolp@digium.com> | 2012-08-17 19:50:58 +0000 |
---|---|---|
committer | Joshua Colp <jcolp@digium.com> | 2012-08-17 19:50:58 +0000 |
commit | 1a95c9a906e9548a04d91fe77d77216a93e30df9 (patch) | |
tree | 14096ed0814564fbd571cdb400b9aaeda82a8e72 /channels/chan_sip.c | |
parent | 064c7bd45676aa4c6cba4722a24831815523906b (diff) |
When a peer registers using WebSocket do not resolve the Contact provided.
(closes issue ASTERISK-20238)
Reported by: james.mortensen
........
Merged revisions 371482 from http://svn.asterisk.org/svn/asterisk/branches/11
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371483 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b42d42eff..1c8abd1e1 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -15305,8 +15305,9 @@ static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, st ao2_t_unlink(peers_by_ip, peer, "ao2_unlink of peer from peers_by_ip table"); } - if (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) && !ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT)) { - /* use the data provided in the Contact header for call routing */ + if ((transport_type != SIP_TRANSPORT_WS) && (transport_type != SIP_TRANSPORT_WSS) && + (!ast_test_flag(&peer->flags[0], SIP_NAT_FORCE_RPORT) && !ast_test_flag(&peer->flags[0], SIP_NAT_RPORT_PRESENT))) { + /* use the data provided in the Contact header for call routing */ ast_debug(1, "Store REGISTER's Contact header for call routing.\n"); /* XXX This could block for a long time XXX */ /*! \todo Check NAPTR/SRV if we have not got a port in the URI */ |