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
1.2
Joshua Colp 19 years ago
parent 2102128500
commit 3a218f3a09

@ -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);
}

Loading…
Cancel
Save