I’m still testing things and have managed to get nearly everything sorted but in testing outbound calls I see that all calls are going out through a single trunk.
I have 2 trunks from 1 provider both using IP . Main trunk has a user of 1234 and tenant trunk has a user of 7890. Both trunks are set up in Main and there is a Tenant trunk to Tenant2 (T2_).
I created the outbound profile in class of service and put that in Tenant setting.
When I look at the trunk provider SNGREP (Magnus Billing), I see that a call from a user on T2_ is sending as
SIP/AU-8-DIGIT-LOCAL-0000000b answered SIP/1234-0000000a
whereas is should be sending as
SIP/AU-8-DIGIT-LOCAL-0000000b answered SIP/7890-0000000a
If I understood correctly, you are using IP auth, correct? If so, are you using the same IP/port for both Trunks?
If so, then that’s your mistake. You cannot setup multiple Trunks to the same IP/port from the same machine that it’s source is also the same IP/port.
First, I’d like to point out, that you should be using PJSIP instead of [Chan_]SIP. Once you switch to PJSIP, remember to set PJSIP to 5060.
Second, once you use PJSIP, you can try setting up custom PJSIP Transports with a different listening port for each Trunk. I have never tested this, but it may work.
Third, SIP auth (user/pass) would allow you to setup multiple trunks with the same IP/port. However, most vendors dislike it
PJSIP is SIP (not to confuse with Chan_SIP), PJSIP will work with anything that meets the standard RFC rules, there isn’t really anything that the gateway/carrier has to support in order for it to work.
Yeah I thought about that after I left the office. The trunks are set up as PJSIP and register and work… I don’t know if I can change the port at the Magnus Billing side so I may have to register with User/Pass.
How are your calls outbound routed? Do you have the primary trunk as the first route? If so, and its not busy, it wil use the first available route.
I use pjsip for extensions but SIP for my provider as per their recomendations.
I hope this helps.
Calls are routed from tenant trunks to main tenant with trunks for each tenant terminating on the main tenant.
What you are saying sounds like least cost routing for a single tenant.
What I am trying to achieve is each tenant dials out it’s own trunk ONLY as that comes from my billing C5 switch.
How are calls routed from Tenants to server to sip provider? The should be routed through their trunk only. If you have multiple tenants and they each have their own trunks, then thats the tunk they chould be routed through to get accurate billing usage.
Is that not correct or am I off base? I am not a VoIP genieus but that scenario makes sense to me.