Hi Nedi

This is what I have found:
1) If you are registering to a DNS name, if the address changes Asterisk does 
not know about it unless you are using srvlookup=yes in sip.conf. PS I don't 
use it as it does a lookup for every call and I don't like this. I instead use 
dnsmgr.conf to check periodically. Nate that this only affects SIP registration 
and not SIP OPTIONS (qualify). For this I actually use a Monit script but the 
cause of this problem is not what you are experiencing.
2) Yes using the IP Address solves 1) but if you have a provider with multiple 
IP Addresses then this is not the best approach.
3) I have found this problem only recently and I think it may be what you are 
experiencing. Providers with clustered SBC's (which yours sounds like), when 
they fail over for some reason, any registration attempts to the standby SBC 
responds with a 403 Forbidden. This was proved by my provider with a packet 
capture. By default Asterisk views a 403 Forbidden as an authentication failure 
and stops trying to register. If you set register_retry_403=yes in sip.conf it 
fixes this problem.

Good luck. 

Regards
Michael Knill

On 10/5/18, 1:24 pm, "Lonnie Abelbeck" <li...@lonnie.abelbeck.com> wrote:

    Hi Nedi,
    
    I appreciate your detailed description and for the record I feel your 
frustration.
    
    I seem to recall Michael Knill described a similar situation in the recent 
past.
    
    My educated guess is this is a firewall statefull-inspection "stuck-state" 
somewhere in the network path.  AstLinux's firewall is not the issue otherwise 
a reboot would solve the problem.
    
    Long story short, as a test, I would determine a time of day where shutting 
down asterisk is acceptable (say 2:00 am) and keep asterisk down for 10 minutes 
or so, something like:
    
    -- cron at 2:00 am or so --
    service asterisk stop
    sleep 600
    service asterisk init
    --
    (make sure you don't have any other background scripts looking to restart 
asterisk other than the cron script)
    
    Possibly 5 minutes is all that is needed, but I would start at 10 minutes.  
Most any firewall UDP state should expire in 10 minutes.
    
    Sadly, this test may take weeks to confirm if it helps.
    
    If you are already using cron to rewrite the sip.conf this test will be a 
simple addition by delaying starting up asterisk.
    
    Lonnie
    
    
    
    
    > On May 9, 2018, at 6:58 PM, nedi <n...@gmx.ch> wrote:
    > 
    > Hi,
    > 
    > I have some Astlinux boxes as local pbx after Modem with standard 
firewall inside modems , Astlinux have different Releases,  and since years I 
have this issue and can’t fix that:  
    > After a week or month and sometimes longer  the voip number can’t be 
registered and Status show me „rejected“ 
    > 
    > Reboot can’t help - Aterisk Reload can’t help - I can’t reproduce that 
for testing. 
    > If I have this problem only change the SIP Server to another Sipcall sip 
server can help to fix that issues. 
    > 
    > As sample if I was registered to business1.voipgateway.org I must change 
registrar  to business2.voipgateway.org and I can save and reload to  register 
without reboot.
    > 
    > I have tried  instead of registrar name to  use the ip adress but this 
not fixed my problem. 
    > I use Sipcall DNS IP’s to in the Astlinux Network setting that don’t 
help, 
    > I don’t use IPV6.  IPV6 is disabled in the Network Settings.
    > Nat and Firewall in Astlinux are enabled and.
    > 
    > I found  that I have this issue only with the provider Sipcall.ch ( if 
registered on different subdomains of  voipgateay.org ) and only if I use 
Swisscom as Internet Provider. On others provider on the same astlinux and at 
the same time I don’ t have this issues.
    > On the same Astlinux box by some customer I have different provider and 
sipcall on the same astlinux box and only the Sipcall have this all other 
provider worked onlythe the Sipcall account get rejected. 
    > 
    > At now I use Alix Board and AstLinux Release astlinux-1.2.6.1 i586 - 
Asterisk 1.8.32.3, but i had this issues with oter astlinux release to.
    > 
    > Some of my customer changed to internet with fix ip adress and  there are 
this issue not so often.before with Dynamic IP Adress i had this issues oftener.
    > 
    > The Sipcall support told me that is not the problem on the Sipcall site.  
Some times the Sipcall told me Astlinux trying to register with old IP Adress 
and sometimes they told me Astlinux don’t try to register for some hours or 
days and they don’t  getting inquiry from pbx to register)
    > 
    > I tried to change some settings in my sip.conf and  there is nothing what 
helped me to resolve the issue.
    > 
    > egisterattempts=0
    > registertimeout=20
    > maxexpiry=3600
    > defaultexpiry=600
    > qualify=2500
    > srvlookup=no
    > nat=yes
    > 
    > I use a cron script if external IP changed and update the sip.conf with 
the new IP for dynamic IP and  again I have this problem, that not helped me 
great.
    > 
    > The PBX can work for weeks and months without problem but after some time 
I get that again.  
    > 
    > I don’t know have this issue something with Astlinux firewall or with 
swisscom modem or with Sipcall.
    > 
    > I think when, for some reason the registry fail and the state of the 
registry becomes REJECTED, asterisk stops trying to register. Can someone help 
me figuring out why this occur and a way to prevent asterisk from stop sending 
the registration requests. 
    > 
    > Does anybody have an idea about that problem ? How can we configure 
Asterisk to retry after some time in case of rejection ?
    > 
    > 
    > Im my sip.conf I have this:
    > 
    > 
    > I use a cron script to change the IP Adress in Astlinux  if external ip 
adress was changed and  again I have this problem that  some customer get 
rejected.
    > 
    > The PBX can work for weeks and months without problem but after some time 
I get that again.  
    > 
    > I don’t know have this issue something with Astlinux firewall or with 
swisscom modem or with Sipcall.
    > 
    > I think when, for some reason the registry fail and the state of the 
registry becomes REJECTED, asterisk stops trying to register. Can someone help 
me figuring out why this occur and a way to prevent asterisk from stop sending 
the registration requests. 
    > 
    > Does anybody have an idea about that problem ? How can we configure 
Asterisk to retry after some time in case of rejection ?
    > 
    > 
    > Im my sip.conf I have this:
    > 
    > [general]
    > useragent=mypbxname
    > port=5060   
    > context = from-sip-external; send unknown sip callers to this context
    > alwaysauthreject=yes
    > deny = 0.0.0.0/0.0.0.0
    > permit = 10.0.0.0/255.255.255.0
    > permit = 10.8.0.6/255.255.255.0
    > allowguest=no
    > disallow=all 
    > allow=alaw
    > allow=ulaw
    > language=de
    > registerattempts=0
    > registertimeout=20
    > maxexpiry=3600
    > defaultexpiry=600
    > qualify=2500
    > notifycid=yes
    > srvlookup=no
    > nat=yes
    > allow subscribe = yes
    > subscribecontext = hints
    > trustrpid=yes
    > sendrpid=yes
    > ;t38pt_udptl = yes
    > faxdetect=yes
    > 
    > register => 4171511xxxx:2345678@212.117.203.35/4171511xxxx
    > 
    > [071511xxxx]
    > type=peer
    > username=4171511xxxx
    > secret=2345678
    > host=212.117.203.35
    > ;fromuser=4171511xxxx
    > fromdomain=212.117.203.35
    > directmedia=no
    > insecure=port,invite
    > disallow=all 
    > allow=alaw
    > allow=ulaw
    > context=incoming212.117.203.35
    > dtmfmode=info
    > trustrpid=yes
    > sendrpid=pai
    > 
    > 
    > 
    > Best regards
    > Nedi
    > 
    > 
------------------------------------------------------------------------------
    > Check out the vibrant tech community on one of the world's most
    > engaging tech sites, Slashdot.org! 
http://sdm.link/slashdot_______________________________________________
    > Astlinux-users mailing list
    > Astlinux-users@lists.sourceforge.net
    > https://lists.sourceforge.net/lists/listinfo/astlinux-users
    > 
    > Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.
    
    
    
------------------------------------------------------------------------------
    Check out the vibrant tech community on one of the world's most
    engaging tech sites, Slashdot.org! http://sdm.link/slashdot
    _______________________________________________
    Astlinux-users mailing list
    Astlinux-users@lists.sourceforge.net
    https://lists.sourceforge.net/lists/listinfo/astlinux-users
    
    Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Astlinux-users mailing list
Astlinux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to 
pay...@krisk.org.

Reply via email to