diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 268e8f40f..58dde3adc 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -719,9 +719,9 @@ static int codec_compare(const PayloadType *a, const PayloadType *b){ int ra,rb; ra=find_codec_rank(a->mime_type); rb=find_codec_rank(b->mime_type); - if (ra==rb) return 0; if (ra>rb) return 1; if (raport!=0) result->payloads=match_payloads(local_offer->payloads,remote_answer->payloads); + result->proto=local_offer->proto; + result->type=local_offer->type; if (result->payloads && !only_telephone_event(result->payloads)){ strcpy(result->addr,remote_answer->addr); result->port=remote_answer->port; result->bandwidth=remote_answer->bandwidth; result->ptime=remote_answer->ptime; - result->proto=local_offer->proto; - result->type=local_offer->type; }else{ result->port=0; } @@ -100,13 +100,13 @@ static void initiate_incoming(const SalStreamDescription *local_cap, const SalStreamDescription *remote_offer, SalStreamDescription *result){ result->payloads=match_payloads(local_cap->payloads,remote_offer->payloads); + result->proto=local_cap->proto; + result->type=local_cap->type; if (result->payloads && !only_telephone_event(result->payloads)){ strcpy(result->addr,local_cap->addr); result->port=local_cap->port; result->bandwidth=local_cap->bandwidth; - result->ptime=local_cap->ptime; - result->proto=local_cap->proto; - result->type=local_cap->type; + result->ptime=local_cap->ptime; }else{ result->port=0; } @@ -157,6 +157,7 @@ int offer_answer_initiate_incoming(const SalMediaDescription *local_capabilities } } result->nstreams=j; + strcpy(result->username, local_capabilities->username); strcpy(result->addr,local_capabilities->addr); return 0; } diff --git a/coreapi/sal_eXosip2.c b/coreapi/sal_eXosip2.c index d3a6d224b..c4f00dac6 100644 --- a/coreapi/sal_eXosip2.c +++ b/coreapi/sal_eXosip2.c @@ -373,7 +373,10 @@ int sal_call_accept(SalOp * h){ if (h->supports_session_timers) osip_message_set_supported(msg, "timer"); } - if (contact) osip_message_set_contact(msg,contact); + if (contact) { + osip_list_special_free(&msg->contacts,(void (*)(void*))osip_contact_free); + osip_message_set_contact(msg,contact); + } if (h->base.local_media){ /*this is the case where we received an invite without SDP*/ @@ -536,6 +539,10 @@ static void handle_reinvite(Sal *sal, eXosip_event_t *ev){ if (op->base.root->session_expires!=0){ if (op->supports_session_timers) osip_message_set_supported(msg, "timer"); } + if (op->base.contact){ + osip_list_special_free(&msg->contacts,(void (*)(void*))osip_contact_free); + osip_message_set_contact(msg,op->base.contact); + } if (sdp){ op->sdp_offering=FALSE; op->base.remote_media=sal_media_description_new(); @@ -644,7 +651,6 @@ static void call_terminated(Sal *sal, eXosip_event_t *ev){ static void call_released(Sal *sal, eXosip_event_t *ev){ SalOp *op; - char *from; op=(SalOp*)ev->external_reference; if (op==NULL){ return; diff --git a/coreapi/sal_eXosip2_sdp.c b/coreapi/sal_eXosip2_sdp.c index 3dfde45d3..c1a1761cc 100644 --- a/coreapi/sal_eXosip2_sdp.c +++ b/coreapi/sal_eXosip2_sdp.c @@ -134,7 +134,7 @@ static void add_payload(sdp_message_t *msg, int line, const PayloadType *pt) { char attr[256]; sdp_message_m_payload_add (msg,line, int_2char (payload_type_get_number(pt))); - if (pt->type==PAYLOAD_AUDIO_CONTINUOUS || pt->type==PAYLOAD_AUDIO_PACKETIZED) + if (pt->channels>0) snprintf (attr,sizeof(attr),"%i %s/%i/%i", payload_type_get_number(pt), pt->mime_type, pt->clock_rate,pt->channels); else diff --git a/mediastreamer2 b/mediastreamer2 index ae7dfdcae..2e18cdfe5 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit ae7dfdcaea6d5fe6d4f44a6247b4ca506799e379 +Subproject commit 2e18cdfe53230763907f3f9b55adeb4c16d396a7 diff --git a/oRTP b/oRTP index 36773054c..0424a6538 160000 --- a/oRTP +++ b/oRTP @@ -1 +1 @@ -Subproject commit 36773054c1e9a47029432a2e8540161dad426293 +Subproject commit 0424a6538e1741e064c8d8573efee365b25593f1