а вот для VPN проблема, потому что создается .ovpn файл для настройки клиента, в котором указан внешний IP, а не доменное имя. В подробности лезть не буду, просто этот вариант не катит. (Вариант организовать OpenVPN на микротик тоже не стоит предлагать)
same => n,MYSQL(Connect connid localhost МЕГАПОЛЬЗОВАТЕЛЬ СУПЕРСЕКРЕТНЫЙПАРОЛЬ asterisk)
same => n,MYSQL(Query resultid ${connid} SELECT channelname FROM union WHERE codeid = '${EXTEN:0:2}' AND minnum <= '${EXTEN:2}' AND maxnum >= '${EXTEN:2}')
same => n,MYSQL(Fetch fetchid ${resultid} SATCHAN)
same => n,MYSQL(Clear ${resultid})
same => n,MYSQL(Query resultid ${connid} SELECT selfcode FROM union WHERE channelname = '${SATCHAN}')
same => n,MYSQL(Fetch fetchid ${resultid} SELFCODE)
same => n,MYSQL(Clear ${resultid})
same => n,MYSQL(Query resultid ${connid} SELECT rec FROM sip WHERE name = '${CALLERID(num)}')
same => n,MYSQL(Fetch fetchid ${resultid} RECUP)
same => n,MYSQL(Clear ${resultid})
same => n,MYSQL(Query resultid ${connid} SELECT callerid FROM sip WHERE name = '${CALLERID(num)}')
same => n,MYSQL(Fetch fetchid ${resultid} RUSNAME)
same => n,MYSQL(Clear ${resultid})
same => n,MYSQL(Disconnect ${connid})
server {
listen 80;
server_name example.ru
location /domain {
proxy_pass http://127.0.0.1:3000;
}
location /domain/api {
proxy_pass http://127.0.0.1:8000;
}
}
F: When the caller hangs up, transfer the *called* party to the next
priority of the current extension and *start* execution at that location.
NOTE: Any channel variables you want the called channel to inherit from the
caller channel must be prefixed with one or two underbars ('_').
NOTE: Using this option from a Macro() or GoSub() might not make sense as
there would be no return points.