osip_message_set_content_type(msg,"application/sdp");
osip_message_set_body(msg,call->sdpc->answerstr,strlen(call->sdpc->answerstr));
eXosip_call_send_answer(call->tid,200,msg);
- call->audio_stream=audio_stream_new(call->audio.localport,call->root->ipv6);
+ call->audio_stream=audio_stream_new(call->audio.localport,call->audio.localport+1,call->root->ipv6);
audio_stream_start_with_files(call->audio_stream, call->profile,
call->audio.remaddr,call->audio.remoteport,call->audio.remoteport+1,
call->audio.pt,20,hellofile,record_file);
static void add_local_endpoint(LinphoneConference *conf,LinphoneCore *lc){
/*create a dummy audiostream in order to extract the local part of it */
/* network address and ports have no meaning and are not used here. */
- AudioStream *st=audio_stream_new(65000,FALSE);
+ AudioStream *st=audio_stream_new(65000,65001,FALSE);
MSSndCard *playcard=lc->sound_conf.lsd_card ?
lc->sound_conf.lsd_card : lc->sound_conf.play_sndcard;
MSSndCard *captcard=lc->sound_conf.capt_sndcard;
/*set audio capabilities */
strncpy(md->streams[0].rtp_addr,call->localip,sizeof(md->streams[0].rtp_addr));
+ strncpy(md->streams[0].rtcp_addr,call->localip,sizeof(md->streams[0].rtcp_addr));
md->streams[0].rtp_port=call->audio_port;
+ md->streams[0].rtcp_port=call->audio_port+1;
md->streams[0].proto=(call->params.media_encryption == LinphoneMediaEncryptionSRTP) ?
SalProtoRtpSavp : SalProtoRtpAvp;
md->streams[0].type=SalAudio;
if (call->params.has_video){
md->nstreams++;
md->streams[1].rtp_port=call->video_port;
+ md->streams[1].rtcp_port=call->video_port+1;
md->streams[1].proto=md->streams[0].proto;
md->streams[1].type=SalVideo;
l=make_codec_list(lc,lc->codecs_conf.video_codecs,0,NULL);
AudioStream *audiostream;
IceSession *ice_session = sal_op_get_ice_session(call->op);
- call->audiostream=audiostream=audio_stream_new(md->streams[0].rtp_port,linphone_core_ipv6_enabled(lc));
+ call->audiostream=audiostream=audio_stream_new(md->streams[0].rtp_port,md->streams[0].rtcp_port,linphone_core_ipv6_enabled(lc));
if (linphone_core_echo_limiter_enabled(lc)){
const char *type=lp_config_get_string(lc->config,"sound","el_type","mic");
if (strcasecmp(type,"mic")==0)
if ((lc->video_conf.display || lc->video_conf.capture) && md->streams[1].rtp_port>0){
int video_recv_buf_size=lp_config_get_int(lc->config,"video","recv_buf_size",0);
- call->videostream=video_stream_new(md->streams[1].rtp_port,linphone_core_ipv6_enabled(lc));
+ call->videostream=video_stream_new(md->streams[1].rtp_port,md->streams[1].rtcp_port,linphone_core_ipv6_enabled(lc));
video_stream_enable_display_filter_auto_rotate(call->videostream, lp_config_get_int(lc->config,"video","display_filter_auto_rotate",0));
if (video_recv_buf_size>0) rtp_session_set_recv_buf_size(call->videostream->session,video_recv_buf_size);
call->audio_profile,
stream->rtp_addr[0]!='\0' ? stream->rtp_addr : call->resultdesc->addr,
stream->rtp_port,
- linphone_core_rtcp_enabled(lc) ? (stream->rtp_port+1) : 0,
+ linphone_core_rtcp_enabled(lc) ? (stream->rtcp_port) : 0,
used_pt,
jitt_comp,
playfile,
video_stream_set_device_rotation(call->videostream, lc->device_rotation);
video_stream_start(call->videostream,
call->video_profile, addr, vstream->rtp_port,
- linphone_core_rtcp_enabled(lc) ? (vstream->rtp_port+1) : 0,
+ linphone_core_rtcp_enabled(lc) ? (vstream->rtcp_port) : 0,
used_pt, lc->rtp_conf.audio_jitt_comp, cam);
video_stream_set_rtcp_information(call->videostream, cname,LINPHONE_RTCP_SDES_TOOL);
}
if (result->payloads && !only_telephone_event(result->payloads)){
strcpy(result->rtp_addr,remote_answer->rtp_addr);
+ strcpy(result->rtcp_addr,remote_answer->rtcp_addr);
result->rtp_port=remote_answer->rtp_port;
+ result->rtcp_port=remote_answer->rtcp_port;
result->bandwidth=remote_answer->bandwidth;
result->ptime=remote_answer->ptime;
}else{
result->dir=compute_dir_incoming(local_cap->dir,remote_offer->dir);
if (result->payloads && !only_telephone_event(result->payloads) && (remote_offer->rtp_port!=0 || remote_offer->rtp_port==SalStreamSendOnly)){
strcpy(result->rtp_addr,local_cap->rtp_addr);
+ strcpy(result->rtcp_addr,local_cap->rtcp_addr);
memcpy(result->candidates,local_cap->candidates,sizeof(result->candidates));
result->rtp_port=local_cap->rtp_port;
+ result->rtcp_port=local_cap->rtcp_port;
result->bandwidth=local_cap->bandwidth;
result->ptime=local_cap->ptime;
}else{
if (sd1->type!=sd2->type) return FALSE;
if (strcmp(sd1->rtp_addr,sd2->rtp_addr)!=0) return FALSE;
if (sd1->rtp_port!=sd2->rtp_port) return FALSE;
+ if (strcmp(sd1->rtcp_addr,sd2->rtcp_addr)!=0) return FALSE;
+ if (sd1->rtcp_port!=sd2->rtcp_port) return FALSE;
if (!payload_list_equals(sd1->payloads,sd2->payloads)) return FALSE;
if (sd1->bandwidth!=sd2->bandwidth) return FALSE;
if (sd1->ptime!=sd2->ptime) return FALSE;
for(i=0;i<h->result->nstreams;++i){
if (h->result->streams[i].rtp_port>0){
strcpy(h->result->streams[i].rtp_addr,h->base.remote_media->streams[i].rtp_addr);
+ strcpy(h->result->streams[i].rtcp_addr,h->base.remote_media->streams[i].rtcp_addr);
h->result->streams[i].ptime=h->base.remote_media->streams[i].ptime;
h->result->streams[i].bandwidth=h->base.remote_media->streams[i].bandwidth;
h->result->streams[i].rtp_port=h->base.remote_media->streams[i].rtp_port;
+ h->result->streams[i].rtcp_port=h->base.remote_media->streams[i].rtcp_port;
if (h->result->streams[i].proto == SalProtoRtpSavp) {
h->result->streams[i].crypto[0] = h->base.remote_media->streams[i].crypto[0];
switch(endpoint->protocol){\r
case MEDIA_RTP:\r
rtps = rtp_session_new(RTP_SESSION_RECVONLY);\r
- rtp_session_set_local_addr(rtps,"0.0.0.0",8000);\r
+ rtp_session_set_local_addr(rtps,"0.0.0.0",8000,8001);\r
rtp_session_set_scheduling_mode(rtps,0);\r
rtp_session_set_blocking_mode(rtps,0);\r
\r