How Tenant work when multiples trunks to same remote sip server

VitalPBX Community Support General Discussion How Tenant work when multiples trunks to same remote sip server

Up
0
Down
  • Post
    vitorcosta
    Participant

    I have some tenants in on Vital server, each tenant have a diferent number and account on same sip server (telephony company), so remote host is same.

    When a inbound call come Vital always select same Tenant no matter if come from other tenant trunk.

    Lets sai i have 2 trunks: TA (NumberA) and TB (NumberB), both registered on same sip host, (sip.remote.com).

    If i dial from my cell phone NumberA call go to TA, and if i dial NumberB call go to TA too.

     

     

     

     

    0
Viewing 9 replies - 1 through 9 (of 9 total)
  • Replies

    The behavior you are describing is normal, especially for trunks that use insecure=port,invite(or insecure=invite). When a SIP call comes into Asterisk, it makes several evaluations. One of the first evaluations is whether the call is coming from a valid Trunk. It does this by comparing the IP address where the call is coming from with the host=IP addresses of the Trunks you have set-up. Ordinarily, it would also ensure that the originating port and the username and password are correct as well. However, if you have insecure=port, invite set in a trunk, then Asterisk makes no effort to match the username/password/port on incoming calls. Rather, as long as the host matches, then Asterisk accepts the call as coming in on that trunk. Trunks are compared in alphanumeric order, so if you have several trunks set up to the same host, every incoming call will match to the trunk with the lowest alphanumic name, i.e. 1111 before 2222, and aaaa before bbbb. If the call matches ANY of your trunks, that’s good enough for Asterisk, and it moves the call on to the next level of processing, which is to compare the DID sent with the call with your inbound routes. It appears to process then in alphanumeric order, so whichever Trunk matches first will end up listed in the CDR.

    0
    vitorcosta
    Participant

    So whats your recomendation to ajust trunks to work as needed ?

    0

    I am just explaining why is this happening. We are working to find a solution for this kind of environment

    0
    vitorcosta
    Participant

    I fix arround this way:

    –  set a trunk to target external sip host on root Tenant (out side tenant)

    – create a trunk type tenant from root to desired tenant

    – create a inbound route on root sending to tenent trunk based on did

    Seens all all work as Vital check root trunk ips before go to tenant trunks

    A little anoying but ok.

    Maybe u guys can just create a did global rule for each trunk create in tenant, and using it to send to correct tenant and not use remote ip for it

     

     

    0

    We just released a new update of VitalPBX to fix this issue and others. Check more about it in the link below on “Release 2” section.

    https://vitalpbx.org/en/vitalpbx-2-3-4/

    0
    vitorcosta
    Participant

    Great work. I will Test it soon

    0
    vitorcosta
    Participant

    Upgraded…tested…and seens dont work..

     

    I just deleted inbound rule outside tenant and  get no route error. Root pabx have a trunk to same server as tenant…maybe only work if tenants only have trunks to remote server…

    0

    This how it works:

    Suppose you have two trunks with Telnyx, one for the main tenant, and the second one for the additional tenant.

    In both tenants, you must create their respective trunks with its credentials.

    After this, you must define in the  inbound routes its respective DID Number(s) on each tenant.

    For example:

    • 12345678 (On Main Tenant)
    • 98765321 (On Secondary Tenant)
    0
    vitorcosta
    Participant

    Worked Like a charm! Thx a lot

    0
Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.