Outbound CID after transfer

Hi,

We have a number of areas of our company, all using one FreePBX install. Each company area has their own inbound (and outbound) CID.
Our provider requires us to send a CID for outbound calls, and it must be one we own.
We only have one trunk setup, all the calls go out of this trunk with different CID’s depending on where the call came from.

The issue we are having is when a member of staff transfers a call externally, or uses an auto-forward feature on a phone. This is sending the caller id of the inbound caller as the outbound CID.

We have tried using the “block foreign caller id” feature on the trunk, however this just sends the trunk CID to the provider, so it looks like all the calls affected are sent from this one CID.

What we would like to do is send the CID of the person who forwarded the call. For example, if someone in Department A has auto-forwarding setup on their phone, receives an external call, the forwarded call should have the CID of Department A set.

Any ideas / suggestions would be most appreciated.

Tom

you should look into customizing

[macro-dialout-trunk-predial-hook]

you will need to build your logic and derive your new ${CALLERID(num)} from the channel variables to suit.

From asterisk’s extensions.conf

;-------------------------------------------------------------------------------
; macro-dialout-trunk-predial-hook:
;
; this macro intentionally left blank so it may be safely overwritten for any custom
; requirements that an installation may have.
;
; the macro is called by macro-dialout-trunk just prior to making a Dial() attempt
; to a trunk.
;
; MACRO RETURN CODE: ${PREDIAL_HOOK_RET}
; if set to “BYPASS” then this trunk will be skipped
;
;
[macro-dialout-trunk-predial-hook]
exten => s,1,MacroExit()

For a bit of a how-to:-

http://www.freepbx.org/support/documentation/howtos/how-to-give-a-particular-extension-different-or-restricted-trunk-access

season to suit

Hi,

Many thanks for your reply. Looks like I have lots of reading to do!

I’m surprised this isn’t more standard as passing an external CID onto a call transferred externally seems wrong, and looks to be against the T’s and C’s of most providers who allow CID passing - certainly here in the UK I’ve checked with a few.

Thanks again.

Tom