Specify "allow methods" in OPTIONS response with PJSIP channels

Hi everyone,

I have an asterisk configuration that uses PJSIP channels.

For my application, asterisk should reply to OPTIONS requests coming from certain endpoints with only the following methods in the header “Allow”:

  • INVITE
  • ACK
  • CANCEL
  • BYE
  • OPTIONS
  • PRACK
  • UPDATE
  • INFO

But not the methods:

  • SUBSCRIBE
  • REFER
  • MESSAGE
  • NOTIFY
  • REGISTER

Is there a way (ideally by configuration) to get that behavior? Please note that asterisk should be able to send different “allow methods” to different endpoints.

I think I need something like the configuration variable disallowed_methods you could put in sip.conf, only I need it for PJSIP channels.

Thank you very much.

There is no ability to do this as of right now. Code would have to be added for such a thing, and it’d require a little bit of work due to the way that the header is stored (there is one header for all of PJSIP for that - you’d have to take that, manipulate a copy, and place it in the OPTIONS response).

They might want to deny thoes methods everywhere.

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