Commit af18f729 authored by jehan's avatar jehan
Browse files

replace belle_aip_header_extension by belle_sip_header

parent 1c5111a3
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment