Is your feature request related to a problem? Please describe.
when using uac_registrant to make opensips as UAC,
UAS may do a OPTIONS ping like #2165.
the options's RURI is UAC's contact which has user part.
but in options module
options_reply can't process OPTIONS request with username
This function checks if the request method is OPTIONS and if the request URI does not contain an username. If both is true the request will be answered stateless with “200 OK” and the capabilities from the modules parameters.
It sends “500 Server Internal Error” for some errors and returns false if it is called for a wrong request.
OPTIONS sip:4376000@192.168.0.1:35080 SIP/2.0
Via: SIP/2.0/UDP 1.2.3.4:5060;branch=z9hG4bK0597aafb;rport
Max-Forwards: 70
From: "NBX2000" <sip:NBX2000@1.2.3.4>;tag=as688a3a73
To: <sip:4376000@192.168.0.1:35080>
Contact: <sip:NBX2000@1.2.3.4:5060>
Call-ID: 747e92d8047cb03e48d1d46414f8b995@1.2.3.4:5060
CSeq: 102 OPTIONS
User-Agent: NBX2000
Date: Tue, 19 Sep 2023 15:08:37 GMT
Session-Expires: 1800
Min-SE: 90
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0
Describe the solution you'd like
uac_registrant module: provide a function like 'uac_is_self' to judge if RURI is belong myself
options module: add a flag to options_reply, to reply options reggardless of username
if (is_method("OPTIONS")) {
if(uac_is_self($ru) {
options_reply(FLAG_IGNORE_USERNAME);
} else if (is_self_other_judge($rd)) {
options_reply();
}
}
Implementation
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
when using uac_registrant to make opensips as UAC,
UAS may do a OPTIONS ping like #2165.
the options's RURI is UAC's contact which has user part.
but in options module
options_replycan't process OPTIONS request with usernameDescribe the solution you'd like
uac_registrantmodule: provide a function like 'uac_is_self' to judge if RURI is belong myselfoptionsmodule: add a flag tooptions_reply, to reply options reggardless of usernameImplementation
Describe alternatives you've considered
Additional context