Kamailio and Siremis with FreePBX

Hello

I’ve spent all day trying to get a new install of Debian 8, with Kamailio and Siremis. I’ve installed from source, tried different versions of everything and although I can install both in under 5 minutes now I’m having trouble getting them just to work out of the box - let alone figuring out how to configure it.

Debian 9 wouldn’t work due to PHP compatability errors in PHP7, so I’m using Debian 8 with php5.

I’ve read not only the official documentation but many other articles too.

What I’m asking is:

  1. Is it possible to setup Kamailio using Siremis so that I can have multiple FreePBX’s sharing one outbound trunk, with Kamaiolio acting as the router?

  2. Is there any relatively clear guide out there that achieves this? I’ve not found anything for literally just simple forwarding of calls to a central outbound trunk from all 3 different FreePBX’s.

Thanks in advance for any pointers!

Seperate the concept, they should all be seperate machinrs one ( or more) poixies (kamailio) , as many FBX machines as you want, the kamailio boxes provide redundent single destination trunking to your PBX’s , True ,two sets of FM’s to digest for obvious reasons .

Basically, there is never a good reason to have both kamailio and FreePVX on the same bix.

Hi dicko

Thanks for the reply. I don’t, I have 3 seperate FreePBX servers (soon to be 5 or 6) and currently have independent SIP trunks for them. I’d basically like to map them all to one SIP trunk and I believe Kamilio is the best for that, would you agree?

Kamilio and siremis are currently running unconfigured on a Debian 8 box, I’ve created a ‘subscriber’ called ‘alice’ however can’t figure out how to get FreePBX to connect to that subscriber as an Outbound trunk/route

Thanks

Again, just setup another Kamailio server, terminate tbe sip trinks there and setup the FBX box to trunk to the kamalio bix , Kamailio just switches the incoming call to the relevant server, there are any number of iresources showing you how to set up Siremis/Kamailuo to do tha, just nit this one :slight_smile:

I really don’t understand why people believe it’s so easy. Maybe I just haven’t gripped it as well as I have FreePBX.

Kamailio and siremis is setup, I just don’t know where to start ‘easily’ routing the calls to and from each FreePBX install.

It is really a different system, but there is, as dicko suggests, a lot of support for it. Another GUI I was looking at was dsiprouter. Its a much more streamlined approach, but also loses some functionality. If you are not using that functionality it might be worth a shot.

just setup a trunk with the host set equal to the ip or much preferably, a dns name that has SRV records, pointing to your various Kamailii

Haha literally just found that and installing it now! I will let you know how I get on

I am fine with setting DNS records, not a clue how I configure that trunk in FreePBX though (I assume there will be authentication and variables?)

Don’t assume anything, it will have authentication and variables if you so setup kamailio, if you use dsiprouter you probably won’t be using any just ip’s, but then you won’t need Siremis either. The other nice thing about dsiprouter if you are using a cloudserver with a no routable eth1 (vultr for example) you can proxy the rtp through it and have FreePBX register on the internal network, protecting you from many vulnerabilities

Is it too insecure just to use IPs for authentication? Granted I’m aware how networking works but is it acceptable just to have IP based auth?

That would totally depend on what answers on your IP, You are in total control of what gosinta and what comesouta it.

Only dicko thinks it’s so easy, and don’t be fooled - he has probably been working with Kamailio / openser for quite a long time. :slight_smile: He just wants you to know how clever he is…

My own opinion is that the scripting language of Kamailio or its cousin OpenSIPS is tricky and requires more than a basic understanding of SIP, certainly more understanding than you would need to successfully stand up a FreePBX server, as you are holding the SIP building blocks in your hands and have to know how to put them together to make something useful happen.

1 Like

I’m hitting the ground running with dSIPRouter. How do you setup an IP-only trunk on FreePBX?

Pretty well all you need outgoing is

type=friend
host=192.168.1.1

Incoming just needs similar, or disable just anonymous calls to test and set an inbound route

That’s where Siremis comes inm, it taks all that out of the equation, have you tried it yet?

Yes I tried siremis, but couldn’t figure it out - incredibly over complicated unfortunately.

I’ve setup dSIProuter and it appears to be working OK, however now when I configure FreePBX trunk like you show above, when dialling out it tries to make the call but comes back saying
"The person isn’t answering" and in the logs it’s showing Retransmission Error and never responds.

No, but thanks for the lead. I’ll give it a look sometime.

My FreePBX never hits the Kamilio server (or at least the Kamilio server never responds)

I will try and disable FreePBX firewall to test.

sngrep is a very good tool for a quick look, run it on both boxes and watch them