From b5a6d4a2c63176a10c6f78990ecb2949f0ae2c4e Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 22 Jan 2014 18:03:23 +0100 Subject: [PATCH] implement custom headers sending in 200Ok --- coreapi/bellesip_sal/sal_impl.h | 2 ++ coreapi/bellesip_sal/sal_op_call.c | 2 ++ coreapi/bellesip_sal/sal_op_impl.c | 2 +- coreapi/linphonecore.c | 1 + oRTP | 2 +- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/coreapi/bellesip_sal/sal_impl.h b/coreapi/bellesip_sal/sal_impl.h index 4ae34095b..aa68feecc 100644 --- a/coreapi/bellesip_sal/sal_impl.h +++ b/coreapi/bellesip_sal/sal_impl.h @@ -159,4 +159,6 @@ SalReason sal_reason_to_sip_code(SalReason r); belle_sip_header_t * sal_make_supported_header(Sal *sal); +void _sal_op_add_custom_headers(SalOp *op, belle_sip_message_t *msg); + #endif /* SAL_IMPL_H_ */ diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index e6c7229f4..0aaec0512 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -709,6 +709,8 @@ int sal_call_accept(SalOp*h){ if ((contact_header=sal_op_create_contact(h))) { belle_sip_message_add_header(BELLE_SIP_MESSAGE(response),BELLE_SIP_HEADER(contact_header)); } + + _sal_op_add_custom_headers(h, BELLE_SIP_MESSAGE(response)); handle_offer_answer_response(h,response); diff --git a/coreapi/bellesip_sal/sal_op_impl.c b/coreapi/bellesip_sal/sal_op_impl.c index c62f7d441..70072d1f5 100644 --- a/coreapi/bellesip_sal/sal_op_impl.c +++ b/coreapi/bellesip_sal/sal_op_impl.c @@ -210,7 +210,7 @@ static void add_headers(belle_sip_header_t *h, belle_sip_message_t *msg){ belle_sip_message_add_header(msg,h); } -static void _sal_op_add_custom_headers(SalOp *op, belle_sip_message_t *msg){ +void _sal_op_add_custom_headers(SalOp *op, belle_sip_message_t *msg){ if (op->base.sent_custom_headers){ belle_sip_message_t *ch=(belle_sip_message_t*)op->base.sent_custom_headers; belle_sip_list_t *l=belle_sip_message_get_all_headers(ch); diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index deb4a8161..f49ae5bc4 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -3303,6 +3303,7 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call, if (md) call->params.has_video &= linphone_core_media_description_contains_video_stream(md); linphone_call_make_local_media_description(lc,call); sal_call_set_local_media_description(call->op,call->localdesc); + sal_op_set_sent_custom_header(call->op,params->custom_headers); } if (call->audiostream==NULL) diff --git a/oRTP b/oRTP index b04994f1d..d7b4d285d 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit b04994f1d4f00d802fef64a665f0b77db4d98dee +Subproject commit d7b4d285d8174566c16c600a9e61abed04cb8789