]> sjero.net Git - linphone/blobdiff - coreapi/sal_eXosip2.c
Merge remote-tracking branch 'private/srtp'
[linphone] / coreapi / sal_eXosip2.c
index 772997b6b67b876bcb938ac3fe07b2494454b28d..5314bb28160b83b06ce7e4bbda891b710034fe30 100644 (file)
@@ -514,12 +514,18 @@ static void sdp_process(SalOp *h){
                 It should contains media parameters constraint from the remote offer, not our response*/
                strcpy(h->result->addr,h->base.remote_media->addr);
                h->result->bandwidth=h->base.remote_media->bandwidth;
+               
+               //remplacer la cle
                for(i=0;i<h->result->nstreams;++i){
                        if (h->result->streams[i].port>0){
                                strcpy(h->result->streams[i].addr,h->base.remote_media->streams[i].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].port=h->base.remote_media->streams[i].port;
+                               
+                               if (h->result->streams[i].proto == SalProtoRtpSavp) {
+                                       h->result->streams[i].crypto[0] = h->base.remote_media->streams[i].crypto[0]; 
+                               }
                        }
                }
        }
@@ -546,6 +552,9 @@ int sal_call(SalOp *h, const char *from, const char *to){
        sal_op_set_from(h,from);
        sal_op_set_to(h,to);
        sal_exosip_fix_route(h);
+       
+       h->terminated = FALSE;
+
        route = sal_op_get_route(h);
        err=eXosip_call_build_initial_invite(&invite,to,from,route,"Phone call");
        if (err!=0){