mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-18 11:38:08 +00:00
fix OPTION to be OPTIONS
add allow header in 200Ok for INVITE
This commit is contained in:
parent
f7d031a6e9
commit
5e8f0d1ca3
2 changed files with 11 additions and 5 deletions
|
|
@ -523,10 +523,15 @@ int sal_call_set_local_media_description(SalOp *op, SalMediaDescription *desc){
|
|||
op->base.local_media=desc;
|
||||
return 0;
|
||||
}
|
||||
static void sal_op_fill_invite(SalOp *op, belle_sip_request_t* invite) {
|
||||
|
||||
static belle_sip_header_allow_t *create_allow(){
|
||||
belle_sip_header_allow_t* header_allow;
|
||||
header_allow = belle_sip_header_allow_create("INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO");
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(invite),BELLE_SIP_HEADER(header_allow));
|
||||
header_allow = belle_sip_header_allow_create("INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO");
|
||||
return header_allow;
|
||||
}
|
||||
|
||||
static void sal_op_fill_invite(SalOp *op, belle_sip_request_t* invite) {
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(invite),BELLE_SIP_HEADER(create_allow()));
|
||||
|
||||
if (op->base.root->session_expires!=0){
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(invite),belle_sip_header_create( "Session-expires", "200"));
|
||||
|
|
@ -630,6 +635,7 @@ int sal_call_accept(SalOp*h){
|
|||
ms_error("Fail to build answer for call");
|
||||
return -1;
|
||||
}
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(response),BELLE_SIP_HEADER(create_allow()));
|
||||
if (h->base.root->session_expires!=0){
|
||||
if (h->supports_session_timers) {
|
||||
belle_sip_message_add_header(BELLE_SIP_MESSAGE(response),belle_sip_header_create( "Supported", "timer"));
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ belle_sip_response_t *sal_op_create_response_from_request(SalOp *op, belle_sip_r
|
|||
int sal_ping(SalOp *op, const char *from, const char *to){
|
||||
sal_op_set_from(op,from);
|
||||
sal_op_set_to(op,to);
|
||||
return sal_op_send_request(op,sal_op_build_request(op,"OPTION"));
|
||||
return sal_op_send_request(op,sal_op_build_request(op,"OPTIONS"));
|
||||
}
|
||||
|
||||
void sal_op_set_remote_ua(SalOp*op,belle_sip_message_t* message) {
|
||||
|
|
@ -241,7 +241,7 @@ int sal_op_send_request(SalOp* op, belle_sip_request_t* request) {
|
|||
if (strcmp(belle_sip_request_get_method(request),"INVITE")==0
|
||||
||strcmp(belle_sip_request_get_method(request),"REGISTER")==0
|
||||
||strcmp(belle_sip_request_get_method(request),"SUBSCRIBE")==0
|
||||
||strcmp(belle_sip_request_get_method(request),"OPTION")==0)
|
||||
||strcmp(belle_sip_request_get_method(request),"OPTIONS")==0)
|
||||
need_contact=TRUE;
|
||||
|
||||
return _sal_op_send_request_with_contact(op, request,need_contact);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue