Kamailio script to front standard FusionPBX cluster v2.0

Status
Not open for further replies.

brb5548

Member
Sep 26, 2018
53
9
8
46
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
49
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
15
1
3
54
@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
3,070
577
113
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
15
1
3
54
@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
26
@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!
 

acoma

New Member
Nov 17, 2018
12
2
3
50
Hi @DigitalDaz,
I know I am late to this thread but have been attempting to get inbound calls working with Kamailio. I have it setup and registering fine, and outbound calls work fine.
When the registration appears on Freeswitch it has the Kamailio IP address in the fs_path of the Contact header as well as listed as the IP address of originating UA. I understand that is from the add_path() line.
When incoming calls get to Freeswitch , via a different path and not going via Kamailio, they get get forwarded to Kamailio instead of delivered to the UA address/port, which then re-dispatches them back to Freeswitch and a loop occurs until it times out with a busy.
In this Kamailio setup, do incoming calls need to go via the Kamailio proxy first as well?

Kamailio is great but can really damage your confidence about what you know (or don't know) about SIP. :)

Cheers,
David
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,070
577
113
I haven't looked at this script for ages, it is ancient. If I remember rightly, it does per domain load balancing so I expect, yes, all traffic should be going through kamailio.
 

acoma

New Member
Nov 17, 2018
12
2
3
50
I haven't looked at this script for ages, it is ancient. If I remember rightly, it does per domain load balancing so I expect, yes, all traffic should be going through kamailio.
Thanks for the reply. I realise its a very old post. I just need to write down the issue to help myself think about it and get some feedback. I am sure you are right.
 
Status
Not open for further replies.