Modify source CID outgoing specific trunk

Hi All,
I have an outbound route set as intracompany so that it forwards the extension number of the dialing party but I need to prepend it with a six digit code so that it hits the SIP provider with the code followed by the extension. So if a user dialing from extension 2579 for example when it leaves the trunk it needs to go like xxxxxx2579 instead of just 2579. How can I accomplish this? Thanks in advance for any advice or assistance.

something like this would work

these are relevant options on the callerid reception and transmission
trustrpid = yes
sendrpid = yes

Thanks!! Where would I add that?

The first before the calls to Dial() that send traffic down that trunk.

The second in sip.conf (but note that these depend on details of how the service expects to receive caller ID.

what file is that in though? extensions_custom.conf?

You didn’t say you were using FreePBX. That explains why you even had to ask those questions, but also means that you have to take into account the FreePBX provided dialplan, so you should transfer this question to the where people may know if and how do do this on FreePBX.

In pure Asterisk terms, the answer is in the appropriate one of extensions.conf and the transitve closure of the all the files included from it, the precise location depends on the details of the dialplan. The basic Asterisk configuration has no included files. With FreePBX some of those files cannot be safely modified, and it is conceivable that your requirement would require changing one of those, although I think there are ways for user customisation of the caller ID.

1 Like

Thanks David. I really appreciate you taking the time to explain. I’ve already sort of asked there with not much help. I apologize…I thought since it’s using Asterisk I’d try here too.