Asterisk must reply keep alives

Hi all
I have some doubts about how Asterisk work about keep alives messages, but I’m looking information about how Asterisk reply this messages that are send from Sip Trunk Service Provider. My provider have 2 options, the first one is using “SIP OPTIONS”, for this, i need to reply a “200 OK”, the second option is using “SIP INFO”, for this message i need to reply anything, just reply something to softswitch.
I have read a lot of info, but almost all of it is about how Asterisk send this keep alive messages to sip phones or equipment registered in Asterisk, but almost none about how Asterisk must reply this messages (maybe the problem is I’m not making the right question to search).

Ani ideas how can I do this? I have an equipment with Asterisk 1.8 and another one with 1.6, could i make work both?

Thanks a lot for your time and attention.

Best regards

Use INFO, as Asterisk will only reply 200 to OPTIONS if the URI matches an entry in the dial plan. Otherwise it will respond 404.

Thanks for your answer david55, the problem here is, how can i make to reply an info as keepalive?

Send it INFO!

It will respond to all SIP requests with valid Contact headers, if only to say that it doesn’t understand them. I said INFO because you were happy with any response, whereas you wanted 200 for OPTIONS.