[asterisk-commits] file: branch 1.2 r62987 - /branches/1.2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu May 3 09:42:19 MST 2007


Author: file
Date: Thu May  3 11:42:19 2007
New Revision: 62987

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62987
Log:
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)

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?view=diff&rev=62987&r1=62986&r2=62987
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Thu May  3 11:42:19 2007
@@ -5947,6 +5947,7 @@
 		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 @@
 				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);
 					}



More information about the asterisk-commits mailing list