SIP QUALIFY message from dialplan

Hi All,
I need to send OPTIONS message to SIP peer, from dialplan, before calling peer or sending SIP MESSAGE. This is to know for shore that peer available right now.
I know that there is CLI command : SIP QUALIFY PEER , and it is doing exactly what I need, but I can’t read return result. There is no way to know did peer replay or not.
So question is: how can I send OPTIONS message to peer and read respond.
It could be from dialplan, or AMI, or terminla command.

Thank you


I assume you mean a null OPTIONS request.

I don’t think it will tell you that they are not there any faster than actually sending the INVITE or MESSAGE, and they could go away between OPTIONS and the actual request.

Hi David,
Thank you for correcting, Yes, I mean OPTIONS.

I need to have guaranteed delivery of SIP MESSAGE , but I can’t see any options to do it.
In my case peer - is a mobile phone with sip application, and it can change IP address, or completely disappear at any time. But asterisk will think peer still online until it send next qualify ping and will not get respont.
I am trying to find way to get confirmation of delivery, or at least big chance of it.

There is nothing built in to do guaranteed delivery of MESSAGE requests.

oh well too late…

The MESSAGE_SEND_STATUS variable should tell you if the SIP MESSAGE failed or not.

Real SIP PEER, will send back to Asterisk confirmation, but there is no way to read/check it from dialplan…