I need to be able to define an extensions outbound caller ID dependant on whic outbound route they use. Basically one will show the user specific name, the other will show the department/group.
I munge it the other way, not sure if solution would be similar. For inbound, i set a few this way:
[from-pstn-preprocess]
exten => _X./1112223333,1,Set(CALLERID(name)=NewNameHere)
exten => _.,1,NoOp(Entering user defined context from-pstn-preprocess in extensions_custom.conf) ; Catch all other cases
exten => _.,n,goto(from-pstn,${EXTEN},1)
You can include a name in the Route CID e.g. âJohn Doeâ <14162345678> and set Override Extension. With proper trunk configuration, that name will be sent to the VoSP. However, in most countries (Canada is an exception) it wonât do you any good, because the receiving partyâs carrier will look up the name in a database. In the US, for example, you will need to send a different number for the department, and set âCNAM storageâ with the desired name on your providerâs portal.
In addition, most mobile phones will use the name from local Contacts, if the calling number matches one, overriding any name you or the carrier sends.
Iâm not completely clear on this. I have two outbound trunks, one to provider and one to another on-site old analog PBX. I can only define one CID (Outbound CID) per extension. For each extension I need two defined CID.
Most of the CID I send to my provider is what getâs displayed. Iâm working with them now to find out how all of those lines are defined.
Unless Iâm completely missing something obvious here
What @Stewart1is telling you is the only thing you can guarantee that will go through the PSTN is the CID number. Nothing else you set on your side matters. You can set a CID name to send, but you need to have little expectation of it reaching the other side.
Please be more specific:
If each extension has a unique personal number and a shared department number:
Ext. 101 can send A or D
Ext. 102 can send B or D
Ext. 103 can send C or D
then set Outbound CID to A, B, and C, and set the âdepartmentâ Outbound Route with Route CID set to D.
If each extension also has its own department number:
Ext. 101 can send A or D
Ext. 102 can send B or E
Ext. 103 can send C or F
then if you have only a few extensions, set up a separate department route for each.
If you have many extensions, each with two unique numbers, youâll need to write a dial plan hook for that.
Understood. The FreePBX box is routing to a Vega gateway which routes it to an old analog PBX I own. It comes into that system as if itâs coming from the provider, it should show whatever I send it.
There would be cases with different department external numbers, so the âD,E,Fâ example plan would be needed. Are you suggesting I would have to setup multiple routes?
I donât mind creating multiple entries in extensions_custom.conf, I just need some examples to go by. Or at least get pointed to the right docs.
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.
Please explain the overall setup better. Normally, the 5xx route would be marked Intra-Company, so those calls would send the extensionâs Display Name and extension number as caller ID. External calls (using routes not marked Intra-Company) would send the Outbound CID name and number. If that wonât work for your system, provide details.
Iâm not sure what other details you want or need. The route used is marked intra-company, but Iâve tried changing that. With intra-company, the analog phone attached to the legacy PBX only shows the internal extension. When I look at the logs on the Vega I only see a reference to the DID thatâs being dialed (dest=NAME:501,TEL:501). I either donât have the correct debug cmmand entered, or itâs getting that internal extension some other way.