MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / is_3263_failure

Function is_3263_failure

modules/tm/t_reply.c:660–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658
659
660static inline int is_3263_failure(struct cell *t)
661{
662 struct ua_client* uac = & TM_BRANCH( t, picked_branch);
663
664 /* is is a DNS failover scenario? - according to RFC 3263
665 * and RFC 3261, this means 503 reply with Retr-After hdr
666 * or timeout with no reply */
667 LM_DBG("dns-failover test: branch=%d, last_recv=%d, flags=%X\n",
668 picked_branch, uac->last_received, uac->flags);
669
670 switch (uac->last_received) {
671 case 408:
672 return ((uac->flags&T_UAC_HAS_RECV_REPLY)==0);
673 case 503:
674 if (uac->reply==NULL || uac->reply==FAKED_REPLY)
675 return 0;
676 /* we do not care about the Retry-After header in 503
677 * as following discussion on sip-implementers list :
678 * with or without a RA header, a 503 should fire DNS
679 * based failover - bogdan
680 */
681 return 1;
682 }
683 return 0;
684}
685
686
687static inline int do_dns_failover(struct cell *t)

Callers 1

t_should_relay_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected