FPBX 17 won't dial FM/FM external E.164 number (+) but no issue with domestic trunk prefix (0)

Hi all!

I switched from a FreePBX 16.0.40.11 instance running Asterisk 19.8.0 to a FreePBX 17.0.18.13 instance running Asterisk 21.6.0 and imported a backup to get going.

With FreePBX 17 I’m seeing a Find Me/Follow Me (FM/FM) external number with E.164 (+) formatting that Asterisk doesn’t seem to be able to call. Can you assist me with a second pair of eyes on what I’m missing? Thanks!

FreePBX 16 had one extension with active Find Me/Follow Me (FM/FM) configured like so. This screenshot comes from version 17 as I just imported my version 16 backup and everything looks to be in order:

https://i.imgur.com/jthLENN.png

Where the external number in line two used E.164 formatting +4917612345678#. This worked as expected in FreePBX 16 in that FreePBX would call the number and a call would be successfully connected if picked up. Now in FreePBX 17 this causes an error:

app_stack.c: Gosub attempted to reach non-existent destination

See plain text pastebin content of /var/log/asterisk/full for an example call at http://0x0.st/8Pi7.txt, line 228. In this example Asterisk receives an inbound call from 017633380000 to 4930555123410 and correctly forwards this to extension 10 which in turn triggers Find Me/Follow Me. In FreePBX 16 this order of events used to correctly trigger a call to external number +4917612345678 whereas currently this provokes above non-existent destination error. To the caller the call cannot be connected, they receive a busy tone.

I can work arcound this behavior by writing the external FM/FM target number like so.

# Not
+4917612345678#

# But instead
017612345678#

In general, however, FreePBX doesn’t seem to take issue with E.164-formatted numbers. From a Linphone Desktop version 5.2.6 SIP phone client I can straight up send a SIP INVITE like so:

INVITE sip:[email protected] SIP/2.0

And this connects me to the number perfectly fine. Is there some obvious logic or place that I’m missing in FreePBX 17 on why FM/FM doesn’t currently seem to do E.164-formatted external numbers? Thanks so much for any insight!

It looks like several similar ones were fixed seven months ago, as part of Bugfix/plussignissue by jissphilip · Pull Request #116 · FreePBX/core · GitHub

However dial-with-exten wasn’t fixed. It’s in code that was affected by elimination of macros. I haven’t worked out what decides which variant is used, but it is possible it is on a wrong path for other reason.

Note that fix for issue 116 is subtly broken. It will probably work in most real life cases, but it looks like the coder (or their AI?) didn’t understand the structure of character classes in patterns. They have [+-X], which I believe matches everything from “=” through “X”. I believe they meant X in the sense of X outside of character classes, which would be 0-9.

Do you have an outbound route that matches the +?

Yeah, the FreePBX 17 instance has exactly one Outbound Route, one of its dial patterns matches _+Z. (as in a pattern beginning with a literal plus character followed by any 1-9 digit followed by any one or more arbitrary characters).

https://i.imgur.com/qj55Evi.png

In /etc/asterisk/extensions_additional.conf this gets rendered like so: http://0x0.st/8Po0.txt. Having a matching dial pattern is why I don’t find it surprising that just straight up calling a plus number from a SIP phone client works fine.

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