Previously for PJSIP the local address of WebSocket connections
was set to the remote address. For logging purposes this is
not particularly useful.
The WebSocket API has been extended to allow the local
address to be queried and this is used in PJSIP to set the
local address to the correct value.
The PJSIP HEP support has also been tweaked so that reliable
transports always use the local address on the transport
and do not try to (wrongly) guess. As they are connection
based it is impossible for the source to be anything else.
ASTERISK-26758
ASTERISK-27363
Change-Id: Icd305fd038ad755e2682ab2786e381f6bf29e8ca
ast_log(LOG_WARNING,"WebSocket connection from '%s' could not be accepted - failed to get local address\n",
ast_sockaddr_stringify(&ser->remote_address));
websocket_bad_request(ser);
ao2_ref(session,-1);
ao2_ref(protocol_handler,-1);
return0;
}
ast_verb(2,"WebSocket connection from '%s' for protocol '%s' accepted using version '%d'\n",ast_sockaddr_stringify(&ser->remote_address),protocol?:"",version);
/* Populate the session with all the needed details */