FreePBX version 22.214.171.124, asterisk version 16.17.0
I have multiple DIDs at voip.ms with most of the complexity also hosted there
including IVR and voicemail. My goal is to implement some old style distinctive
ringing where call comes in at single DID, IVR says “press 1 for Dick, press 2 for Jane”
then invokes some ring groups that include separate extensions for Dick & Jane
at an on-prem server. Those extensions actually ring the same analog phones
by DAHDI/3r2 or DAHDI/3r3.
I can set up 2 trunks using subaccounts and route the calls fine. As numerous
other posters have reported, all the inbound traffic ends up the first trunk and with
same DID, even if I register the trunks to different ports (1 on 5060, 2 on alternate 42872).
So I cannot distinguish the calls; the DID is the same and if I had a custom context on
trunk #2 it is never invoked (i.e. simply rewrite DID with something unique).
What does work is putting one trunk on chan_sip and one on chan_pjsip.
And it works fine if I register each to different POPs (with some kludgy forwarding
to virtual DID to get calls routed between POPs). That ends up sending a different
DID which I can use directly.
Why am I doing it this way? The overall system is much more complex as Dick & Jane
travel between multiple locations and their calls need to ring several places… Some of
those places have newer multi-line IP phones that each register separately (to voip.ms)
so don’t have this problem, but one location they want to keep their old analog phones.
Is there a better way, ideally using chan_pjsip with both trunks to same POP.?