How to make outbound route that allows ***XX dial pattern?

My provider supports a special dial code of ***89, ***88, etc.
In FreePBX outbound route I have tried putting in ***XX, …XX, none of those will let the call through. Whenever phone tries to dial it, the PBX rejects call with “NO ANSWER” response code. The phones have their dial plan configured successfully to allow calls to ***XX destination but the PBX won’t pass on the ***XX call to the SIP trunk. How to make the outbound route to allow this type of pattern?

On my system, * works fine in Outbound Routes. Paste the Asterisk log for a failed call at and post the link here. If the log contains
Called PJSIP/***[email protected]
then paste the log with pjsip logger turned on so we can see the provider’s response.

Another thought: possibly a conflict with ** (default for Directed Call Pickup)?

directed call pickup prefix is **
I’m trying to achieve ***XX
I’ll post logs shortly…

You could set up the Route so (for example) user dials 00089 and it sends ***89 to trunk.

Having a no answer means something happened. As requested, we need a debug.

Lol it turns out it was a conflict with directed pickup even though the prefix is **XX and I called ***XX

5980	[2022-09-10 14:27:42] NOTICE[19781][C-00000028] app_directed_pickup.c: No target channel found for *[email protected]	
5981	[2022-09-10 14:27:42] NOTICE[19781][C-00000028] app_directed_pickup.c: No target channel found for *[email protected]

So how would I set the outbound route so that when 000XX is dialed it transforms it to ***XX and sends it off to the trunk?

I figured it out.
Set outbound route:
Prepend: ***
Prefix: 000
match pattern: XX

Thanks guys.

Because there is a catchall in app-pickup and the . is a catchall so it catches ***98

exten => _**.,1,Macro(user-callerid,)
exten => _**.,n,Set(PICKUP_EXTEN=${AMPUSER})
exten => _**.,n,Pickup(${EXTEN:2}&${EXTEN:2}@PICKUPMARK)
exten => _**.,n,Hangup

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