Lets talk multi-tenant

Discussion in '3CX Phone System - General' started by netswork, Feb 29, 2012.

Thread Status:
Not open for further replies.
  1. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    I have a few questions for anyone using the multi-tenant setup, mainly how to get dialtone to each tenant.

    If you have a SIP trunk provider how are you trunking each tenant to the provider? Are you giving your server multiple IP addresses?

    Is there a way to bring in a digital trunk like a PRI into a device and have it shared by multiple PBX's? I would like to host the customers systems in our data center and provide dial tone via PRI's. Just not sure if there is a device out there that will allow for multiple registrations.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,375
    Likes Received:
    231
    My understanding is that each client, is completely separate right down to the port range used for each.
    It depends a lot on what sort of PRI service you purchase from a provider. Did you plan on purchasing a PRI with a range, of say 100 DID, numbers, and then dividing them up amongst multiple customers?
    In most cases (I'm assuming), each customer would have their own PRI (single or multiple T1's), their own numbers, going to one ISDN Gateway device, so one per customer.

    That way the contract with the phone company/provider would be in their name. If they went out of business, or otherwise defaulted, before the contract expired, then it would be between them and the provider. You would just be the inter-connector, and not on the hook for any amount still owed.
     
  3. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    My goal was to oversubscribe the PRI since here they only come in 12 or 24 channels.

    Is there a device that will terminate multiple PRI's and allow me to connect it to multiple PBX's? It would be expensive to have to buy a separate patton for each customer.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. leejor

    leejor Well-Known Member

    Joined:
    Jan 22, 2008
    Messages:
    10,375
    Likes Received:
    231
    I'm sure that there are ISDN gateways that will take multiple T1/E1's. What you want is one that can handle more than one trunk group, multiple D channels (and not just the second, back-up, D channel).
     
  5. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    There are pattons that will take multiple PRI trunks, But I dont think you can register a single patton to multiple 3cx systems.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. new29

    Joined:
    Apr 12, 2012
    Messages:
    11
    Likes Received:
    0
    I know this is a little late, but we've done this in a lab recently. We're using a Cisco gateway (theoretically a Patton would work the same way) and installed Kamailio to handle the registrations. This way you can scale a single gateway (or a cluster of them) to support any number of 3cx instances. Works flawlessly.
     
  7. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Very cool. I had never heard of that kamailio software. I will check that out.

    Do you mind sharing your cisco gateway configuration that you were able to get working with 3cx?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  8. new29

    Joined:
    Apr 12, 2012
    Messages:
    11
    Likes Received:
    0
    Yes, I believe if you want to do multi-tenant right, you should use a SIP proxy to pass the calls between the 3cx and the gateway. My Cisco config is still in "lab mode" and is subject to change. I may not need one of those dial-peers as I think an extra one got inserted when playing around and the PRI needs to be cleaned up. Here are the relative snippets of my Cisco config:

    controller T1 1/0
    framing esf
    linecode b8zs
    cablelength short 133
    pri-group timeslots 1-24
    !
    interface Serial1/0:23
    no ip address
    encapsulation hdlc
    isdn switch-type primary-ni
    isdn incoming-voice voice
    isdn guard-timer 3000
    isdn supp-service name calling
    isdn outgoing ie facility
    isdn outgoing ie caller-number
    isdn outgoing ie called-number
    fair-queue 64 256 0
    no cdp enable
    !
    voice-port 1/0:23
    no vad
    bearer-cap Speech
    !
    dial-peer voice 1 pots
    description Incoming from PSTN
    preference 10
    incoming called-number .T
    direct-inward-dial
    port 1/0:23
    !
    dial-peer voice 100 voip
    description Outgoing To SIP Proxy
    huntstop
    preference 1
    max-conn 23
    destination-pattern .T
    voice-class codec 10
    session protocol sipv2
    session target ipv4:x.x.x.x <------Kamailio Proxy IP
    session transport udp
    dtmf-relay rtp-nte
    no vad
    !
    dial-peer voice 101 voip
    description Outgoing To Cisco
    huntstop
    preference 10
    max-conn 23
    destination-pattern .T
    voice-class codec 10
    session protocol sipv2
    session target ipv4:x.x.x.x <-----------Kamailio IP
    session transport udp
    dtmf-relay rtp-nte
    no vad
    !
    dial-peer voice 200 pots
    description Outgoing to PSTN
    destination-pattern .T
    port 1/0:23
    !
     
  9. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Thank you very much for that.

    On the proxy do you direct inbound calls based on what number was dialed and point it to the 3cx server you want that number to ring on?

    How do you configure 3cx to interact with the proxy?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. new29

    Joined:
    Apr 12, 2012
    Messages:
    11
    Likes Received:
    0
    The kamailio server acts as a router for 3cx and passes the call from PSTN gateway to the correct 3CX instance. 3CX is configured to connect to kamailio via SIP trunk authentication.
     
  11. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    Is there any documentation out there on setting up the trunk inside 3cx to kamailio?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  12. new29

    Joined:
    Apr 12, 2012
    Messages:
    11
    Likes Received:
    0
    We set it up using the 'generic SIP trunk' option when setting us the trunking in the 3cx. We then use the settings that correspond with the configuration of Kamailio. There are so many options in Kamailio that you'd need to really set that up first and then configure 3cx to match Kamailio. For example, you can have your DID be the sip trunk username or you can bind it to another username. You'd need to know that prior to setting up 3cx.
     
  13. netswork

    netswork Active Member

    Joined:
    Mar 11, 2011
    Messages:
    577
    Likes Received:
    1
    With kamailio how are you routing the calls? Destination caller id?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.