FreePBX 17 asterisk 22 results in no outgoing calls

The default for this is just Return().

It would require extremely close timing for that to end up returning non-zero, without the Gosub having already done so! Also, it wouldn’t result in a message about SipAddHeader not found. I therefore conclude that your system has been customised with code that attempts to add SIP headers, the chan_sip way.

What does the CLI command:

dialplan show macro-dialout-trunk-predial-hook

return?

@david55 we have 2 outbound routes that add a different caller ID depending on what prefix was used when dialling.

 dialplan show macro-dialout-trunk-predial-hook
[ Context 'macro-dialout-trunk-predial-hook' created by 'pbx_config' ]
  's' =>            1. SipAddHeader(P-Preferred-Identity:sip:${CALLERID(number)}@sipconnect.sipgate.co.uk) [extensions_custom.conf:2]
                    2. MacroExit()                                [extensions_custom.conf:3]

-= 1 extension (2 priorities) in 1 context. =-

That is custom code that someone has added to your system.

There are two problems with this. Firstly the one already mentioned, that it only supports chan_sip (which no longer exists in Asterisk 21 onwards, and can be addressed as in;

Secondly, it expects the custom code to be called as a macro, but macros no longer exist in Asterisk 21 onwards and FreePBX 17 will not call it as a macro, for any Asterisk version. You need to replace MacroExit, by Return.

Obviously first check that you really need this custom code.

Thanks everyone for your responses, this is way over my head so I think I’m going to have to reinstall and recreate the system as clearly the backup/restore hasn’t provided a working system despite that being the recommended path. Only 40 extensions and 2 sites …

If the custom code is necessary, you are going to have to do more work to reinstate it than to fix the current problem, as as clean install will remove it completely.

You can’t expect the automated upgrade to cope with arbitrary user provided code, especially if that code was not written well, in the first place, as is the case here.

@david55

As a last resort before reinstalling, I removed the code as you suggested, and it works! I can dial out! Only issue is that both outbound routes show the same number now grr

That is presumably what the custom header was dealing with. It looks like your provider uses an unusual way of signalling outbound caller ID. Re-installing will have the same loss of function.

Yeah I guess so at least we can make outgoing calls for the first time this week! Now I just need to figure out why half the phones don’t register, all the times are out and no one can access contacts.

Thanks again for spotting the issue.

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