[OpenSIPS-Users] OpenSIPS and Asterisk on same system

Dylan Cruz dylan at regtelco.com
Tue Mar 14 00:26:21 UTC 2023


I'd love a sample OpenSIPS Config that would let me accomplish using it as
a transparent proxy to Asterisk running on the same system. I found a few
tutorials but found a lot of conflicting information and outdated sources,
Once I have that I will have enough to work on to do what I want...
Basically I would like OpenSIPS to sit between the outside world and
Asterisk, Incoming & Outgoing would both transparently be proxied through
it. OpenSIPS would be running on port 5060 & Asterisk would be running on
port 5090, So for example to register to a SIP Trunk from a VoIP provider
my Asterisk sip.conf would look like this: (I know chan_sip is
deprecated...)

*[general]*
*nat=no*
*bindport=5090*
*outboundproxy=127.0.0.1:5060 <http://127.0.0.1:5060> ; Route everything
through OpenSIPS*
*tos_sip=cs3*
*tos_audio=ef*
*trustrpid=yes*
*canreinvite=yes*
*directrtpsetup=yes*
*allowguest=no*
*allowoverlap=yes*
*srvlookup=yes*
*disallow=all*
*allow=ulaw*

*[inbound-pstn]*
*type=peer*
*host=191.122.31.32*
*insecure=invite,port*
*qualify=yes*
*context=from-inbound*

*[outbound-pstn]*
*type=peer*
*host=191.122.31.33*
*insecure=invite,port*
*qualify=yes*

I would then be able to talk to both of those trunks from Asterisk and have
inbound & outbound calls working all the way through to the VoIP provider.

My purpose for wanting to do this is I want to play around with the SIP-I
module in OpenSIPS to interwork ISUP IAM fields by breaking them out into
SIP Headers that I can then manipulate easily in Asterisk.

Full disclosure: I am a complete OpenSIPS noob! This would be my first
OpenSIPS project, I am very impressed with its capabilities and by having a
little sample config it would allow me to experiment and start my journey
of getting my feet wet with it!

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230313/caa2158d/attachment.html>


More information about the Users mailing list