Merged revisions 62987 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62987 | file | 2007-05-03 13:42:19 -0300 (Thu, 03 May 2007) | 2 lines

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.4@62989 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Joshua Colp
2007-05-03 16:44:00 +00:00
parent 9c638b6507
commit 95de3fbf0c
+2
View File
@@ -7661,6 +7661,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, TRUE);
ast_device_state_changed("SIP/%s", peer->name);
}
/*! \brief Save contact header for 200 OK on INVITE */
@@ -16564,6 +16565,7 @@ static int reload_config(enum channelreloadreason reason)
if (ast_true(hassip) || (!hassip && genhassip)) {
peer = build_peer(cat, gen, ast_variable_browse(ucfg, cat), 0);
if (peer) {
ast_device_state_changed("SIP/%s", peer->name);
ASTOBJ_CONTAINER_LINK(&peerl,peer);
ASTOBJ_UNREF(peer, sip_destroy_peer);
peer_count++;