Unusual trunk configuration

Discussion in 'General' started by kmullen, Dec 20, 2009.

  1. kmullen

    Joined:
    Dec 11, 2009
    Messages:
    70
    Likes Received:
    0
    Need a little help.

    I want to connect one main Asterisk Server (SIP1) to a SIP trunk provider.
    SIP1 will be connected to the provider through one SIP trunk with "unlimited" channels
    I want to create IAX2 trunks to connect other Customer Asterisk PBX's to SIP1.

    This is being done for billing purposes. I can aggregate my minutes on the provider trunk to get reduced rates.

    I will generate billing off each of the customer trunks on SIP1

    I have connected SIP1 to the provider.
    I have connected two PBX's together using IAX2 trunks. (CST1 <> SIP1)

    I am stumped on how to setup the call routing.

    Call comes into PROV on DID and is routed to SIP trunk on SIP1.
    SIP1 should automatically send call out IAX2 trunk to CST1.

    Extension on CST1 makes outbound call. Call is routed across IAX2 trunk to SIP1 where it is passed to PROV trunk and out PSTN.

    Any assistance would be greatly appreciated.
     
  2. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    if your iax trunks between your sip1 and your servers are in the context=from-internal anything they dial will be like if you had an extension directly connected to your pbx sip1.


    But the easiest option is in your SIP1 pbx to create all your CSTn servers as IAX extensions and not trunk.
    In your CSTn servers, just create a trunk like any other with the extensions credentials that you created.

    Then for routing, your secondary pbx will be seen as simple extension and routing will be easy.
     
  3. kmullen

    Joined:
    Dec 11, 2009
    Messages:
    70
    Likes Received:
    0
    First thank you for replying.

    A couple questions. Assuming the second scenario.

    If I connect the secondary servers as extensions, how will that work if the secondary server has multiple extensions?

    How will it work if multiple extensions are making calls at the same time?
     
  4. Patrick_elx

    Joined:
    Dec 14, 2008
    Messages:
    1,120
    Likes Received:
    0
    simultaneous outbound/inbound calls are not a problem as long as you have enough bandwidth (also prefer an iax trunk instead of a sip one).

    your only issue will be how to route inbound call in your secondary servers. If you want from the main pbx to route to a specific extension in a sub pbx I think the easiest will be to create a trunk/extension pair per sub extension. But if all your inbound calls in a secondary pbx will be treated the same way, I don't see any problem with having only one trunk.
     
  5. kmullen

    Joined:
    Dec 11, 2009
    Messages:
    70
    Likes Received:
    0
    First thanks again for your reply.

    I have calls routing now to the end users pbx, inbound and outbound. However, the following problems remain.

    DID is lost when it passes to the customer PBX, therefore I can't setup routing based on CID.

    CID is lost when it passes to the customer PBX, so it isn't being delivered to end extension.

    Since the customer is connecting to the billing server via Ext/Trunk pairing with an IAX2 extension, A2billing doesn't see it as a billable trunk.

    SIP Provider <SIP Trunk> A2Billing <IAX2EXT/IAX2TRUNK> Customer PBX

    Other possible solutions or fixes?

    What about custom destinations module available in FreePBX? I heard that you can setup Trunk <> Trunk call routing this way?
     

Share This Page