Kamailio script to front standard FusionPBX cluster v2.0

brb5548

Member
Sep 26, 2018
53
6
8
42
In this configuration, you are using public ip addressing for all of the freeswitch instances but you mentioned on digital ocean that they were sharing an ip address. With instance hosting like AWS, GCP or DO, is the preferred way to expose each freeswitch instance on a public ip addresses or should you nat them to an internal ip address?
 

scharrua

New Member
Oct 14, 2018
1
0
1
45
Hello,

just got on this old thread at https://www.pbxforums.com/threads/kamailio-script-to-front-standard-fusionpbx-cluster-v2-0.17/ , and tried your script.
I have some questions regarding the code:
1 - around line 148, there is an IP address 149.202.190.100. What is it? a Carrier? A SIP Trunk to a PBX?
(solved, found the answer in this thread).

2- I'm using the following dispatcher list:
1 sip:192.168.1.102:5060
1 sip:192.168.1.108:5060
20 sip:sip.someprovider.pt:5060 4



From what I understood, in setID 1 are some Asterisk box in the local cluster and used to register SIP clients (phones or other IP PBX).

I tried to register a sofphone and it worked, the ZoIPER is registered in the 192.168.1.102 Asterisk.
I added some standard dialplan in both Asterisk boxes and added following context:

[TEST]
exten => _X.,1,Dial(SIP/${EXTEN}@kamailio)

The ideia is if ZOIPER dials (in this case) any number (_X.), Asterisk at 192.168.1.102 forwards the request to KAMAILIO which would, I assume, dispatch to Carrier on setID 20 (sip.someprovider.pt). But instead it seems to be dispatching to 192.168.1.102 as I get following error from Asterisk:

Got SIP response 483 "Too Many Hops" back from 192.168.1.1:5060

Any clue why? am I missing something?

The ideia is to have Kamailio load balance calls both from and to any SIP Trunk (inbound or outbound calls)


Thanks in advance .

Cheers

Sérgio
 

Mikey

New Member
Feb 10, 2020
13
1
3
50
@DigitalDaz - If I wanted to add RTP proxy to this is it possible in the same "dumb" way where RTP Proxy and Kam doesnt care about users, extensions, phone numbers, etc? I would like to add RTP Proxy in the way where it simply passes the media to Fusion behind a firewall on a private network. Thank you
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
2,379
391
83
You would need to add more to the script, I'm not even sure if this script will work any longer, it certainly should be updated for the latest kamailio. If you are just trying to pass media to a fusion behind the firewall, I wouldn't bother with the kamailio.
 

Mikey

New Member
Feb 10, 2020
13
1
3
50
@DigitalDaz Yes all I'm trying to do is proxy SIP + RTP to a server behind a firewall. Don't want to have to worry about registrations, phone numbers, etc. Just have the SIP/RTP proxy blindly proxy data to one server. What do you recommend is the easiest way to do this if you wouldn't bother with kam?
 

msherbakov

New Member
Jun 16, 2020
1
0
1
22
@DigitalDaz Hi, I need help. I use this config for two instances on AWS EC2. I have a problem:
If I register local number(100@domain1) on FusionPBX_1, local number(101@domain2). On 100@domain1 register external number 1 and 100@domain2 register external number 2. If I caller from 100@domain1 external number to 100@domain2 external number I see 480 on fusionpbx. If I add a rule check 480 error in the MANAGE_FAILURE routing section(maybe because 100@domain1 register on FusionPBX1 and 100@domain2 on FusionPBX2?), and if I get 480 I use ds_next_dst and it works. What could be the problem? Help me please, thanks!