From 5a5b0be411925561079af92508c8eba092c6ce00 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Wed, 27 Feb 2008 16:26:57 +0000 Subject: [PATCH] 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: https://origsvn.digium.com/svn/asterisk/trunk@104539 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index d6e4272650..a70dc4cf78 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++;