How to use different Outbound CIDs for different outbound routes

Hello good morning,

I have a doubt about that: How I can use different Outbound CIDs for different outbound routes.
It is not as easy as looks like to be, im going to show you an example related with I am triying to do through the FreePBX GUI.
From extensions.conf I know how can I do it but im not sure if I can do it from FreePBX GUI directly.

Example:
I have two groups:

  • Systems: It belongs the extensions 1001,1002 and 1003
  • Purchases: It belongs the extensions 2001,2002 and 2003

I have two PRI gateways:

  • CISCO 2811, which connects to a PRI line (fixed) --> PRINCIPAL NUMBER 976000000
  • CISCO 2801, which connects to a PRI line (mobile) --> PRINCIPAL NUMBER 600000000

I have two DID (fixed PRI line) associated to both groups:

  • Systems DID --> 976100000
  • Purchases DID --> 976200000

I have two ring groups associated to the groups and to the DID:

  • Systems Ring Group --> 1000
  • Purchases Ring Group --> 2000

What I want to do?
Assuming that I am extension 1001:

  • If I do a call through PRI fixed I want to show this CID: 976100000
  • If I do a call through PRI mobile I want to show this CID: 600000000 + 1000

I only can use one mask for outbound CID and one mask for CID Num Alias. Anyone know if I can do what I want using only FreePBX GUI? Or I will need to modify extensions_custom.conf?

Regards and thanks by all

I should say that the only thing that I can do is something similar to this:

http://wiki.freepbx.org/display/FPG/Customize+outgoing+caller+name+and+caller+ID

[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(CUSTOM: callednumber is ${OUTNUM})
exten => s,n,NoOp(CUSTOM: Trunk ${OUT_${DIAL_TRUNK}} selected)
exten => s,n,NoOp(CUSTOM: calleridall is ${CALLERID(all)})
exten => s,n,NoOp(CUSTOM: calleridnumber is ${CALLERID(num)})

And play with the variables.

If anybody knows if I can emulate this behaviour using the FreePBX GUI say me please, if not I will use macro-dialout-trunk-predial-hook

Set up separate trunks to each of the gateways and set caller ID for each trunk. Then set the outbound routes to use the appropriate trunks.

Make two outbound routes, one with dial pattern for fixed line and one for mobiles. In each outbound route set the route cid to be the one that you want. Finally put these two new routes above the rest that you have.