[asterisk-users] how to check Asterisk SIP registration

Olle E. Johansson oej at edvina.net
Sat Dec 26 03:34:02 CST 2009


You've unfortunately gotten a lot of confused answers. To try to clear this up:

1. Only type=peer objects accept registrations. "sip show users" or "sip show registry" has nothing to do with peers. A peer might be part of a type=friend
2. If you see IP addresses when you run "sip show peers" then those objects have an active registration, Asterisk knows where to reach them.
3. Nat's or firewalls between the device and Asterisk might cause issues with Asterisk sending messages to them or devices sending messages to Asterisk
4. Your output below indicates that Asterisk doesn't know how to reach the device, that Asterisk has no IP and port address to send messages to, thus the device is not registered at all.
5. Turning "qualify" on can help with keeping a NAT binding open. 

To summarize, start with looking for IP address in "sip show peers". If we have an IP address, check the result of the Qualify option in the same output. If there's an IP, the device could reach Asterisk. If the status is "unreachable" Asterisk could not reach the device on the IP address.
Then go hunting in your network to find the issue.

Best regards,
/Olle


24 dec 2009 kl. 17.39 skrev Vieri:

> Unfortunately, "sip show peers" did not "work" in my case. The sip peers were apparently "online" and "OK" (I use qualify=yes) but they weren't...
> The SIP clients could NOT register, so they were offline but "sip show peers" stated that they were OK.
> 
> I would prefer to perform an "automated" SIP registration (via cron script). If it fails then I can spawn a "rescue" script.
> Surely, a "real" sip registration is more reliable then "sip show peers".
> 
> Any ideas?
> 
> Vieri
> 
> 
> --- On Wed, 12/23/09, Danny Nicholas <danny at debsinc.com> wrote:
> 
>> "Sip show users" or "sip show peers"
>> should do the trick, but I'm not sure
>> about 1.2;  all of my experience is in the 1.4
>> branch.
>> 
>> -----Original Message-----
>> From: asterisk-users-bounces at lists.digium.com
>> [mailto:asterisk-users-bounces at lists.digium.com]
>> On Behalf Of Vieri
>> Sent: Wednesday, December 23, 2009 1:09 PM
>> To: asterisk-users at lists.digium.com
>> Subject: [asterisk-users] how to check Asterisk SIP
>> registration
>> 
>> Hi,
>> 
>> This is the first time I experience this problem with
>> Asterisk:
>> all of a sudden SIP registrations stopped working. Active
>> calls kept working
>> but new calls could not be established (I did NOT perform a
>> "graceful
>> restart"). 
>> 
>> Besides, would a "restart gracefully" actually deny SIP
>> registration?
>> 
>> I did not have a network issue because killing asterisk and
>> starting it
>> again solved the problem.
>> 
>> How can I diagnose what happened to the SIP service (I
>> checked the log but
>> am quite lost)?
>> 
>> Also, how can I do a simple command-line "check" to see
>> that SIP
>> registrations are OK? I would like to use a SIP client
>> (like sipsak) to
>> perform a simple registration from a custom bash script so
>> I can quickly
>> detect if this problem occurs again and "auto-kill+restart"
>> the asterisk
>> process. I know this sounds ugly but on my production
>> server, it's better to
>> bring the whole system down and back up in as little time
>> as possible.
>> 
>> Any suggestions?
>> 
>> Asterisk is 1.2.31.1
>> 
>> Some log lines:
>> 
>> Dec 23 13:13:16 DEBUG[11482] channel.c: Avoiding initial
>> deadlock for
>> 'SIP/4053-b4520e98'
>> Dec 23 13:13:16 WARNING[11482] channel.c: Avoided initial
>> deadlock for
>> '0xb4302278', 9 retries!
>> 
>> Dec 23 13:13:43 VERBOSE[18837] logger.c: 
>>    -- Executing
>> Dial("SIP/6174-b456d828", "SIP/4062|20|tTwWM(auto-blkvm)")
>> in new stack
>> Dec 23 13:13:43 NOTICE[18837] app_dial.c: Unable to create
>> channel of type
>> 'SIP' (cause 3 - No route to destination)
>> Dec 23 13:13:43 VERBOSE[18837]
>> logger.c:   == Everyone is busy/congested at
>> this time (1:0/0/1)
>> Dec 23 13:13:43 DEBUG[18837] app_dial.c: Exiting with
>> DIALSTATUS=CHANUNAVAIL.
>> 
>> Thanks,
>> 
>> Vieri
> 
> 
> 
> 
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-users

---
* Olle E Johansson - oej at edvina.net
* Cell phone +46 70 593 68 51, Office +46 8 96 40 20, Sweden






More information about the asterisk-users mailing list