Outbound CID based on Extension?

Here’s what I have…

I live in an area in the USA where no local DID’s are available. I have installed pstn lines for incoming calls (local numbers!), and a SIP provider for my outbound calling. It works fine for me this way.

My office building has 3 different businesses in it. Each has it’s own local number coming into * and routed to thier extensions. I need when they place a call, the Outbound CID be set to their PSTN, not the VIOP #.

Can I do this in *, and do I need something special from my voip provider?

It depends on the voip provider. Some allow you to set the CID and some dont. I know that teliax.com and voipjet.com allow you to. To set the CID you should spilt thier outbound dialing by context so you can set the CID based on who is calling. What I have is

Exten => _X,1,Setcallerid(8005551212) ; This sets the caller ID to 800551212
Exten => _X,2,Dial(SIP/${EXTEN}@teliax)