Skip to content

Commit

Permalink
Add SIP guide about how to implement DNS SRV failover (from trac FAQ).
Browse files Browse the repository at this point in the history
  • Loading branch information
nanangizz committed Jul 12, 2023
1 parent 840c2b9 commit d5e5c00
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/source/specific-guides/sip/dns_failover.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Implement DNS SRV failover
=========================================
Our DNS SRV failover support is only limited to TCP (or TLS)
:cpp:any:`connect()` failure, which in this case pjsip will automatically
retries the next server. But even then, there is no mechanism to flag that
a server has been failing, which means that the next request may try
the same server again and triggering the failover again.

What we've been suggesting is to implement the failover mechanism in the
application layer. In this case, the application queries the list of available
servers either with :cpp:any:`gethostbyname()`, DNS SRV, or by other means.
It then specifies which server to use by putting the IP address as
proxy parameter (i.e. Route header) in the account config. The mechanism to
test the wellness of a server and when to initiate the failover is totally
controlled by the application. The application can change which server to
use by changing the account proxy setting with :cpp:any:`pjsua_acc_modify()`.

0 comments on commit d5e5c00

Please sign in to comment.