diff options
author | zuul <zuul@gerrit.asterisk.org> | 2016-04-29 12:13:57 -0500 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-04-29 12:13:57 -0500 |
commit | 72ee8c1bf9d2cd95f29ff0f79549aed1437f2815 (patch) | |
tree | fd390808a7ccdc264662f2235cee2a915c480456 /channels | |
parent | 1ce30f1fb5a28541935759953bfb3b0204d1304d (diff) | |
parent | 29bab0d1a4d6bbcdbf27fcff49b2e2262f65460e (diff) |
Merge "chan_sip: Make autocreated peers send PeerStatus events" into 13
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index cbbda4e73..7cc91486a 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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)) { |