dopensource / dsiprouter Goto Github PK
View Code? Open in Web Editor NEWUI Interface for implementing Kamailio to provide PBX Hosting and SIP Trunking Services
Home Page: https://dsiprouter.org
License: Apache License 2.0
UI Interface for implementing Kamailio to provide PBX Hosting and SIP Trunking Services
Home Page: https://dsiprouter.org
License: Apache License 2.0
Turn the reload button a different color and perhaps change the text on the button to late people know that a reload is needed after making a change
We need to add native support for routing phone provisioning requests to the correct FusionPBX server. In the first release we will just check each FusionPBX server for the MAC address of the phone until one of the FusionPBX servers returns the provisioning file or we reach the end of the FusionPBX servers that are known by dSIPRouter
i think that it's an error, that .settings.py.swp is in repo
Scendario
FusionPBX -> dSIPRouter -> Carrier
Outbound calls via carrier will not hangup when a BYE is sent from the Carrier. Kamailio can't route the BYE back to FusionPBX. The current workaround is to comment out the record_route() statement on line 681 in /etc/kamailio/kamailio.cfg. Restart kamailio to make sure it's working. This works without a problem if using FreePBX/Asterisk. This is what the BYE looks like:
BYE sip:[email protected]:5080;transport=udp;gw=f6d6b954-1a32-4efa-83d1-dddf1b09703c SIP/2.0
Record-Route: sip:52.41.52.34;lr=on;ftag=t65t29gj44F7H;vsf=U2s0M0JsdTNiZ2Z1ZzN1PD4iclB0MC9db3MdVFc-;vst=U2s0M0JsdTNiZ2Z1ZzN1ODI0fkVsKzNfa2szeWFW
Via: SIP/2.0/UDP 52.41.52.34:5060;branch=z9hG4bK8ed6.711fd340464ab5cc22471d6f2aecbea7.0
Via: SIP/2.0/UDP 192.168.99.184;branch=z9hG4bKsr-xL6MWFNVRAQUfgpsa7kVyGxVRcR0W7N9RGwx5G99l-lilDeqJSaZ2PZXuIhLlkwOl0I-W7s9R.M-RdUOy.l-RcMFydgSaFpbRFlXydlFacpba7R-W7p*
Via: SIP/2.0/UDP 192.168.99.184;branch=z9hG4bKsr-xL6MWFNVRAQUfgpsa7xVycsVRch-W7sLy7xCa7pilDeqJSaZ2PZXuIhLlkwkaG6CaSlYRG8nR.q0l740ucgOR5KY
From: sip:[email protected];tag=SDocuhd99-sNHh7+HMfA9XE8bhzHwPNxPENiPUwgAq
To: "100" sip:[email protected];tag=t65t29gj44F7H
Call-ID: 032729c5-f16b-1236-1c9d-42a9360df6b3
CSeq: 124537073 BYE
Max-Forwards: 67
Content-Length: 0
Route: sip:198.211.102.60;lr
The Kamailio error logs states this:
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=888 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=883 a=24 n=has_totag
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: siputils [checks.c:123]: has_totag(): totag found
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=907 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=888 a=24 n=loose_route
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: rr [loose.c:112]: find_first_route(): No Route headers found
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: rr [loose.c:944]: loose_route(): There is no Route HF
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=912 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=907 a=25 n=is_method
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=929 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=912 a=25 n=is_method
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=916 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=913 a=25 n=is_method
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=914 a=24 n=handle_ruri_alias
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: nathelper [nathelper.c:1098]: handle_ruri_alias(): no alias param
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=927 a=16 n=if
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: exec: *** cfgtrace:request_route=[WITHINDLG] c=[/etc/kamailio/kamailio.cfg] l=916 a=24 n=t_check_trans
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_lookup.c:1018]: t_check_msg(): msg (0x7f350c9caa18) id=2062 global id=2061 T start=0xffffffffffffffff
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_lookup.c:476]: t_lookup_request(): start searching: hash=14158, isACK=0
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_lookup.c:419]: matching_3261(): RFC3261 transaction matched, tid=e473.257c9b811386ace7ea8b62ce2ec8fe4c.0
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_lookup.c:676]: t_lookup_request(): transaction found (T=0x7f3502d9f080)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_lookup.c:1087]: t_check_msg(): msg (0x7f350c9caa18) id=2062 global id=2062 T end=0x7f3502d9f080
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: tm [t_reply.c:1568]: t_retransmit_reply(): DBG: t_retransmit_reply: nothing to retransmit
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/receive.c:289]: receive_msg(): request-route executed in: 247 usec
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/xavp.c:446]: xavp_destroy_list(): destroying xavp list (nil)
Jun 23 09:43:21 dsiprouter-v0 /usr/sbin/kamailio[30992]: DEBUG: [core/receive.c:378]: receive_msg(): cleaning up
The current forms don't remove whitespace. This causes Kamailio not to complete a call correctly
Need to implement some dependency checking between a carrier and Global Outbound Routes
In this scenario:
dSIPRouter1
dSIPRouter2
FusionPBX
The SIP endpoint registers to dSIPRouter1
Here's the flow that doesn't work:
Inbound calls -> dSIPRouter1 -> FusionPBX -> dSIPRouter2 -> SIP Endpoint
Problem 1:
It doesn't work because dSIPRouter2 doesn't know where the SIP Endpoint resides because the phone registered thru dSIPRouter1 and the user location table was updated with it's information (i.e ip address).
Possible Solution 1:
The proposed solution is to use the Kamailio DMQ module to replication this information between 2 or more dSIPRouter instances.
Problem 2:
Also, the carrier sends the ACK to FusionPBX. Adding a record_router to dSIPRouter1 causes the call to go thru dSIPRouter1 but, the ACK gets in a loop because dSIPRouter doesn't understand that FusionPBX is the nexthop.
Possible Solution 2:
Have FusionPBX add a record_route in efforts to make it stateless
I had add carriers and add my pbxs. outgoing call already okay, but while incoming call come from carrier to DID number its come 407 Proxy auth required. Whats wrong?
U X.X.X.X:5060 -> X.X.X.X:5080
SIP/2.0 407 Proxy Authentication Required. Add the PBX or Carrier IP using GUI.
Via: SIP/2.0/UDP X.X.X.X:5080;rport=5080;branch=z9hG4bKNygKtcU9j87ZH;received=X.X.X.X.
From: "Haha" sip:[email protected];tag=Xa4Fg0p0NamyS.
To: sip:[email protected];tag=e2cb51a352b1911fcfae7d572feeeca4.9486.
Call-ID: 768f81ec-4646-1236-4e91-f40343033e34.
CSeq: 115128399 INVITE.
Server: kamailio (4.2.0 (x86_64/linux)).
Content-Length: 0.
Im already newbie with kamailio
Need to add an error message that states the username or password is wrong or if some other error occurs during the login process
Validate the existing logrotate settings for rtpengine and add a configuration for kamailio, dsiprouter gui (when in debug mode) and any other components that make sense. We want to ensure log files don't fill up the filesystem.
instead of PBX ip can we route the call/request to a sip uri ?
sip uri is our sip client. (i.e. sip:[email protected])
Thanks
Is it possible to modify the interface and config script to support carriers using SIP registration?
The IP Address is just removed from the dr_gateway table.
dsiprouter/kamailio_dsiprouter.cfg
Line 225 in 83fd3e8
because of this line kamailio couldn't be started
there is no such path on Ubuntu 16.04.3 LTS
neither /usr/lib64/kamailio/modules/
nor /usr/local/kamailio-4.4/lib64/kamailio/modules/
This causes the DID to be stored in the database with these trailing characters
I have attempted twice to install dsiprouter and must be missing something. What is a "clean Debian" install? I have loaded up Debian using the netinst ISO and installed nothing but ssh for remote access. I then following the directions in the readme file and it gets through and now completes. I did have to remove a "sudo" where it loads up the Kamailio key or it stops there with errors. Getting past that it completes with some small errors about the rtpengine package not having kamailio dependency so it cannot configure it, but says it's all installed and ready. I open a browser and try to get the login page it cannot be found. Do I need to install Apache or some other web server? Should I be installing is on a Debian LAMP server? Thanks for your help, just need clarification on package prerequisites.
Without this option the iptables rule for allowing dSIPRouter to access the FusionPBX will not be abled during the next reboot. Hence, preventing dSIPRouter from retrieving domain info
The current PBX Username/Password Auth doesn't allow a unique domain name for registration. By default all usernames/password are registered at [email protected] or they can change the domain name, but it's global.
We need to allow the end user to specify the domain name when creating the username. If a username is not specified then we should use the default domain name of sip.dsiprouter.org.
Hi,
After all day of trying to figure out how to add dSIProuter as a FreePBX outbound & inbound route / trunk, i figured I'd just ask here.
I've tried all sorts of standard SIP configuration, is there a guide or any advice on how to configure the FreePBX for outbound dialling & inbound calls?
All my efforts led me to basically having sngrep show me the odd packet trying to talk to dSIProuter however it didn't seem to act on it, or do anything.
The Kamailio logs didn't seem to be pickip up the traffic either, however sngrep detected the traffic hitting the server from [email protected]
Thanks!
Out of the box support for running on AWS with proper configuration for the RTPEngine
We should make this a configurable parameter in the GUI
when I fist time add pbx, it works.
but after reboot few times, I try to add pbx.
the system shows error:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
We tried dsiprouter behind a NAT and that didn't work. Even after 10 hours of support we could never get it to work good and solid. That being said we decided to ditch the NAT and run dsiprouter with a public IP address. Now we are having trouble getting it to work using 2 network cards, a public interface and a private interface. On the public side we have the carriers using IP authentication so that's good. On the private side we have the PBX's and phones (phones register with the internal PBX). We have tried 2-3 times with a clean install of Debian 9 to get this working. All we need is for dsiprouter to pass the traffic in from the carrier (public ip/external interface to private/internal interface) to the correct PBX per DID. Then we need it to do the opposite direction for outgoing calls. Are trying to do something it's not designed to do?
It seems like certain SIP OPTION messages causes the server to die. SIP OPTION messages are being routed using the drouting module. This should NOT be the case, we should respond to SIP OPTION messages without using the drouting module as long as the ip address is allowed by the permissions module.
i don't know how this happened, but i think it's something with this line
Line 90 in 5cbd3ea
Configuration Carrier Registration via the UI and the underlying Kamailio configuration
All configuration is now stored in a flat file in [dsiprouter_home]/gui/settings.py.
I'm proposing that we have basic database connection info and other node specific info in [dsiprouter_home]/gui/settings.py and all other info should be stored in a htable that's backed by a DB table. This will allow us to implement use cases like:
We should design for Redis upfront so that it works with our DB of choice, which is MySQL, but should work with Redis.
Will generate a unique password and will display it after a successful install
The updateConfigFile function does not work properly, it is not writing out the settings. This looks like an issue with the module used, it configParser only supports .ini config files
This is the start of integrating our new logo and look and feel
change 5000 port to custom from settings.py
Hi,
I've installed dSIProuter correctly and configured everything to be working on a DigitalOcean droplet using CentOS7.
When an inbound call (via the proxy) isn't ANSWERED by the PBX, the person calling in can hang up and it will hang up on the PBX.
However if the user answers the call, the call goes to an IN CALL state on Kamailio (even if an IVR answers the call and puts the call in a queue). If the person dialling in ends the call, Kamailio goes into a COMPLETED state for that call, however the PBX never receives the TERMINATED / BYE command from Kamailio.
I've tried this with multiple VOIP providers, and even chained some PBX's together to rule out any provider-specific issues.
Happy to test this on DigitalOcean, AWS, VULTR etc to assist with resolving this issue :)
The request from the endpoint (UAC) is immediately getting a 200 OK before it's forwarded to the backend FusionPBX server for authentication.
Hi,
It appears the run/install script is currently broken: run_dsiprouter.sh
`function processCMD {
while [[ $# > 0 ]]
do
key="$1"
case $key in
start)
start
shift
;;
*)
;;
esac
done`
This function appears to be missing a case to handle the "install" option.
It should probably be:
`function processCMD {
while [[ $# > 0 ]]
do
key="$1"
case $key in
start)
start
shift
;;
install)
install
;;
*)
;;
esac
done`
I notice that my dSIPRouter is directly listed after fews registrations requests inside jail "f2b-freeswitch" after a very fresh install of FusionPBX and dSIPRouter
/etc/fail2ban/jail.conf
[DEFAULT]
ignoreip = ip_dsipr/32
This solve everything
First, a little small installation bug in the script. It checks on 'wheezy' instead of 'jessie'.
After that installation runs fine.
But http server is not installed or not listening, so no way to get into dsiprouter.
Netstat -l --> nothing listening on 5000
ubuntu 16.04
git clone https://github.com/dOpensource/dsiprouter
I receive this error when the database for Kamailio and dSIPRouter is Google Cloud SQL Service:
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
This seems to be due to the value of the strip field being an empty string. In comparison, MySQL and MariaDB doesn't care if the string is empty - it just puts in a default integer value of 0
The group column in address table is not updating when creating a PBX or Carrier with the same name as before (basically just editing). This seems to be an issue with non-unique id's, we need to create a one-to-one relationship w/ dr_gateways and address tables. The same should be done w/ uacreg and dr_gw_lists tables.
If Kamailio isn't already installed then install it. We will only support Debian Jessie to start
What would it take to install on Raspbian stretch. I gave it a quick try but it failed with this error:
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/stretch
Would be nice to be able to run on raspberry Pi 3 for smaller Systems
This feature will allow users to configure the Flowroute Carrier setup with the Flowroute API Key so that DID's can be pulled from Flowroute when performing Inbound Mapping to PBX's.
Added support for automatically adding the PBX ip, port and transport when it registers. This means that it automatically gets added to the drouting.gateway table and the table is reloaded in real time
change firewall-cmd to autodetect?(ufw, iptables)
create other script for firewall needs?
The installer uses curl to obtain the external ip address of the server. We will install curl by default now.
After an install of dsiprouter on Debian Stretch 9.4 with the -rtpengine option you have to restart the VM for the rtpengine to start using systemd.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.