[asterisk-users] realtime peer w/ callbackextension does not register after 'sip reload'

Marie Fischer marie at vtl.ee
Tue Apr 9 18:12:12 CDT 2013


Hello everybody,

I am having a problem with realtime SIP peers.
On Asterisk 1.8, I had SIP peers for external SIP providers configured in database and additional register lines in sip.conf so they would register.
Now I upgraded to Asterisk 11.3.0, partly because of the promised callbackextension feature for realtime peers (https://reviewboard.asterisk.org/r/1717/). Removed the 'register' lines from sip.conf. My peers register correctly when Asterisk is started or if I do 'module unload chan_sip.so; module load chan_sip.so', but if I do 'sip reload', they stay in 'Unregistered' state forever.

*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time                 
xxx.xxx.xxx.xxx:5060                      N      xxxxxxxx          45 Registered           Fri, 05 Apr 2013 05:37:02
1 SIP registrations.
*CLI> 
*CLI> sip reload
*CLI>  Reloading SIP
  == Parsing '/etc/asterisk/sip.conf': Found
  == Using SIP CoS mark 4
[Apr  5 05:37:59] NOTICE[16991]: chan_sip.c:5527 register_realtime_peers_with_callbackextens: Created realtime peer 'peer' for registration
  == Parsing '/etc/asterisk/sip_notify.conf': Found
*CLI> 
*CLI> 
*CLI> sip show registry
Host                                    dnsmgr Username       Refresh State                Reg.Time                 
xxx.xxx.xxx.xxx:5060                      N      xxxxxxxx          60 Unregistered                                  
1 SIP registrations.
*CLI> 

Also, "sip show peers" shows the peer correctly after restart, but is empty after 'sip reload'.

If I add the "register" line back to sip.conf, I get 2 lines for the same peer (in 'sip show registry') and both show state = registered. Strange.

Tried to dig through the code in chan_sip.c and one difference seems to be in the "register" line created by build_peer() - it includes the peername (register => peer?user:secret at host/extension), whereas in my config file I had just "register => user:secret at host/extension". I removed the peer part from the source and recompiled, and if I recall correctly the registration "survived" sip reload after that, but that's a hack, not a solution. :)

I found this bug: https://issues.asterisk.org/jira/browse/ASTERISK-20611, but I don't think that's my issue - anyway, it should be fixed by now, but I still had the same issue with 11.4.0-rc1.

Does anybody have experience with realtime peers registering using callbackextension? Does this problem seem like a configuration issue or should I file a bug report? 

Sorry if you read this twice, I am crossposting to http://forums.asterisk.org as I still haven't figured out the best place to get answers. ;)

-- 

marie






More information about the asterisk-users mailing list