PJSIP IP Authenticate Redundancy

Multiple Voip Providers with IP Authentication provides me with two IPs for redundancy and I’m not sure if I’m adding them property in my PJSIP.conf.
I tried testing the code below and it doesn’t appears to work as expected.
I tried providing a non working IP and it doesn’t automatically go to the correct working IP in case the first fail.
Is this a design or must I create a 2nd context all together?




You can’t specify two from_domain. If you need them to be different you’d have to create a different endpoint. You CAN specify two contact on an AOR, but in order to know which are down you need to turn on qualify.

Could you elaborate more on the aor parameter qualify=yes for pjsip.conf?
I tried googling it and it’s vague. What’s the purpose of providing two aor?
I thought it was for redundancy.

If you enable qualify and use a recent version of Asterisk it can potentially be used for it. The qualify_frequency option specifies how often PJSIP should send an OPTIONS request to the contact. If the contact responds then it is reachable. IF it doesn’t then it is unreachable.

I’m sorry I’m so confused. Can you provide me of an example of pjsip.conf with aor using qualify and qualify_freq so I can see how it should be set and used in a redundancy scenario.

I’m not aware of anyone using it for redundancy purposes, as traditionally this is done using SRV records in SIP. I’m merely saying I think it can be done if qualify is in use. It’s really not that complicated, you just need to add a “qualify_frequency” option to the AOR.


Thanks! Is there a Best Practice method use for redundancy?
In case of one voip with multiple IPs or multiple voip providers?

Generally it’s an endpoint+AOR per target with qualify. Then in dialplan you can know to try another based on DIALSTATUS.