before event_route[websocket:closed] is run, i can assign id of the
closed ws connection to rcv.proto_reserved1 field of the faked message:
static void wsconn_run_route(ws_connection_t *wsc)
{
...
fmsg = faked_msg_next();
wsc->rcv.proto_reserved1 = wsc->id;
fmsg->rcv = wsc->rcv;
...
}
the problem is that
int pv_get_tcpconn_id(struct sip_msg *msg, pv_param_t *param,
pv_value_t *res)
calls tcpconn_get:
if ((con = tcpconn_get(msg->rcv.proto_reserved1, 0, 0, 0, 0)) == NULL)
return pv_get_null(msg, param, res);
and since the ws connection whose id is stored in
msg->rcv.proto_reserved1 does not anymore exist, the statement returns
null pv value.
is there some way to figure out that $conid was accessed from
event_route[websocket:closed] in which case the connection id stored in
msg->rcv.proto_reserved1 should be returned without checking if that
connection still exists?
if not, i guess i need to introduce yet another pv for the purpose.
-- juha
Hi,
When client send register message that reg-id in contact is "0", kamailio failed to update contacts info, but it will send 200-register to client, this will cause one issue that no one can find this client(will always be 404 error)
reg-id in message:
Contact: <sip:2015@100080:5060;ob>;reg-id=0
Related logs:
/usr/local/sbin/kamailio[30325]: ERROR: registrar [savec:402]: pack_ci(): invalid reg-id value
/usr/local/sbin/kamailio[30325]: ERROR: registrar [savec:685]: update_contacts(): failed to pack contact specific info
I think registrar should reply 4xx message when reg-id's value is 0
Best Regards,
Shengy
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/497
A number of additional ports have been opened on Kamailio – the relevant one here is TCP 443. An INVITE comes in from a UA whose from URI is suffixed with :443. PUA generates a PUBLISH out of this. Log is at https://gist.githubusercontent.com/phil-lavin/c381d556c22fd29b4fde/raw/77c5….
The relevant bit to the issue is the last line. PUA is trying to send the PUBLISH to the address and port taken from the from URI… however it sends it over UDP. Because Kamailio is not bound to UDP 443, the PUBLISH is not received.
A hacky “fix” is to make Kamailio bind to UDP 443 as well as TCP 443. I will dig into this deeper today in an attempt to find a better fix.
Suggestions around what is the best solution would be appreciated. I’m thinking that sending this over TCP is not desirable in most instances – unless perhaps Kamailio is only bound to TCP ports?
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/509