Number Manipulation Rules not working for Automatic Outbound calls

I have configured digit manipulation rules for my second SBC to use a prefix for all outgoing calls:

I’m doing automatic calls, by placing a file to /var/spool/asterisk/outgoing. This file has the correct channel: Channel: SIP/SBC2/+123456789

None of the calls get the 2024 prefix and I’m not sure why? I can see in the CDRs that SBC2 is used, but the configuration is simply ignored.

Please help.

Tried using the number without plus, same thing, rule was not taken into consideration.

I assume that what you have configured is FreePBX, not the SBC. In that case, SIP/SBC2/+123456789 is directly addressing the endpoint, albeit using an obsolete, and no longer supported, channel driver. If you want FreePBX to transform the number, you have to put the call through the dialplan, using Local/+123456789@from-internal, or similar.

1 Like

Hi David55,

Thanks for your reply, yes, FreePBX is what I’m trying to configure.

I searched through asterisk configuration and found this:
include => sub-flp-2-custom
exten => s,1,ExecIf($[${REGEX(“[1]+$” ${DIAL_NUMBER})} = 1]?Set(TARGET_FLP_2=21019${DIAL_NUMBER}))
exten => s,n,GotoIf($[${LEN(${TARGET_FLP_2})} != 0]?match)
exten => s,n,Return()
exten => s,n(match),Set(DIAL_NUMBER=${TARGET_FLP_2})
exten => s,n,Return()

in this file: /etc/asterisk/extensions_additional.conf

How can I configure the Channel in the outbound call file (that is placed in the outgoing folder) to consider this Digit Manipulation rules that I’m adding in the GUI of FreePBX.

Best Regards,
Mihai R.

  1. 0-9#\*\+ ↩︎

As I already said:

I think something is missing, I tried like this:
Channel: Local/+447xxxxxxxxx@from-internal

Connected to Asterisk 19.8.0 currently running on t1-2a (pid = 2330)
[2024-05-20 16:04:35] WARNING[2398]: pbx_spool.c:353 safe_append: Unable to set utime on /var/spool/asterisk/outgoing/ Operation not permitted
– Attempting call on Local/+447xxxxxxxxx@from-internal for s@ivr-context3:1 (Retry 1)
[2024-05-20 16:04:35] NOTICE[3670]: core_local.c:737 local_call: No such extension/context +447xxxxxxxxx@from-internal while calling Local channel
[2024-05-20 16:04:35] NOTICE[3670]: pbx_spool.c:450 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[2024-05-20 16:04:35] NOTICE[3670]: pbx_spool.c:453 attempt_thread: Queued call to Local/+447xxxxxxx@from-internal expired without completion after 0 attempts

Note: I want to send the calls through SBC1/SBC2 or SBC3 from the outgoing file, I’m not sure if this is doable in this situation.

Confirm that a local extension can dial +447xxxxxxxxx – you may not have an Outbound Route that matches this format.