From: Joshua Colp Date: Thu, 3 May 2007 16:42:19 +0000 (+0000) Subject: When a peer is seeded or built tell the devicestate core to update it's status. This... X-Git-Tag: 1.2.19~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a218f3a09697e1abb064eacb789cb7e449ee833;p=thirdparty%2Fasterisk.git When a peer is seeded or built tell the devicestate core to update it's status. This is easier then having chan_sip load before pbx_config. (issue #9658 reported by dlynes) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@62987 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 59bc1e9285..6f83a62e73 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5947,6 +5947,7 @@ static void reg_source_db(struct sip_peer *peer) ast_sched_del(sched, peer->expire); peer->expire = ast_sched_add(sched, (expiry + 10) * 1000, expire_register, peer); register_peer_exten(peer, 1); + ast_device_state_changed("SIP/%s", peer->name); } /*! \brief parse_ok_contact: Parse contact header for 200 OK on INVITE ---*/ @@ -12976,6 +12977,7 @@ static int reload_config(void) if (!strcasecmp(utype, "peer") || !strcasecmp(utype, "friend")) { peer = build_peer(cat, ast_variable_browse(cfg, cat), 0); if (peer) { + ast_device_state_changed("SIP/%s", peer->name); ASTOBJ_CONTAINER_LINK(&peerl,peer); ASTOBJ_UNREF(peer, sip_destroy_peer); }