TIPS Multi-tenant XiVO + GVoice

amygrant

Guru
Joined
Apr 4, 2010
Messages
132
Reaction score
3
Due to the great work done by others integrating gvoice into xivo,I started playing around with a multi-tenant xivo setup.

I love the "entities" aspect of xivo. It is very intuitive and works great for tenancy. Out of the box, the piaf xivo iso lets me get up and running with a multi-tenant setup involving trunks from sip providers such as vitelity.

I then started adding some backup googlevoice trunks which went off pretty easy but ran into a problem with inbound calls.

The script add-gvtrunk to add a googlevoice number adds code to /etc/asterisk/extensions_extra.d/gv.conf:
Code:
exten = s,1,Set(XIVO_CALLOPTIONS=r)
same  =  n,Return()

;# // BEGIN gvusername
[from_gvusername]
exten = s,1,NoOp()
same  =  n,Set(GV_DID=*10DIGITS*)
same  =  n,Set(crazygooglecid=${CALLERID(name)})
same  =  n,Set(stripcrazysuffix=${CUT(crazygooglecid,@,1)})
same  =  n,Set(CALLERID(all)=${stripcrazysuffix:2})
same  =  n,Wait(1)
same  =  n,Answer()
same  =  n,SendDTMF(1)
same  =  n,Goto(from-extern,${GV_DID},1)
;# // END gvusername

The problem comes from the "from-extern" name for the default context which is automatically generated inside the line "same = n,Goto(from-extern,${GV_DID},1)".

All you have to do is manually modify the context name to match whatever you are using for the relevant tenant entity and it works swimmingly!

Not sure if this will help anyone but I figured I would add my problem/solution I had in case someone experiences the same.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,168
Reaction score
5,199
Thanks, @amygrant. You're ahead of me. Haven't played with entities yet. What should from-extern be in the multi-tenant situation? I take it that the Incalls context has a unique name for each entity. Yes?

Could you not create an IncrediblePBX2 entity, then add the unique incoming context for the second entity, and then modify original from-extern context like this:

CrdWO15XEAA50sN.jpg
 
Last edited:

amygrant

Guru
Joined
Apr 4, 2010
Messages
132
Reaction score
3
Yup, you are on the right track. Make a new entity for each tenant: IncrediblePBX2, IncrediblePBX3, IncrediblePBX4, and so on.

For each entity you need to create a new set of contexts for incalls, outcalls, default.

I am using a naming convention that prepends the entity name with an underscore:
incrediblepbx2_from-intern, incrediblepbx3_from-intern, incrediblepbx4_from-intern, etc
incrediblepbx2_to-extern, incrediblepbx3_to-extern, incrediblepbx4_to-extern, etc
incrediblepbx2_default, incrediblepbx3_default, incrediblepbx4_default, etc

You set up your inbound and outbound routing accordingly.

When you make a new line, you give it a context of entityname_default. The context here is what jails the user to only be able to dial other lines with the same extension (or any dialing patterns in applicable outbound routes).

I've got 5 gvoice accounts on one XiVO and each has a separate entity and so far the system is working great.

I haven't deployed ring groups or IVRs yet but I don't think either of these should break anything since all the routing is just in dialing plans.

Tomorrow I will add those components to make sure they work. So far, I am loving XiVO. Great software! So modular!

I am terrible at explaining things so hopefully all the above makes sense. If not, please let me know and I'll try again and maybe do some screenshots.
 
Last edited by a moderator:

kyle95wm

Phone Genius Owner
Joined
Apr 16, 2016
Messages
520
Reaction score
90
Can someone please clarify what needs to be done?

Take an example:

I have two "customers"

-customer A
-customer B

Let's assume that we already created our two Entities for Customer A and Customer B

What needs to be done as far as contexts go?

When @wardmundy said to "mimic" the default context, what exactly did he mean?

I made a newer thread that hasn't gotten any answers over there yet.
 

Members online

No members online now.

Forum statistics

Threads
25,778
Messages
167,504
Members
19,198
Latest member
serhii
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top