[Asterisk-cvs] asterisk/channels chan_sip.c,1.510.2.16,1.510.2.17

russell at lists.digium.com russell at lists.digium.com
Fri Nov 12 09:32:48 CST 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv9597/channels

Modified Files:
      Tag: v1-0
	chan_sip.c 
Log Message:
send full contact when poking a peer (bug #2836)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.510.2.16
retrieving revision 1.510.2.17
diff -u -d -r1.510.2.16 -r1.510.2.17
--- chan_sip.c	9 Nov 2004 05:28:47 -0000	1.510.2.16
+++ chan_sip.c	12 Nov 2004 14:34:01 -0000	1.510.2.17
@@ -4546,7 +4546,7 @@
 	}
 }
 
-/*--- 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 @@
 }
 
 /*--- 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 @@
 	}
 	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




More information about the svn-commits mailing list