# Monitor realtime peers?

**URL:** <https://community.asterisk.org/t/monitor-realtime-peers/46105>\
**Category:** Asterisk Support\
**Created:** [May 9, 2014, 11:56am UTC](https://community.asterisk.org/t/monitor-realtime-peers/46105 "2014-05-09T11:56:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phonefxg](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/phonefxg/32/2094_2.png) [@phonefxg](https://community.asterisk.org/u/phonefxg)\
**Post date:** [May 9, 2014, 11:56am UTC](https://community.asterisk.org/t/monitor-realtime-peers/46105/1 "2014-05-09T11:56:15Z")

</div>

Hi,

I cannot monitor realtime peers corectly. If a phone is disconnected from the network, I will never see it with sip show peers unless someone tries to call the phone.  
I thought asterisk cached peers in memory upon registration or phone call.

How can I make sure asterisk will update the cache when the phone registers?

Here is my config for one of my peer:

Name : 01-A-1245782  
Description :  
Realtime peer: Yes, cached  
Secret :   
MD5Secret :   
Remote Secret:   
Context : default  
Record On feature : automon  
Record Off feature : automon  
Subscr.Cont. :   
Language : fr  
Tonezone :   
AMA flags : Unknown  
Transfer mode: open  
CallingPres : Presentation Allowed, Not Screened  
Callgroup :  
Pickupgroup :  
Named Callgr :  
Nam. Pickupgr:  
MOH Suggest :  
Mailbox : 2740@default  
VM Extension : \*97  
LastMsgsSent : 32767/65535  
Call limit : 2147483647  
Max forwards : 0  
Dynamic : Yes  
Callerid : “Test Asterisk” \<\>  
MaxCallBR : 384 kbps  
Expire : -1  
Insecure : no  
Force rport : Auto (No)  
Symmetric RTP: No  
ACL : No  
DirectMedACL : No  
T.38 support : No  
T.38 EC mode : Unknown  
T.38 MaxDtgrm: -1  
DirectMedia : Yes  
PromiscRedir : No  
User=Phone : No  
Video Support: No  
Text Support : No  
Ign SDP ver : No  
Trust RPID : No  
Send RPID : Yes  
Subscriptions: Yes  
Overlap dial : Yes  
DTMFmode : info  
Timer T1 : 500  
Timer B : 32000  
ToHost :  
Addr-\>IP : (null)  
Defaddr-\>IP : (null)  
Prim.Transp. : UDP  
Allowed.Trsp : UDP  
Def. Username: 2740  
SIP Options : (none)  
Codecs : (ulaw)  
Codec Order : (ulaw:20)  
Auto-Framing : No  
Status : UNREACHABLE  
Useragent :  
Reg. Contact :  
Qualify Freq : 60000 ms  
Keepalive : 0 ms  
Sess-Timers : Accept  
Sess-Refresh : uas  
Sess-Expires : 1800 secs  
Min-Sess : 90 secs  
RTP Engine : asterisk  
Parkinglot :  
Use Reason : No  
Encryption : No

Here is my realtime settings:

rtsavesysname = yes  
limitonpeers = yes  
rtcachefriends=yes  
rtupdate=yes  
qualifyfreq=60

---

<div class="post-metadata">

**Author:** ![phonefxg](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/phonefxg/32/2094_2.png) [@phonefxg](https://community.asterisk.org/u/phonefxg)\
**Post date:** [May 9, 2014, 2:32pm UTC](https://community.asterisk.org/t/monitor-realtime-peers/46105/2 "2014-05-09T14:32:11Z")

</div>

Update:

I have just discovered that Asterisk does update the cache if the phone registers but will stop sending  
sip OPTIONS packets to the phone after a sip reload.(Confirmed in wireshark)

So, if I do a sip reload and an IP phone is disconnected and no one calls the phone, asterisk will never know the phone is disconnected.

Is this normal behavior?

Should Asterisk keeps checking the phone status after a sip reload even if it did not received a registration request?
