How to get SIP OPTIONS response in Asterisk Dialplan

Hello Team,

I’m struggling with How to received SIP OPTIONS response in Asterisk Dialplan

I want to connect other Asterisk (PBX) or SIP Trunk Machine via Dial function but before that I want to check that Machine is reachable or not for that we need to add SIP OPTIONS in dialplan , Is this feasible ?
Please advice

OPTIONS doesn’t exist or occur in dialplan. It occurs in either chan_sip or chan_pjsip, and has to be enabled on the peer in chan_sip or AOR in chan_pjsip.

@jcolp How we can integrated in Asterisk DialPlan , I checked many blogs but couldn’t get the right syntax.
Can you help me a bit to get the SIP Trunk status before dialing via Dial() function.
How we can use chan_sip in dialplan

The evaluation of the OPTIONS responses is encoded in the DEVICE_STATE, although you don’t really need to use this, as Dial will return an immediate failure. (However, a success with OPTIONS doesn’t guarantee that the network won’t fail before Dial gets a response.)

You wouldn’t want to use an on demand OPTIONS to test connectivity as it will take a long to return a definitive result as actually attempting the call.

Also note that OPTIONS is being repurposed for this. It is used because it is an out of dialogue transaction that doesn’t modify the recipient (from the point of view of the SIP RFC, although the recipient might use it to infer connectivity).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.