Asterisk Trunk Dial Options for announcement playing on inbound and outbound calls

We have a FreePBX V15 PBX where we are using Asterisk Trunk Dial Options to play an announcement using the TtA(custom/outbound message) format.

Our carrier is Bandwidth so we have one trunk defined for both inbound and outbound trunking. The issue is that the announcement plays for both inbound and outbound calls when all we want is outbound calls and the documentation states it controls the outbound handling.

Any thoughts?

We’re going to need to see a trace of the call log (asterisk -rvvvvvvvvvv) because there is no Dial() on incoming calls unless an endpoint is being dialed (a phone/device). Depending on the routing of the call the dial options to be used will change. We need to see how the variables for the trunk dial options are being injected or if it is that and not something else doing it.

Basically we need to see where TtA(custom/outbound message) is being applied on inbound calls to get an idea of what is happening.

Wouldn’t a duplicate trunk, but with registration disabled, work.

We thought about setting up duplicate trunks but Registration is set to None as they use IP authentication. My thought was if I set up duplicate trunk, which trunk would actually receive the call.
My head is going in circles on this one.

BTW, we are using PJSIP for phones and trunks.

Share a call trace of an inbound call that plays an annoucement via pastebin. I can’t think of a configuration where outbound dial options will have any effect on an inbound call.

So we have done a little more testing and found that it happens when we have the inbound route pointing to an extension. If pointing to a ring group or other option, the announcement does not play which correlates with BlazeStudios comment about dial actions.

We will get together a call trace with the call going to an extension so you can see details.

Only the one with the valid match/permit setting.

The Match(Permit) option is blank in our trunk settings so I am not comprehending how this would work since both trunks would be connecting to the same IP address with the carrier.
Please enlighten me if you dont mind.

It’s possible that FreePBX defaults it. In that case, I assume a bogus value would override the default.

Based on the help text, if left blank in FreePBX, the system does default it though not sure what that default is.
Please expand on your thought as my thinking is that if I put a bogus IP value in here, would that prevent communicating with the carrier trunk?

The obvious thing to default it to would be the peer address.

I think match/permit only affects the type=identify section and that is only used for inbound calls. With Asterisk, you could just omit the identify section, or set to match on a non-existent header.

Here is the PasteBin for the inbound call that is routing directly to an extension and is playing the announcement for the Asterisk Trunk Dial Options is set as TtA(custom/Outbound_Call_Message).

Call goes to FMFM for ext 199, which appears to be configured to play the Outbound_Call_Message recording. If so, I would expect ALL calls to ext 199 to hear that message, not just inbound calls.

Argh. Thanks Lorne. I think the engineer was playing with that option before finding the Asterisk Dial Options as a way to get the outbound call message played.

Additionally, we created a second trunk with Bandwidth duplicating all the fields except the Asterisk Dial Options and assigned that trunk for the outbound route needed without the message. All worked fine.

Thanks everyone for the input.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.