U
U
ustinovanton2015-01-23 11:50:27
Asterisk
ustinovanton, 2015-01-23 11:50:27

SIP registration on Asterisk drops off at FXS gateway after VPN is disabled, what is the reason?

Good afternoon.
The situation is as follows:
There is Mikrotik1 in one city, Mikrotik2 in another.
On Mikrotik1, the WAN interface from the DVG-5004S FXS gateway is enabled in its LAN interface
. A VPN tunnel has been forwarded between Mikrotik1 and Mikrotik2.
In Mikrotik2, Asterisk is enabled on its LAN interface. On the FXS gateway, SIP registration is registered to Asterisk for all 4 lines.
SIP registration of all lines of the FXS gateway on the asterisk periodically disappears. Moreover, either with the UNREACHABLE status (this, as it turned out, if you turn off the VPN and turn it back on), or with the UNKNOWN status. The UNKNOWN status comes out either after a complete loss of communication - this is a normal situation, or (the most basic problem)
after 6-10 conversations have passed on the gateway.
The version that the bug in the hardware was abandoned - because they tried different pieces of iron, the result is the same.
There is also Mikrotik3 in the third city, there is a QVI-2102 FXS gateway. There is no such situation. In addition to the fact that after restoring the local VPN tunnel, you have to reboot the gateway in order for the SIP registration status to change from UNKNOWN to OK.
I also tried to change the MTU, did not help. Same problem for different values.
The SIP registration parameters for the d-link are set to
Session Expiration : 30 s
Session Refresh Request : Re-INVITE
SIP Message Resend Timer Base : 0.5 s
Max. Response Time for Invite : 4 s
I still can't figure out which direction to dig.
Is there any experience of solving a similar problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
Vladimir, 2015-01-23
@rostel

on a server with asterisk, start collecting traffic, so
tear up the VPN (in general, reproduce the situation with inaccessibility)
after a couple of minutes, stop tcpdump Ctrl + C
further rake the dump in wireshark and find the last one

D
Denis Sh, 2015-01-26
@Deq56

look at Mikrotik when sip falls off in ip-firewall-connections reply dst adress (for connections from the gateway to asterisk , does it match src-adress

K
Konstantin, 2015-02-03
@derwin

I think the problem is that the gateway sends data to the gray network through an external address (not a tunnel). Because of this, it hangs in the states. And it is not routed to the tunnel when it is raised.
Check states.
I wrote a watch script for aster ping, and if there is no ping, I cut all the states before it.

A
Andrey Levashev, 2015-02-13
@skystart

On an Asterisk machine, you can try conntrack -F (from the conntrack-tools package).
Plus, in addition to Mikrotik2, press the same button.
(On the Internet they write that at the same time the tunnels are still torn, but personally for me, on a Linux machine - no)
And see if the next attempt to register the gateway passes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question