]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 62987 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Thu, 3 May 2007 16:44:00 +0000 (16:44 +0000)
committerJoshua Colp <jcolp@digium.com>
Thu, 3 May 2007 16:44:00 +0000 (16:44 +0000)
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

channels/chan_sip.c

index 76680311747dc8e343ab1ecea1a67a4e21a3d1a4..78d2ecd5f87c067501904ccb09ab82c1c42b8586 100644 (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++;