M
M
Morty Rick2017-09-29 20:23:43
Asterisk
Morty Rick, 2017-09-29 20:23:43

How to save peer data with realtime mechanism in asterisk after sip reload?

Good afternoon.
Found strange behavior of asterisk, internal numbers are stored in mysql.

sip.conf
rtcachefriends=yes
rtsavesysname=yes
rtupdate=yes
rtautoclear=no

centos*CLI> realtime load sippeers name 200
Column Name Column Value
-------------------- ----------------- ---
id 8
name 200
cid_number 200
fullname
secret 200
port 46698
nat force_rport,comedia

after registration, peer data is cached
centos*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
200/200 xxx.xxx.xxx.95 D Yes Yes 46698 OK (67 ms) Cached RT
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]

but if you say sip reload. then the data will disappear and will not appear until the peer sends registration data after a timeout or until the first outgoing call from this internal. Accordingly, those entering this internal will not pass.
centos*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
200/200 xxx.xxx.xxx.95 D Yes Yes 46698 OK (1610 ms) Cached RT
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]
centos*CLI>
centos*CLI> sip reload
Reloading SIP
== Parsing '/etc/asterisk/sip.conf': Found
== Parsing '/etc/asterisk/users.conf': Found
== Using SIP CoS mark 4
[Sep 29 20:21:44] NOTICE[61804]: chan_sip.c:5598 register_realtime_peers_with_callbackextens: Created realtime peer '200' for registration
== Parsing '/etc/asterisk/sip_notify.conf': Found
centos*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
0 sip peers [Monitored: 0 online, 0 offline Unmonitored: 0 online, 0 offline]
centos*CLI>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
silverjoe, 2017-09-30
@silverjoe

Qualify will save the father of Russian democracy

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question