Author: oej Date: Wed Aug 20 08:18:47 2014 New Revision: 421542 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=421542 Log: Something is preventing us from sending REGISTER to the port in the SRV record, and I'm going to catch that bug.
Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/README.pgtips-srv-records team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c team/oej/pgtips-srv-and-outbound-stuff-1.8/main/acl.c Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/README.pgtips-srv-records URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/README.pgtips-srv-records?view=diff&rev=421542&r1=421541&r2=421542 ============================================================================== --- team/oej/pgtips-srv-and-outbound-stuff-1.8/README.pgtips-srv-records (original) +++ team/oej/pgtips-srv-and-outbound-stuff-1.8/README.pgtips-srv-records Wed Aug 20 08:18:47 2014 @@ -94,9 +94,9 @@ How this works in combination with realtime is still to be explored. -Failover -======== -I see two situation for failover to the next host/ip in the SRV list: +Failover on outbound requests +============================= +I see two situations for failover to the next host/ip in the SRV list: - sip_xmit fails (no destination, icmp unreachable etc) - timeout on Timer B @@ -109,6 +109,14 @@ We do need a function in main/srv.c to switch to the next entry and move the "current" pointer. + +Registrations +============= +First time registration selects a working server. If no response +or a 5xx response, move to next server. (what to do with 3xx?) +Stay with that server until it fails, which means re-registrations +will stay on the same server. If server fails, restart with full +SRV list and try from the top until a working server is found. Realtime out of scope ===================== Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c?view=diff&rev=421542&r1=421541&r2=421542 ============================================================================== --- team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c (original) +++ team/oej/pgtips-srv-and-outbound-stuff-1.8/channels/chan_sip.c Wed Aug 20 08:18:47 2014 @@ -13837,7 +13837,7 @@ if (r->dnsmgr == NULL) { char transport[MAXHOSTNAMELEN]; peer = find_peer(r->hostname, NULL, TRUE, FINDPEERS, FALSE, 0); - snprintf(transport, sizeof(transport), "_%s._%s",get_srv_service(r->transport), get_srv_protocol(r->transport)); /* have to use static get_transport function */ + snprintf(transport, sizeof(transport), "_%s._%s", get_srv_service(r->transport), get_srv_protocol(r->transport)); /* have to use static get_transport function */ r->us.ss.ss_family = get_address_family_filter(r->transport); /* Filter address family */ /* No point in doing a DNS lookup of the register hostname if we're just going to @@ -13890,6 +13890,7 @@ /* Use port number specified if no SRV record was found */ if (!ast_sockaddr_isnull(&r->us)) { if (!ast_sockaddr_port(&r->us) && r->portno) { + ast_debug(3, " --- Changing port to %d from %d \n", r->portno, ast_sockaddr_port(&r->us)); ast_sockaddr_set_port(&r->us, r->portno); } @@ -13931,6 +13932,7 @@ if (!r->dnsmgr && r->portno) { ast_sockaddr_set_port(&p->sa, r->portno); ast_sockaddr_set_port(&p->recv, r->portno); + ast_debug(2, "Confusing code set port to %d\n", r->portno); } if (!ast_strlen_zero(p->fromdomain)) { portno = (p->fromdomainport) ? p->fromdomainport : STANDARD_SIP_PORT; Modified: team/oej/pgtips-srv-and-outbound-stuff-1.8/main/acl.c URL: http://svnview.digium.com/svn/asterisk/team/oej/pgtips-srv-and-outbound-stuff-1.8/main/acl.c?view=diff&rev=421542&r1=421541&r2=421542 ============================================================================== --- team/oej/pgtips-srv-and-outbound-stuff-1.8/main/acl.c (original) +++ team/oej/pgtips-srv-and-outbound-stuff-1.8/main/acl.c Wed Aug 20 08:18:47 2014 @@ -615,7 +615,7 @@ } } - ast_debug(3, "==> Resolving %s \n", hostname); + ast_debug(3, "==> Resolving %s Using port %d\n", hostname, tportno); if (resolve_first(addr, hostname, PARSE_PORT_FORBID, addr->ss.ss_family) != 0) { return -1; } -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits