New Sip Trunk dropping and not reconecting for several hours

This is driving me crazy as it makes no sence to me, i recently got a sip trunk from a local provider, before then i was using FreePBX with analogs ATA and PTSN lines. Now im trying to get a sip trunk working in an attempt to replace PTSN lines but i cant make it work stable.

This was the example config given by the provider:

Register => username@dnsname:password@dnsname

[username] (not placed this one, this is direct for asterisk config i belive)
type=friend
username= username
context= from-trunk
canreinvite=no
fromuser= username
secret= password
host=dnsname
insecure=invite
dtmfmode=rfc2833
disallow=all
;;;;CODECS IPT TRUNK
allow=ilbc
allow=g726
allow=gsm
;;;;CODECS ATI TRUNK
allow=alaw
qualify=yes
sendrpid=yes
trustrpid=yes

I a setup a chan_sip using those settings on outgoing and the register string on incoming.

It worked the FIRST TIME (actually im not sure if i setup everything correctly the first time), BUT then the internet went out and it NEVER RECONECTED AGAIN, the peer was “unreachable” and sip registration was “timed out”.

I played along with my router settings (mikrotik) beliving it may be a NAT issue, nope i could not pinpoint the issue, BUT i managed to place firewall rules to watch for outgoing and incoming packets to the sip server, and the server does not reply, i get not incoming packets from that ip, i can also se active conections and i see a conection from my freepbx server ip : 5160 port to sip server on 5060 port, with 0kb on RX meaning again, no reply.

With no way to figure this out i tryied to setup as PJSIP… to me suprise it worked… at first. But as PJSIP it is a similar issue, it goes unavalible with not inbound or inbounds calls for example last night it was working, right now it is not, i bet later on the day it will work again…

I really having a hard time figuring this out… not sure if is a misconfiguration OR it is just a network issue or the router blocking it.

Any help on how i could debug this?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.