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 (ra<rb) return -1;
+ return 0;
}
static MSList *add_missing_codecs(SalStreamType mtype, MSList *l){
linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on");
linphone_core_assign_payload_type(&payload_type_speex_wb,111,"vbr=on");
linphone_core_assign_payload_type(&payload_type_speex_uwb,112,"vbr=on");
- linphone_core_assign_payload_type(&payload_type_telephone_event,101,NULL);
+ linphone_core_assign_payload_type(&payload_type_telephone_event,101,"0-11");
linphone_core_assign_payload_type(&payload_type_ilbc,113,"mode=30");
#ifdef ENABLE_NONSTANDARD_GSM
SalStreamDescription *result){
if (remote_answer->port!=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;
}
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;
}
}
}
result->nstreams=j;
+ strcpy(result->username, local_capabilities->username);
strcpy(result->addr,local_capabilities->addr);
return 0;
}
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*/
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();
static void call_released(Sal *sal, eXosip_event_t *ev){
SalOp *op;
- char *from;
op=(SalOp*)ev->external_reference;
if (op==NULL){
return;
{
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
-Subproject commit ae7dfdcaea6d5fe6d4f44a6247b4ca506799e379
+Subproject commit 2e18cdfe53230763907f3f9b55adeb4c16d396a7
-Subproject commit 36773054c1e9a47029432a2e8540161dad426293
+Subproject commit 0424a6538e1741e064c8d8573efee365b25593f1