The Vega pretty much just decides where the call goes, it’s configured to send CID if it gets it.
I have 2 outgoing routes that along with dial plans on the Vega send certain 3 digit destinations to the legacy PBX and most other 7 or 10 digit numbers out to the provider. All of the call routing works fine. it’s just the CID I need to tweak.
So for example, I have it set that when extension 101 dials 501, that matches the outgoing route that sends it to the Vega. The Vega knows that if it gets a 5xx call coming in from the FreePBX to route it to the legacy PBX. The legacy PBX sees that 501 as a DID coming in from the provider and will route that to the corresponding extension on the legacy PBX, along with whatever caller ID is sent.
For 7/10 digit calls they will use a differently defined outbound route that still goes to the Vega that will route it to the provider.
Both routes have “Route CID” undefined and “Override extension” set to “no”. All extensions have “Outbound CID” set to something like ‘“name” <1112223333>’.
Currently some outbound (to provider) calls get their CID overwritten from the provider, some don’t. I’m working with the provider on that issue. In the meantime I have set the extension defined CID to the least specific CID (like department name and external group number) so that there isn’t any data leakage of user names to external calls routed through my provider.
…and that’s why I would like to have a seperate CID for each extension depending on which outbound route gets used. I thought there might be a way to define in the dial plan to use defined CID if destination outbound route is “Legacy PBX”, else set CID to “FOO” if outbound route is provider.