Informing the caller which outbound trunk is being used

Can anyone give me some tips on how I might be able to inform the caller which outbound Trunk is being used to place the call.

I have set up asterisk so that the default trunk for most calls will be a Bluetooth attached mobile phone, with a cheap inclusive calls tariff, but the secondary trunk is a PSTN line attached to an SPA3102.

I would like a message to be played to indicate which of the 2 trunks is being used, so that if it is the PSTN line, the caller knows that it’s likely to be a more expensive call (especially if it’s a call to a mobile phone as many calls are these days). I might even be tempted to have an option to “press 1 to continue” if it’s a PSTN call.

Regards,
Dave.

http://www.freepbx.org/forum/freepbx/users/question-how-to-play-warning-message-on-certain-outbound-destinations

The final posts in that thread gave me all the clues I needed to get this working.

In case anyone arrives at this thread, this is what I added to extensions_override_freepbx.conf:

[macro-dialout-trunk-predial-hook]

exten => s,1,NoOp(Trunk ${OUT_${DIAL_TRUNK}} selected)
exten => s,n,Gotoif($["${OUT_${DIAL_TRUNK}:0:10}" != “SIP/1-pstn”]?skip)
exten => s,n,NoOp(Playing Progress Announcement)
exten => s,n,Playback(pls-hold-while-try)
exten => s,n,MacroExit()
exten => s,n(skip),Playback(one-moment-please)
exten => s,n,MacroExit()

I just need to record a couple of more relevant messages to playback, but the above code does exactly what I wanted.

Regards,
Dave.