Macro - dialout-trunk

Hi,

I want to generate a ringing tone to specific trunk (the “r” option). Can I do it with FreePBX ‘Macro(dialout-trunk…)’?

I’ve searched for how this works, but I could not find if I can pass some options to the macro like so:

exten => _3XX,4,Macro(dialout-trunk,1,${EXTEN},r)

Is there any way to achive this?

nope,

you can use the pre-dial hook that is in there to check if it is the trunk of interest and add the option though.

Just keep in mind that adding the ‘r’ option can be detrimental in some circumstances if this is a digital line and there is any chance of calling numbers that may deliver early media as the early media will not be presented, just ringing.

Ok, great, just as long as there is a solution.

We have a digital line - and it needs a ring to be passed to it…

I’ve already made a temporary solution of making a copy of dialout-trunk macro, and hardcoded the “r” option in it. But its a messy solution.

Example:

[macro-dialout-trunk-with-r]

exten => s,n(nomax),GotoIf($["${INTRACOMPANYROUTE}" = “YES”]?skipoutcid)
exten => s,n,Set(DIAL_TRUNK_OPTIONS=r)

exten => _3XX,4,Macro(dialout-trunk-with-r,1,${EXTEN},)