]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
send full contact when poking a peer (bug #2836)
authorRussell Bryant <russell@russellbryant.com>
Fri, 12 Nov 2004 14:34:01 +0000 (14:34 +0000)
committerRussell Bryant <russell@russellbryant.com>
Fri, 12 Nov 2004 14:34:01 +0000 (14:34 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4227 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index c19a6cad67b1633d7f69b5cf92ae6e06d595963c..6de0633cc900fe210cad8961971fd2c1e3bb14fb 100755 (executable)
@@ -4546,7 +4546,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;
@@ -7921,6 +7921,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;
@@ -7946,6 +7948,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