Ответ в теме: Инструкция по настройке шлюза на orange pi

 
#16284
MIke
Участник

Всем привет
Использую сборку OrangePi_30_01_2019.img (Orange Pi Zero, один свисток)
Исходящие звонки ходят отлично, а вот любой входящий шлюз сразу сбрасывает(
лог событий:

Connected to Asterisk 11.24.1 currently running on arm (pid = 908)
arm*CLI>
    -- Executing [s@datacard-incoming:1] Macro("Dongle/79xxxxxx378-010000000e", "to-ruvoip,352xxxxxxxxx521") in new stack
    -- Executing [s@macro-to-ruvoip:1] NoOp("Dongle/79xxxxxx378-010000000e", "NoCDR()") in new stack
    -- Executing [s@macro-to-ruvoip:2] Verbose("Dongle/79xxxxxx378-010000000e", "Incoming Call from +79xxxxxx968") in new stack
Incoming Call from +79xxxxxx968
    -- Executing [s@macro-to-ruvoip:3] AGI("Dongle/79xxxxxx378-010000000e", "agi-ruvoip.php,get-by-imei,352xxxxxxxxx521") in new stack
    -- Launched AGI Script /etc/asterisk/agi-bin/agi-ruvoip.php
 agi-ruvoip.php,get-by-imei,352xxxxxxxxx521: AGI start
    -- <Dongle/79xxxxxx378-010000000e>AGI Script agi-ruvoip.php completed, returning 0
    -- Executing [s@macro-to-ruvoip:4] GotoIf("Dongle/79xxxxxx378-010000000e", "1?end") in new stack
    -- Goto (macro-to-ruvoip,s,8)
    -- Executing [s@macro-to-ruvoip:8] Hangup("Dongle/79xxxxxx378-010000000e", "0") in new stack
[2019-08-28 23:33:00.703 +0300] WARNING[307][C-0000000e]: pbx.c:11491 pbx_builtin_hangup: Invalid cause given to Hangup(): "0"
  == Spawn extension (macro-to-ruvoip, s, 8) exited non-zero on 'Dongle/79xxxxxx378-010000000e' in macro 'to-ruvoip'
  == Spawn extension (datacard-incoming, s, 1) exited non-zero on 'Dongle/79xxxxxx378-010000000e'
    -- Executing [h@datacard-incoming:1] NoOp("Dongle/79xxxxxx378-010000000e", "nothing") in new stack
    -- Executing [s@datacard-incoming:1] Macro("Dongle/79xxxxxx378-010000000f", "to-ruvoip,352xxxxxxxxx521") in new stack
    -- Executing [s@macro-to-ruvoip:1] NoOp("Dongle/79xxxxxx378-010000000f", "NoCDR()") in new stack
    -- Executing [s@macro-to-ruvoip:2] Verbose("Dongle/79xxxxxx378-010000000f", "Incoming Call from +79xxxxxx968") in new stack
Incoming Call from +79xxxxxx968
    -- Executing [s@macro-to-ruvoip:3] AGI("Dongle/79xxxxxx378-010000000f", "agi-ruvoip.php,get-by-imei,352xxxxxxxxx521") in new stack
    -- Launched AGI Script /etc/asterisk/agi-bin/agi-ruvoip.php
 agi-ruvoip.php,get-by-imei,352xxxxxxxxx521: AGI start
    -- <Dongle/79xxxxxx378-010000000f>AGI Script agi-ruvoip.php completed, returning 0
    -- Executing [s@macro-to-ruvoip:4] GotoIf("Dongle/79xxxxxx378-010000000f", "1?end") in new stack
    -- Goto (macro-to-ruvoip,s,8)
    -- Executing [s@macro-to-ruvoip:8] Hangup("Dongle/79xxxxxx378-010000000f", "0") in new stack
[2019-08-28 23:33:26.981 +0300] WARNING[317][C-0000000f]: pbx.c:11491 pbx_builtin_hangup: Invalid cause given to Hangup(): "0"
  == Spawn extension (macro-to-ruvoip, s, 8) exited non-zero on 'Dongle/79xxxxxx378-010000000f' in macro 'to-ruvoip'
  == Spawn extension (datacard-incoming, s, 1) exited non-zero on 'Dongle/79xxxxxx378-010000000f'
    -- Executing [h@datacard-incoming:1] NoOp("Dongle/79xxxxxx378-010000000f", "nothing") in new stack
arm*CLI>
/etc/asterisk/settings/ext_from_servers.inc

[macro-to-ruvoip]
; 1 - IMEI
exten => s,1,NoOp(NoCDR())
 same => n,Verbose(Incoming Call from ${CALLERID(num)})
 same => n,agi(agi-ruvoip.php,get-by-imei,${ARG1})
 same => n,GotoIf($[ "${dc_peer}" == "" ]?end)
 same => n,Verbose(Redirecting from ${CALLERID(num)} to ${dc_proto}/${dc_peer})
 same => n,Dial(${dc_proto}/${dc_peer}/${dc_peer},90,gS(600))
 same => n,Macro(stats)
 same => n(end),Hangup(${HANGUPCAUSE})
exten => h,1,NoOp(nothing)