diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index 80173e95d..8a7037491 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -475,6 +475,11 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t } else if (strcmp("OPTIONS",belle_sip_request_get_method(req))==0) { resp=sal_op_create_response_from_request(op,req,200); belle_sip_server_transaction_send_response(server_transaction,resp); + } else if (strcmp("CANCEL",belle_sip_request_get_method(req))==0) { + /*call leg does not exist because 200ok already sent*/ + belle_sip_server_transaction_send_response( server_transaction + ,sal_op_create_response_from_request(op,req,481)); + } else{ ms_error("unexpected method [%s] for dialog [%p]",belle_sip_request_get_method(req),op->dialog); unsupported_method(server_transaction,req); diff --git a/tester/presence_tester.c b/tester/presence_tester.c index d3d0f5fce..9f3f009f1 100644 --- a/tester/presence_tester.c +++ b/tester/presence_tester.c @@ -235,8 +235,8 @@ static void call_with_presence(void) { CU_ASSERT_TRUE(subscribe_to_callee_presence(pauline,marie)); CU_ASSERT_TRUE(call(marie,pauline)); - CU_ASSERT_EQUAL(marie->stat.number_of_LinphonePresenceActivityOnThePhone,1); - CU_ASSERT_EQUAL(pauline->stat.number_of_LinphonePresenceActivityOnThePhone,1); + CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&marie->stat.number_of_LinphonePresenceActivityOnThePhone,1)); + CU_ASSERT_TRUE(wait_for(marie->lc,pauline->lc,&pauline->stat.number_of_LinphonePresenceActivityOnThePhone,1)); reset_counters(&marie->stat); reset_counters(&pauline->stat);