aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 16:26:57 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-27 16:26:57 +0000
commit476ca709d6e0142fca142bee5380fc5b9ba0403c (patch)
treeab449aba126d8a5ec10d49e915c9460b893ee42c /channels
parentcef3c952a97b224a5d5fa894699813e2f30d0f70 (diff)
When queueing up a device state change when the peer is loaded from the configuration give it a state of not in use. We have to do this because the channel technology may not yet be registered so the state could not be queried and would be considered invalid.
(closes issue #12087) Reported by: liorm git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104539 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index d6e427265..a70dc4cf7 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -20527,7 +20527,7 @@ static int reload_config(enum channelreloadreason reason)
}
peer = build_peer(cat, gen, ast_variable_browse(ucfg, cat), 0);
if (peer) {
- ast_device_state_changed("SIP/%s", peer->name);
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, "SIP/%s", peer->name);
ASTOBJ_CONTAINER_LINK(&peerl, peer);
unref_peer(peer);
peer_count++;
@@ -20596,6 +20596,7 @@ static int reload_config(enum channelreloadreason reason)
if (is_peer) {
peer = build_peer(cat, ast_variable_browse(cfg, cat), NULL, 0);
if (peer) {
+ ast_devstate_changed(AST_DEVICE_NOT_INUSE, "SIP/%s", peer->name);
ASTOBJ_CONTAINER_LINK(&peerl, peer);
unref_peer(peer);
peer_count++;