mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
Merge "chan_sip: Make autocreated peers send PeerStatus events" into 13
This commit is contained in:
@@ -17669,6 +17669,10 @@ static enum check_auth_result register_verify(struct sip_pvt *p, struct ast_sock
|
||||
if (!peer && sip_cfg.autocreatepeer != AUTOPEERS_DISABLED) {
|
||||
/* Create peer if we have autocreate mode enabled */
|
||||
peer = temp_peer(name);
|
||||
if (peer && !(peer->endpoint = ast_endpoint_create("SIP", name))) {
|
||||
ao2_t_ref(peer, -1, "failed to allocate Stasis endpoint, drop peer");
|
||||
peer = NULL;
|
||||
}
|
||||
if (peer) {
|
||||
ao2_t_link(peers, peer, "link peer into peer table");
|
||||
if (!ast_sockaddr_isnull(&peer->addr)) {
|
||||
|
Reference in New Issue
Block a user