diff options
author | Mark Spencer <markster@digium.com> | 2004-11-11 20:13:22 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2004-11-11 20:13:22 +0000 |
commit | 7563b0ab7d7a4e4ba4536303ad2b4d925e4c48ce (patch) | |
tree | ce606f2f47a633d651f1a449e11fcbe566c327d5 | |
parent | a17779bba800d3768be4a67e231b34fd93352efd (diff) |
SIP fix for full contact in OPTIONS (bug #2836)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rwxr-xr-x | channels/chan_sip.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a16dfea2c..2f512b68f 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4462,7 +4462,7 @@ static void list_route(struct sip_route *route) } } -/*--- build_route: Build route headers ---*/ +/*--- build_route: Build route list from Record-Route header ---*/ static void build_route(struct sip_pvt *p, struct sip_request *req, int backwards) { struct sip_route *thishop, *head, *tail; @@ -7891,6 +7891,8 @@ static int sip_poke_noanswer(void *data) } /*--- sip_poke_peer: Check availability of peer, also keep NAT open ---*/ +/* This is done with the interval in qualify= option in sip.conf */ +/* Default is 2 seconds */ static int sip_poke_peer(struct sip_peer *peer) { struct sip_pvt *p; @@ -7916,6 +7918,12 @@ static int sip_poke_peer(struct sip_peer *peer) } memcpy(&p->sa, &peer->addr, sizeof(p->sa)); memcpy(&p->recv, &peer->addr, sizeof(p->sa)); + + /* Send options to peer's fullcontact */ + if (!ast_strlen_zero(peer->fullcontact)) { + strncpy (p->fullcontact, peer->fullcontact, sizeof(p->fullcontact)); + } + if (!ast_strlen_zero(p->tohost)) strncpy(p->tohost, peer->tohost, sizeof(p->tohost) - 1); else |