I just installed an Asterisk and i would like to configure Asterisk as a SIP server relay.
I already have a SIP server but this one doesn't accept directly Web Sockets (wss) connections.
The purpose is to have a web client which use SIPJS library : (http://sipjs.com/guides/user-agent-construction/) and which will be able to make a register on sipserver A.
How do I configure sip.js
and extension.conf
file on asterisk to do that ?
This likely isn't the answer that you want, but, Asterisk is not a SIP proxy. It's technically a B2BUA (back-to-back user agent).
In short, that means Asterisk is always a kind-of end-point on the call.
You might try using Kamailio which can be used as a stateless relay to act as a SIP proxy, and it's rather good at it.
However, you may be able to B2BUA the call if you can both:
A: Create a trunk from Asterisk to "SIP Server A"
B: Create a client connection from SIP.js to Asterisk. Documentation available for SIP.js specifically for this.
In which case, once the call comes inbound to Asterisk from the SIP.js client, you can bridge calls using the
Dial
application in Asterisk to make a call to "sip server a"For example,
sip.conf
:Then, in your
extensions.conf
, assuming an inbound call from SIP.js client: