[HELP] trunk failover for PJSIP

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

[HELP] trunk failover for PJSIP

Postby boucher820 » Thu Jan 28, 2016 3:54 pm

I have two UDP PJSIP channels (unregistered private trunks) that I am trying to configure failover between. The scenario I’m trying to solve for is loss of data connectivity.

In a very simple configuration:

[from-internal]
exten => _X!,1,Dial(PJSIP/${EXTEN}@endpoint-0,3)
same => n,Dial(PJSIP/${EXTEN}@endpoint-1,120)

My issue is that if I do not configure a timeout for the dial application the call will have dead air for about 30 seconds before it tries the next priority. This is unacceptable for end users as they will not wait that long. If I do set a short timeout calls don't have enough time to ring/answer.

I'd like to configure UDP timeout for 2 or 3 seconds but have the call (ring/answer) timeout to 120 seconds. Is there a configuration somewhere for UDP timeout?

My original plan was to configure SIP OPTIONS and check the status of the channel before dialing similar to:
viewtopic.php?f=13&t=83760
However for an unregistered trunk I wasn't able to find a way to turn on OPTIONS heartbeats in PJSIP and get the status of the trunk within dialplan. Is this fucntionality available in PJSIP similar to chan_sip?

I appreciate any assistance.
boucher820
Newsterisk
 
Posts: 3
Joined: Sun Aug 08, 2010 12:03 pm

Re: [HELP] trunk failover for PJSIP

Postby jcolp » Mon Feb 01, 2016 2:45 pm

There is no such thing as a "UDP timeout". As for using SIP OPTIONS that is what people do, and you don't need to check before dialing. The act of dialing will check the status and if the other side is unreachable the dial will immediately fail.
Joshua Colp
Digium, Inc. | Senior Software Developer
jcolp
Oldsterisk
 
Posts: 248
Joined: Tue May 19, 2015 6:59 am


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 20 guests