Configure Asterisk as a SIP outbound proxy (as a SIP server)

I just installed Asterisk and I would like to configure Asterisk as a SIP server relay.

I already have a SIP server, but it doesn't accept websocket (wss) connections directly.

enter image description here

The goal is to have a web client that uses the SIPJS library: ( http://sipjs.com/guides/user-agent-construction/ ) and that will be able to register on sipserver A.

How do I set up a file sip.js

and extension.conf

an asterisk to do this?

+3


source to share


1 answer


This is probably not the answer you want, but Asterisk is not a SIP proxy . This is technically B2BUA (reverse user agent).

In short, this means that Asterisk is always a sort of endpoint for a call.

You can try using Kamailio , which can be used as a stateless relay, to act as a SIP proxy, which is pretty good.

However, you may be able to make a B2BUA call if you can both:

A: Create a trunk from Asterisk to "SIP Server A"

B: create client connection from SIP.js to Asterisk. Documentation is available for SIP.js specifically for this .



In this case, as soon as an incoming call comes to Asterisk from the SIP.js client, you can bridge the calls with the application Dial

in Asterisk to call "sip server a"

For example sip.conf

:

[sipjs]
context=inbound_sipjs
; ...and the rest from sip.js documentation

[sipservera]
context=inbound_sipserver
; rest as required with your sip server

      

Then in yours extensions.conf

, assuming an incoming call from a SIP.js client:

[inbound_sipjs]

exten => _X.,1,Noop(Call from SIP.js)
same =>      n,Dial(SIP/sipservera/${EXTEN})
same =>      n,Hangup()

      

+3


source







All Articles