Phone Provisioning through dSIPRouter

62 views
Skip to first unread message

John Diffenderfer

unread,
May 16, 2025, 4:26:13 PMMay 16
to dSIPRouter
I am having an issue provisioning a phone in dSIPRouter with passthru to a Fusionpbx domain. If I go to fusionpbxdomain/provision/mac I get the xml config. If I use disprouter/provision/mac it does not work. I get connection refused even though the domain is synced in dsiprouter which tells me the firewall rules are correct. At least I assume this is the case. FYI I an running Fusionpbx in a logical cluster (version 5.4.2). What am I doing wrong here?

I want to use dsiprouter to proxy all traffic and handle provisioning in case I lose one of my fusionpbx servers from my cluster. 

Mack Hendricks

unread,
May 16, 2025, 5:19:55 PMMay 16
to John Diffenderfer, dSIPRouter
Hey John,

I haven't tested it with FusionPBX 5.4 series...I will have to test it and let you know.  Unless somebody else in the community has tested it.  

On Fri, May 16, 2025 at 4:26 PM John Diffenderfer <john...@gmail.com> wrote:
I am having an issue provisioning a phone in dSIPRouter with passthru to a Fusionpbx domain. If I go to fusionpbxdomain/provision/mac I get the xml config. If I use disprouter/provision/mac it does not work. I get connection refused even though the domain is synced in dsiprouter which tells me the firewall rules are correct. At least I assume this is the case. FYI I an running Fusionpbx in a logical cluster (version 5.4.2). What am I doing wrong here?

I want to use dsiprouter to proxy all traffic and handle provisioning in case I lose one of my fusionpbx servers from my cluster. 

--
You received this message because you are subscribed to the Google Groups "dSIPRouter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dSIPRouter+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dSIPRouter/b4990a35-31a9-4db2-a692-6aa4cbf6c9fdn%40googlegroups.com.

John Diffenderfer

unread,
May 16, 2025, 5:30:59 PMMay 16
to dSIPRouter
Thank you for the quick response Mack. Hopefully someone in the community has an answer. I will continue to play around with my lab environment and report back my solution if I find one. Obviously if you find out what I am missing please let me know. Have a great weekend!!

Mack Hendricks

unread,
May 16, 2025, 6:06:59 PMMay 16
to John Diffenderfer, dSIPRouter
What does the nginx error or access log say.  It’s in /var/log/nginx/ directory 

John Diffenderfer

unread,
May 16, 2025, 6:33:16 PMMay 16
to Mack Hendricks, dSIPRouter
I am not at my desk at the moment, but I will check it out a little bit later on and let you know


Sent from my iPhone

On May 16, 2025, at 5:06 PM, Mack Hendricks <ma...@goflyball.com> wrote:



John Diffenderfer

unread,
May 16, 2025, 8:46:06 PMMay 16
to Mack Hendricks, dSIPRouter
There is nothing in the logs at all from today
Message has been deleted

John Diffenderfer

unread,
May 19, 2025, 12:59:20 PMMay 19
to dSIPRouter
Once I added these commands to the fusionpbx server:

DSIPROUTER_IP=1.1.1.1 sed -i -r "s/^#?listen_addresses[ \t]?=[ \t]?.*/listen_addresses = '*'/m" /etc/postgresql/*/main/postgresql.conf iptables -A INPUT -p tcp -s $DSIPROUTER_IP/32 --dport 5432 -j ACCEPT iptables-save >/etc/iptables/rules.v4 # Run this command if your don't want to enter a password for the FusionPBX Database(DB) Password echo -e "host all all $DSIPROUTER_IP/32 trust" >>/etc/postgresql/*/main/pg_hba.conf systemctl restart postgresql # Run this command if your using fail2ban sed -i -r "s|^#?(ignoreip = .*)|\1 $DSIPROUTER_IP/32|" /etc/fail2ban/jail.conf systemctl restart fail2ban

The domain was added to dsiprouter.

dsiprouter_testpbx01.png

Now when I try and open the xml from a webpage I can get the xml using the fusionpbx address: https://siprouter.urbancom.net/provision/macaddress 
If I use the dsiprouter address it doesn't work. I tried both -  https://testpbx01.urbancom.net/provision/001565a1acc6 and https://testpbx01.urbancom.net:5000/provision/macaddress

I do not see anything at all in the nginx logs so I have nothing to go off of.

John Diffenderfer

unread,
May 19, 2025, 2:50:41 PMMay 19
to dSIPRouter
Ttpo, it is the other way around:

Now when I try and open the xml from a webpage I can get the xml using the fusionpbx address: https://testpbx01.urbancom.net/provision/macaddress 
If I use the dsiprouter address it doesn't work. I tried both -  https://dsiprouter.urbancom.net/provision/001565a1acc6 and https://dsiprouter.urbancom.net:5000/provision/macaddress

John Diffenderfer

unread,
May 20, 2025, 5:58:33 PMMay 20
to dSIPRouter
Is anyone else using the latest FusionPBX 5.4.2 with Logical Replication using DSIProuter as a proxy? My carrier groups are working, my inbound routes are working and my outbound routes are working but I cannot provision a phone through dsip. I cant find anything to go on as I don't even see a log when I try to provision the phone. 

Mack Hendricks

unread,
May 20, 2025, 11:43:39 PMMay 20
to John Diffenderfer, dSIPRouter
Hey John,

I did some testing and I remember what changed:

- FusionPBX now requires the domain name to be in the URL.  So, if the domain is test.dsiprouter.net in FusionPBX then the provisioning URL has to be https://test.dsiprouter.net/provision/64167fc782f4

- This means that all subdomains need to point to dSIPRouter and it will route the request to the FusionPBX server 

For example, my FusionPBX server accessing the Mac address looks like this:


image.png

Changing  test.dsiprouter.net to point to the ip address of fusionpbx.dsiprouter.net it works

image.png


This was a change on the FusionPBX side.  I'm assuming to make it more secure so that you have to know the domain where the provisioning profile exists.   

I'm sure we can come up with some workaround. If you need something immediately, send a note to our support team.  Otherwise, you can put in an issue and we will prioritize it.  It's not a big fix, but takes some time to figure it out.   

Mack Hendricks

unread,
May 21, 2025, 12:36:15 AMMay 21
to John Diffenderfer, dSIPRouter

John Diffenderfer

unread,
May 21, 2025, 8:08:53 AMMay 21
to dSIPRouter
Thanks for looking into this Mack. Looking at what you have, I see that you using port 443.  I am thinking another issue I have as part of this, is the dsiprouter does not have port 80 or 443 open. I get into it using port 5000. Do I need to open port 443?

Mack Hendricks

unread,
May 21, 2025, 8:24:05 AMMay 21
to John Diffenderfer, dSIPRouter
We enable 443 on nginx when you enable the FusionPBX integration.  I don’t think we block 443 from a firewalld level either.  Unless you are running into another issue.  I did make some change to the nginx rule.  Let me post that in a few 

John Diffenderfer

unread,
May 21, 2025, 9:13:42 AMMay 21
to Mack Hendricks, dSIPRouter
Thanks Mack

John Diffenderfer

unread,
May 21, 2025, 9:39:51 AMMay 21
to Mack Hendricks, dSIPRouter
I think my my only issue is 443. Here is what dsiprouter server shows as listening

root@siprouter:~# lsof -iTCP -sTCP:LISTEN -P
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd      647     root    3u  IPv4  15419      0t0  TCP *:22 (LISTEN)
sshd      647     root    4u  IPv6  15430      0t0  TCP *:22 (LISTEN)
nginx     729     root    4u  IPv4  14987      0t0  TCP *:5000 (LISTEN)
nginx     729     root    5u  IPv6  14988      0t0  TCP *:5000 (LISTEN)
mariadbd  741    mysql   45u  IPv4  15556      0t0  TCP localhost:3306 (LISTEN)
nginx    2023    nginx    4u  IPv4  14987      0t0  TCP *:5000 (LISTEN)
nginx    2023    nginx    5u  IPv6  14988      0t0  TCP *:5000 (LISTEN)
nginx    2024    nginx    4u  IPv4  14987      0t0  TCP *:5000 (LISTEN)
nginx    2024    nginx    5u  IPv6  14988      0t0  TCP *:5000 (LISTEN)
kamailio 2057 kamailio   11u  IPv4  18871      0t0  TCP localhost:5060 (LISTEN)
kamailio 2057 kamailio   12u  IPv4  18872      0t0  TCP siprouter.urbancom.net:5060 (LISTEN)
kamailio 2057 kamailio   13u  IPv4  18873      0t0  TCP localhost:5061 (LISTEN)
kamailio 2057 kamailio   14u  IPv4  18874      0t0  TCP localhost:4443 (LISTEN)
kamailio 2057 kamailio   15u  IPv4  18875      0t0  TCP siprouter.urbancom.net:4443 (LISTEN)
kamailio 2057 kamailio   16u  IPv4  18876      0t0  TCP siprouter.urbancom.net:5061 (LISTEN)

Mack Hendricks

unread,
May 21, 2025, 9:46:57 AMMay 21
to John Diffenderfer, dSIPRouter
This means something went wrong with nginx not being reconfigured when you enabled FusionPBX.  Check /etc/ngixnx/sites-enabled and see if 2 files are there?  One of the files activates 443.

John Diffenderfer

unread,
May 21, 2025, 9:49:41 AMMay 21
to Mack Hendricks, dSIPRouter
You are correct. I only have 1 file dsiprouter.conf

Mack Hendricks

unread,
May 21, 2025, 10:00:27 AMMay 21
to John Diffenderfer, dSIPRouter
Is the FusionPBX integration still enabled?  I ask because some people will. Turn it on, sync the domains and turn if off which will turn off the provisioning?

John Diffenderfer

unread,
May 21, 2025, 10:06:21 AMMay 21
to Mack Hendricks, dSIPRouter
It is still on, I just checked. When I enabled FusionPBX I ran the commands that it posts underneath on my FusionPBX server. Once I did that I was able to populate the domains in DSIP. I didn't do anything else.

Mack Hendricks

unread,
May 21, 2025, 10:38:52 AMMay 21
to John Diffenderfer, dSIPRouter
This is what my directory looks like:

image.png

The dsiprouter-provisioner.conf contains the logic.  That file is located here: /opt/dsiprouter/gui/modules/fusionpbx/

There's a template file (dsiprouter-provisioner.tpl) that's used to generate the dsiprouter-provisioner.conf file.  It seems like that file isn't being generated and pushed into the right location.  

What OS are you using?  I'm using Debian 12.   

John Diffenderfer

unread,
May 21, 2025, 10:49:43 AMMay 21
to Mack Hendricks, dSIPRouter
Debian 12 and DSIPRouter  .77

I will take a look at the directory. 

John Diffenderfer

unread,
May 21, 2025, 11:02:42 AMMay 21
to Mack Hendricks, dSIPRouter
I am also going to spin up another VM and go through the process again and see if I missed something. The goal is to show proof of concept so we can use this for our clients and of course setup a support package with you guys. I will report back

Mack Hendricks

unread,
May 21, 2025, 11:08:48 AMMay 21
to John Diffenderfer, dSIPRouter
The easiest thing is to the delete the endpoint group and just re-create it.

John Diffenderfer

unread,
May 21, 2025, 11:09:46 AMMay 21
to Mack Hendricks, dSIPRouter
OK, I can do that
Sent from my iPhone

On May 21, 2025, at 10:08 AM, Mack Hendricks <ma...@goflyball.com> wrote:


The easiest thing is to the delete the endpoint group and just re-create it.

On Wed, May 21, 2025 at 11:02 AM John Diffenderfer <john...@gmail.com> wrote:
I am also going to spin up another VM and go through the process again and see if I missed something. The goal is to show proof of concept so we can use this for our clients and of course setup a support package with you guys. I will report back
On Wed, May 21, 2025 at 9:49 AM John Diffenderfer <john...@gmail.com> wrote:
Debian 12 and DSIPRouter  .77

I will take a look at the directory. 


On Wed, May 21, 2025 at 9:38 AM Mack Hendricks <ma...@goflyball.com> wrote:
This is what my directory looks like:

John Diffenderfer

unread,
May 21, 2025, 11:57:46 AMMay 21
to Mack Hendricks, dSIPRouter
I removed the endpoint, rebooted and then added the endpoint back. 

This is my directory
image.png

Not sure why mine running the same version as yours does not work. All I can think is I didn't get a clean install.

I can go ahead and spin up another VM with:

Debian 12 minimal install and run apt-get update -y && apt-get install -y git && cd /opt && git clone https://github.com/dOpensource/dsiprouter.git && cd dsiprouter && ./dsiprouter.sh install -all


Mack Hendricks

unread,
May 21, 2025, 2:22:50 PMMay 21
to John Diffenderfer, dSIPRouter
Let me know how it goes...we can definitely open a ticket and assign you to a pre-sales support engineer if the goal is to purchase a support agreement at the end of a successful PoC.  That engineer would connect to your server and figure out the issue or fast track a bug fix for you.

John Diffenderfer

unread,
May 21, 2025, 2:57:19 PMMay 21
to Mack Hendricks, dSIPRouter
I reinstalled with Debian 12 and ran the install but same result. I can get everything working except the conf file is not created when I enable fusionpbx in endpoints. Can I just duplicate the dsiprouter.conf file, call it  dsiprouter-provisioner.conf and modify it for 443?

Mack Hendricks

unread,
May 21, 2025, 3:00:59 PMMay 21
to John Diffenderfer, dSIPRouter
Unfortunately no, but you can try to take the dsiprouter-provisioner.tpl file and try to manipulate this and store it as dsiprouter-provisioner.conf

John Diffenderfer

unread,
May 21, 2025, 3:02:03 PMMay 21
to Mack Hendricks, dSIPRouter
Sorry, I forgot you told me that earlier. Doing that now  

John Diffenderfer

unread,
May 21, 2025, 4:04:26 PMMay 21
to Mack Hendricks, dSIPRouter
That works! I can't tell you why I didn't start there when you specifically told me what I needed to do. Lol I guess I just like building servers. 
The solution (My notes):
1 - If  dsiprouter-provisioner.conf does not exist in /etc/nginx/sites-available then copy dsiprouter-provisioner.tpl from /opt/dsiprouter/gui/modules/fusionpbx/ to /etc/nginx/sites-available and rename as dsiprouter-provisioner.conf 
2 - At the top of you new dsiprouter-provisioner.conf  file replace ##SERVERLIST## with server testpbx.yourdomain.com:443; (replace testpbx.yourdomain.com with the name of your FusionPBX server)
3 - Run sudo ln -s /etc/nginx/sites-available/dsiprouter-provisioner.conf /etc/nginx/sites-enabled/dsiprouter-provisioner.conf to enable your  dsiprouter-provisioner.conf 
4. Test for errors by running - nginx -t
4 - systemctl reload nginx
5 - In your DNS records point your FusionPBX domains to the same ip as your DSIPRouter
6 - Start testing provisioning from a web browser ie: https://testpbx01.yourdomain.com/provision/001555a1acc6 (replacing with the domain name for the fusionpbx domain and the mac address of the phone at the end

One question, if I have a Fusionpbx cluster, I assume I put both server names in  dsiprouter-provisioner.conf, correct? Should it look like this server testpbx.yourdomain.com:443; server testpbx2.yourdomain.com:443;


Mack Hendricks

unread,
May 21, 2025, 4:08:32 PMMay 21
to John Diffenderfer, dSIPRouter
It will look like this:

upstream backend {
  server backend1.example.com:443;
  server backend2.example.com:443;
  server backend3.example.com:443;
}


John Diffenderfer

unread,
May 21, 2025, 4:15:09 PMMay 21
to Mack Hendricks, dSIPRouter
Ok last question, when enabling Fusionpbx in Endpoint group do I put both Fusionpbx servers in the server field in a cluster situation?

image.png

John Diffenderfer

unread,
May 22, 2025, 11:20:20 AMMay 22
to dSIPRouter
Good morning Mack,

Just wanted to give you a followup and let you know that I did not have to point all of my fusionpbx domains to the DSIPRouter address. I was able to leave them pointed at the same address as my fusionbx server and I am able to  provision using the dsiprouter address. My issue simply was not having the  dsiprouter-provisioner.conf file created when I enabled fusionpbx in dsiprouter. Everything is working. Testing a fusionpbx cluster next. 

Mack Hendricks

unread,
May 22, 2025, 1:18:28 PMMay 22
to John Diffenderfer, dSIPRouter
Reply all
Reply to author
Forward
0 new messages