How to make asterisk and the gateway to the tomato?

There is a freepbx asterisk server on the Asus router 18u@advancedtomato1.36 and yota router gemteck
Configured wan switching between cable provider and yota (failover) . A shift occurs and everything works except the asterisk (calls don't go anywhere) asterisk is unable to connect to the server balance. While Softphone is running. When connecting the cable provider back to work begins. Is treated only by reboot of the gateway. How to make friends?
July 8th 19 at 16:09
4 answers
July 8th 19 at 16:11
Solution
The problem was solved by migration to mikrotic_hap_ac@routerOS conntrack entries, there are cleaned team
foreach i in=[/ip firewall connection find] do={/ip firewall connection remove $i}
July 8th 19 at 16:13
not cleaned conntrack entries when switching the default route
conntrack utility on the router no =( - gerda.OReill commented on July 8th 19 at 16:19
if it is easy how to clean it? - gerda.OReill commented on July 8th 19 at 16:16
to find the source conntrack and see what it does
to realize their own teams
then tell us - Pear commented on July 8th 19 at 16:22
"Externaddr: 31.28.0.246:0 "
you have it static hands busy?

in stock
res_stun_monitor.so
can be activated in the config res_stun_monitor.conf
[general]
stunaddr = any public find themselves

might help - Pear commented on July 8th 19 at 16:25
Yes hands. as I understand the stun monitor is a module for asterisk which I have not installed and res_stun_monitor.conf I have
about conntrack look - gerda.OReill commented on July 8th 19 at 16:28
in the list of modules is res_stun_monitor.so
config can be created - Pear commented on July 8th 19 at 16:31
Will try this and see will it work - gerda.OReill commented on July 8th 19 at 16:34
July 8th 19 at 16:15
I'm not sure that will help, he is not connected? perhaps a firewall rule, and if not calls the codecs try to change
does not connect until you reboot the gateway. (On stock firmware, the behavior is identical) - gerda.OReill commented on July 8th 19 at 16:18
I assume that it's in the wrong job NAT. Whether it can be a command to restart separately from the router? - gerda.OReill commented on July 8th 19 at 16:21
: I think everything can be cured using the routes. Tell the server which network should work Aster - Pear commented on July 8th 19 at 16:24
res_stun.conf - Pear commented on July 8th 19 at 16:27
: you can try but the fact that asterisk does not know anything about any switching. He sees the gateway and speaking to him in either case. The problem is that asterisk successfully pings zadarmo to connect but can't - gerda.OReill commented on July 8th 19 at 16:30
: well I will try to use a stun server - Pear commented on July 8th 19 at 16:33
: find / -name "res_stun.conf" returns nothing =( - gerda.OReill commented on July 8th 19 at 16:36
Google - search - asterisk res_stun.conf - gerda.OReill commented on July 8th 19 at 16:39
July 8th 19 at 16:17
Try after switching Internet gateway in asterisk to do a reload
p.s actually asterisk does not like to work behind a nat
fully reboot asterisk is not running. Not very clear what he doesn't like the idea because it needs to raise the trunk but for some reason can't do it - gerda.OReill commented on July 8th 19 at 16:20
but why NAT interferes with the outbound connection? - gerda.OReill commented on July 8th 19 at 16:23
To work correctly behind NAT it is better to map port 5060 for tcp/udp and port range 10000-20000 for udp or that which is specified in the config. And the port forwarding should work correctly on both lines of the Internet - Pear commented on July 8th 19 at 16:26
inclined to think that the rights of Vladimir and are now looking for how this route to clean - Pear commented on July 8th 19 at 16:29

Find more questions by tags Asterisk