SOLVED Providing SIP Trunks via a fusionPBX Server

Status
Not open for further replies.

DownUnder

New Member
Jan 29, 2018
24
0
1
43
We have started using a multi-tenanted instance of FusionPBX for providing separate customer hosted PBX's and it is working well. We have a requirement to provide SIP trunks to customers that already have their own on-premise PBX's. What is the best way to achieve this with Fusion?

We can set up the customer's trunk up as an extension on our fusionPBX instance, however, we need to pass on the called DID to the customer. When it is set up this way the customer only sees their extension number as the dialled number rather than the original DiD.

e.g.
A Call comes in on a Gateway to DID 8888888888
FusionPBX routes the call to the extension 1111 that goes to the customers on-premise PBX
The customers PBX does not see any reference to the original DID in the SIP headers to be able to route the call

Any suggestions would be appreciated
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
I would avaoid this if I were you and use a proper billing server to provide the trunks. Though you can get it to work FusionPBX is a little overkill for it, or another way to describe it may be slow :)
 

DownUnder

New Member
Jan 29, 2018
24
0
1
43
@DigitalDaz When you say a proper billing server, do you something like a straight FreeSWITCH box without all the extras?

If we were to use FusionPBX and set them up as a gateway, is there a way to set up a gateway so that it requires authentication from the external party?
 

DownUnder

New Member
Jan 29, 2018
24
0
1
43
ASTPP looks interesting, however, we have the billing and customer portal side sorted already.

Do you know if there is a way to set up a gateway that would require the external party to authenticate?
 

DownUnder

New Member
Jan 29, 2018
24
0
1
43
That is what I tried initially, but then they don't seem to get any record of the dialled DiD for them to route calls on their side.

e.g.
A Call comes in on a Gateway to DID 8888888888
FusionPBX routes the call to the extension 1111 that goes to the customers on-premise PBX
The customers PBX does not see any reference to the original DID in the SIP headers to be able to route the call
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
That is what I tried initially, but then they don't seem to get any record of the dialled DiD for them to route calls on their side.

We have a magic formula for that, I'll see if I can dig it out for you :D
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
If you edit the dialplan destination, replace the action with something similar to the following, you need to click the arrow thingy to the right to allow you to enter text.:

Code:
bridge:sofia/internal/sip:$1${regex(${sofia_contact(yourextensionnumber@yourdomain)}|^[^@]+(.*)|%1)}

destination.jpg
 

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Love your work I will give it a try today

I can't take credit for that, there were two sources, a guy called gr8liquor and mcrane. Mcrane iced the cake too by pointing out that it could be done in the destinations.
 
Last edited:

ppwicho

New Member
Apr 19, 2018
5
0
1
36
Mexico
If you edit the dialplan destination, replace the action with something similar to the following, you need to click the arrow thingy to the right to allow you to enter text.:

Code:
bridge:sofia/internal/sip:$1${regex(${sofia_contact(yourextensionnumber@yourdomain)}|^[^@]+(.*)|%1)}

View attachment 328

This should be pinned to the top! Thanks !!!.
 

ad5ou

Active Member
Jun 12, 2018
884
196
43
Just to add to this handy post... On the newer versions with the "bridges" menu, you can save yourself a few keystrokes or mouse clicks.

Apps>Bridges> add a new bridge statement for each "sip trunk" (extension)
Name: (any name to easily identify it)
Destination: sofia/internal/sip:$1${regex(${sofia_contact(yourextensionnumber@yourdomain)}|^[^@]+(.*)|%1)}
Enabled: True
and save.

Now when creating a new destination for additional DID's to same trunk, the bridge name from above will be listed in drop down menu.
 
  • Like
Reactions: mat1010

Driods

New Member
May 26, 2019
1
2
1
52
If you edit the dialplan destination, replace the action with something similar to the following, you need to click the arrow thingy to the right to allow you to enter text.:

Code:
bridge:sofia/internal/sip:$1${regex(${sofia_contact(yourextensionnumber@yourdomain)}|^[^@]+(.*)|%1)}

View attachment 328
Thank You, Thank You DigitalDaz for the solution that worked perfectly the first time and Thank You DownUnder for posting the question.
 
Status
Not open for further replies.