[asterisk-commits] file: trunk r104539 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Feb 27 10:26:57 CST 2008
Author: file
Date: Wed Feb 27 10:26:57 2008
New Revision: 104539
URL: http://svn.digium.com/view/asterisk?view=rev&rev=104539
Log:
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
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=104539&r1=104538&r2=104539
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Feb 27 10:26:57 2008
@@ -20527,7 +20527,7 @@
}
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 @@
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++;
More information about the asterisk-commits
mailing list