How to make a call coming in on a specific DID show on the phone differently

We are setting up a FreePBX system using the latest build and Grandstream GXP2170 phones. We have two companies and we have to answer the phone differently depending on which DID the call comes in on. 95% of all calls will be for company A. Also we want to be able to call out on the correct DID depending on what company we are calling from. This was easy with our old analog system. We pressed the line number on our phone system corresponding to the company we calling from. How can I make this work with FreePBX? I think I can make the ring different depending on the DID this call is coming in on, but how do I make if so I can visually see on the phone where the call is coming from? Also how can I choose which DID a call is initiated from? I can create separate trunks for each company is that makes things easier.

Thanks you for all your help,

Register two extensions per phone, GXP2170 support this. From the web interface of the phones configure different ringtone for each extension. For example company A are the extensions from 101 to 109. Company B are the extensions from 201 to 209. Create two ring groups, in the first one put every extension of company A and in the second one every extension of company B. Create two inbound routes with different DID and set as destination the ring group with the phones of each company. Finally create two outbound routes, in the first one set as route cid the DID of company A, add in the prefix field the number 9 and in the dial pattern one dot ( . ), in the second outbound route add as route cid the DID of company B, in the prefix field put number 8 and in the dial pattern again one dot.

Now you can receive calls in the two different groups and can dialout using 9 or 8 as a prefix to choose which number will be shown to your clients.

Thank you so much for your assistance. I was hoping that there would be an easier solution, but this is certainly doable.

Other way to do this.

You can create the “inbound routes” per DID number (as you probably already know how).
you also can use “CID Name Prefix” which you can set to “Company-A:” in one route “Company-B:” in another and so on.

When call comes in, the phone will display “Company-A:” this way operator will know which company the call belongs to.

you can also use “Alert Info” which can make the phone to ring different tone based on which alert-info comes in.
I can elaborate on that a bit more if you want this and your Grandstreams support Alert-Info ringtones. We use snome 320 sets which do support this.

If not the above described prefix is method works with all phones.

As for calls going out from a proper DID, it can be done by dialing a prefix when dialing a number.
This is pretty easy to do. by configuring an “Outbound Route” per DID. For example if operator dials *5 followed by number, you can have a route which will grab that call, strip the *5, sets outbound CID to whatever it needs to be and sends the call out either on the same trunk, or different trunk depending on how you set that up. You need to check the available prefixes against the PBX feature codes to make sure that does not interfere, but you can always find a group of numbers that you can use.

If you do not do the alert-info, everything can be done by configuring just free-pbx and you do not even need to touch the phone-set. If you want to use alert-info, you will need to enter it in the phone setting and set it to ring a unique tone. I use it, because the operator does not even need to look at the phone once they remember the ring tones.

The above seems like a lot of reading, but it is actually will take you 10 minutes to setup for 2-3 companies, without needing to mess with the phones (unless you use alert-info as well as)

Much appreciated kgbeast, that worked great.