Greg
Greg

Reputation: 7922

Configuring a Kamailio/OpenSER registrar/proxy for outbound SIP?

I've set up a Kamailio v4.0 SIP registrar and proxy for SIP over websockets, and everything is working fine except sending outbound messages or making outbound calls to a SIP address on a foreign domain. I can receive messages and calls from non-local SIP addresses, but not send any out.

I've tried to understand the documentation of various modules like domain and outbound and I'm still stumped. My configuration file is essentially identical to this one.

This feels less like configuration and more like learning a new programming language. Any ideas on how to proceed?

edit: spotted the following in the log file:

INFO: rr [../outbound/api.h:49]: Failed to import bind_ob
INFO: rr [rr_mod.c:159]: outbound module not available

Recompiled with STUN=1 and loaded outbound.so in config (is this barking up the wrong tree?). Now log says:

INFO: rr [rr_mod.c:156]: Bound rr module to outbound module
[...]
WARNING: <core> [msg_translator.c:2499]: TCP/TLS connection (id: 0) for WebSocket could not be found
ERROR: <core> [msg_translator.c:1725]: could not create Via header
ERROR: tm [t_fwd.c:435]: could not build request

Upvotes: 1

Views: 5435

Answers (1)

miconda
miconda

Reputation: 1817

The logs suggest that no connection to the WebSocket client can be found. Kamailio cannot open a connection to a WebSocket (webrtc) softphone, if one does not exist, the SIP message cannot be delivered.

You can list active TCP connections using kamcmd tool:

kamcmd core.tcp_list

If you use WebSockets over TLS:

kamcmd tls.list

There is a config function that should be used in this case - set_forward_no_connect() - to avoid getting so far in processing.

Upvotes: 1

Related Questions