INVALID_NUMBER_FORMAT [28] Trunk/Gateway Failover

I would like to change the failover codes. Where would I do that? We don’t seem to have dialplan control in astpp. Where would I modify the “continue_on_fail parameters” ?
e.g. codes 1,2,3,6,18,19,20,21,27,28,31,34,38,41,42,44,58,88,111,127,403,501,602,603,607,609

One of my providers keeps rejecting calls with “INVALID_NUMBER_FORMAT [28]” but they are completing fine with another carrier and I want the calls to failover automatically.

astpp.xml.lua. The code is there, everything is controllable.

1 Like
  1. I see “continue_on_fail=true” called in astpp.calling.card.functions.lua so which one is used?

  2. If it’s controlled in astpp.xml.lua, how would I add NORMAL_TEMPORARY_FAILURE and NO_ROUTE_DESTINATION to the code below?

    local continue_on_fail = ‘!USER_BUSY’
    if (config[‘continue_on_fail’] ~= nil) then
    continue_on_fail = config[‘continue_on_fail’]
    end

In the log I see
2024-01-31 13:14:27.897661 90.60% [INFO] mod_dptools.c:3635 Originate Failed. Cause: NORMAL_TEMPORARY_FAILURE
2024-01-31 13:14:27.897661 90.60% [DEBUG] switch_channel.c:4943 Continue on fail=true]: Cause: NORMAL_TEMPORARY_FAILURE
2024-01-31 13:14:27.897661 90.60% [INFO] mod_dptools.c:4906 immediately releasing

or after changing the value

2024-01-31 13:14:27.897661 90.60% [INFO] mod_dptools.c:3635 Originate Failed. Cause: NORMAL_TEMPORARY_FAILURE
2024-01-31 13:14:27.897661 90.60% [DEBUG] switch_channel.c:4943 Continue on fail [1,2,3,6,18,19,20,21,27,28,31,34,38,41,42,44,58,88,111,127,403,501,503,602,603,607,609]: Cause: NORMAL_TEMPORARY_FAILURE
2024-01-31 13:14:27.897661 90.60% [INFO] mod_dptools.c:4906 immediately releasing

but either way it does not continue to the next trunk

Did you manage to resolve the issue? You can share the information

I checked code in astpp.xml.lua as ‘devangn’ suggested but no changes there had any effect on failover as it’s set to true by default and that setting apparently takes precedence of any changes in that file.

It seems to me that there is a lack of expansion in the dial plan
As an example, I found the following
extension name=“outbound_calls”
condition field=“destination_number” expression=“^(\d{3})$”
action application=“set” data=“continue_on_fail=true”/
!-- Установить флаг продолжения выполнения в случае неудачи –
action application=“group” data=“external-trunks”/
!-- Вызвать группу транков external-trunks –
/condition
/extension

group name=“external-trunks”
action application=“bridge” data=“sofia/gateway/trunk1/${destination_number}”/
!-- Попробовать сначала транк trunk1 –
action application=“bridge” data=“sofia/gateway/trunk2/${destination_number}”/
!-- Если не удалось, то переключиться на транк trunk2 –
!-- Можно добавить еще транки по аналогии, если необходимо –
/group

Dumb question, but you did restart freeswitch after making those changes?