diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 29f65c91b74b1e7ac2298fe7fad1ebca3678d485..30e69012dc9b66c740ef1a344cbd8a6af47ac44c 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -786,7 +786,7 @@ SalCustomHeader *sal_custom_header_append(SalCustomHeader *ch, const char *name, msg=(belle_sip_message_t*)belle_sip_request_new(); belle_sip_object_ref(msg); } - h=BELLE_SIP_HEADER(belle_sip_header_extension_parse(tmp)); + h=belle_sip_header_parse(tmp); ms_free(tmp); if (h==NULL){ belle_sip_error("Fail to parse extension header."); @@ -801,11 +801,7 @@ const char *sal_custom_header_find(const SalCustomHeader *ch, const char *name){ belle_sip_header_t *h=belle_sip_message_get_header((belle_sip_message_t*)ch,name); if (h){ - if (BELLE_SIP_OBJECT_IS_INSTANCE_OF(h,belle_sip_header_extension_t)){ - return belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(h)); - }else{ - return belle_sip_header_get_unparsed_value(h); - } + return belle_sip_header_get_unparsed_value(h); } } return NULL; diff --git a/coreapi/bellesip_sal/sal_op_call.c b/coreapi/bellesip_sal/sal_op_call.c index 0aaec05122d6c345789ad3e85077f87653570379..7fe5982c79577af837ca280e2020eaf4f19897e9 100644 --- a/coreapi/bellesip_sal/sal_op_call.c +++ b/coreapi/bellesip_sal/sal_op_call.c @@ -44,7 +44,7 @@ static void call_set_error(SalOp* op,belle_sip_response_t* response){ char* reason=(char*)belle_sip_response_get_reason_phrase(response); int code = belle_sip_response_get_status_code(response); if (reason_header){ - reason = ms_strdup_printf("%s %s",reason,belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(reason_header))); + reason = ms_strdup_printf("%s %s",reason,belle_sip_header_get_unparsed_value(reason_header)); } sal_compute_sal_errors_from_code(code,&error,&sr); op->base.root->callbacks.call_failure(op,error,sr,reason,code); @@ -424,7 +424,7 @@ static void process_request_event(void *op_base, const belle_sip_request_event_t process_sdp_for_invite(op,req); if ((call_info=belle_sip_message_get_header(BELLE_SIP_MESSAGE(req),"Call-Info"))) { - if( strstr(belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(call_info)),"answer-after=") != NULL) { + if( strstr(belle_sip_header_get_unparsed_value(call_info),"answer-after=") != NULL) { op->auto_answer_asked=TRUE; ms_message("The caller asked to automatically answer the call(Emergency?)\n"); } @@ -662,9 +662,8 @@ int sal_call_notify_ringing(SalOp *op, bool_t early_media){ if (require) tags=belle_sip_header_get_unparsed_value(require); /* if client requires 100rel, then add necessary stuff*/ if (tags && strstr(tags,"100rel")!=0) { - - belle_sip_message_add_header((belle_sip_message_t*)ringing_response,BELLE_SIP_HEADER(belle_sip_header_extension_create("Require","100rel"))); - belle_sip_message_add_header((belle_sip_message_t*)ringing_response,BELLE_SIP_HEADER(belle_sip_header_extension_create("RSeq","1"))); + belle_sip_message_add_header((belle_sip_message_t*)ringing_response,belle_sip_header_create("Require","100rel")); + belle_sip_message_add_header((belle_sip_message_t*)ringing_response,belle_sip_header_create("RSeq","1")); } #ifndef SAL_OP_CALL_FORCE_CONTACT_IN_RINGING diff --git a/coreapi/bellesip_sal/sal_op_call_transfer.c b/coreapi/bellesip_sal/sal_op_call_transfer.c index 0fad03e8379dc8d788d6978c3b7ff5cac24f4d41..796966acdfb050fdc0239a88fd4890716e45bb57 100644 --- a/coreapi/bellesip_sal/sal_op_call_transfer.c +++ b/coreapi/bellesip_sal/sal_op_call_transfer.c @@ -223,7 +223,7 @@ void sal_op_call_process_notify(SalOp *op, const belle_sip_request_event_t *even ms_message("Receiving NOTIFY request on op [%p]",op); if (header_event - && strncasecmp(belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(header_event)),"refer",strlen("refer"))==0 + && strncasecmp(belle_sip_header_get_unparsed_value(header_event),"refer",strlen("refer"))==0 && content_type && strcmp(belle_sip_header_content_type_get_type(content_type),"message")==0 && strcmp(belle_sip_header_content_type_get_subtype(content_type),"sipfrag")==0 diff --git a/coreapi/bellesip_sal/sal_op_impl.c b/coreapi/bellesip_sal/sal_op_impl.c index 4e2f0802feab0d6c77efe28dd2ed157a19e103d7..cade0785402fc37ca9e818c97d51c64c98392347 100644 --- a/coreapi/bellesip_sal/sal_op_impl.c +++ b/coreapi/bellesip_sal/sal_op_impl.c @@ -462,7 +462,7 @@ bool_t sal_compute_sal_errors(belle_sip_response_t* response,SalError* sal_err,S ,reason_size ,"%s %s" ,belle_sip_response_get_reason_phrase(response) - ,belle_sip_header_extension_get_value(BELLE_SIP_HEADER_EXTENSION(reason_header))); + ,belle_sip_header_get_unparsed_value(reason_header)); } else { strncpy(reason,belle_sip_response_get_reason_phrase(response),reason_size); }