aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-03 16:42:19 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-03 16:42:19 +0000
commita8f62ca4cb8ed15486490c4eb9bd7fb091cf828c (patch)
treee42bbe7ce90afc39a72f39b30f16d16a447e64be /channels/chan_sip.c
parent050d974c979252f555969be4f6e740f2940b7266 (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.2@62987 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 59bc1e928..6f83a62e7 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);
}