Hi, I changed the code to adjust it into my case to this: if (call_info.state == PJSIP_INV_STATE_CONFIRMED) { pjmedia_session *si = pjsua_call_get_media_session(call_id); const pjmedia_sdp_session *remote_sdp; const pjmedia_sdp_session *local_sdp; pj_status_t status; pjsua_call *call; pjsip_dialog *dlg; // char *lvlcip; char *rvlcip; // int lvlcport; int rvlcport; status = acquire_call("on_call_state()", call_id, &call, &dlg); if (status != PJ_SUCCESS){ printf("acquire call edemedik\n\n"); } status = pjmedia_sdp_neg_get_active_remote(call->inv->neg,&remote_sdp); if (status != PJ_SUCCESS){ printf("Remote SDP alamadik\n\n"); } status = pjmedia_sdp_neg_get_active_local(call->inv->neg,&local_sdp); if (status != PJ_SUCCESS){ printf("Local SDP alamadik\n\n"); } rvlcip = (char *) malloc ( remote_sdp->conn->addr.slen + 1); strncpy(rvlcip,remote_sdp->conn->addr.ptr,remote_sdp->conn->addr.slen); rvlcip[remote_sdp->conn->addr.slen] = '\0'; /* show ip and port nbre */ printf("Remote IP %s \n\n", rvlcip ); rvlcport = remote_sdp->media[0]->desc.port; printf("Remote Port %d \n\n", rvlcport ); /* store ip and port nbre to use them later */ FILE * entree; entree = fopen("/home/ucef/Bureau/zonedetest/text.txt", "w"); fprintf (entree,"rvlcip=%s\n rvlcport=%d\n",rvlcip,rvlcport); fclose(entree); } before when I have had: rvlcport = remote_sdp->media[1]->desc.port; The PJSIP closed just after the call is confirmed, I changed it into: rvlcport = remote_sdp->media[0]->desc.port; And the problem is solved, but it returns me the number of port audio, can I stream the video to this port+1 and it will be shown on X-lite? If it can help: When I pass a call I get this: v=0 o=- 4 2 IN IP4 192.168.203.4 s=CounterPath X-Lite 3.0 c=IN IP4 192.168.203.4 t=0 0 m=audio 15194 RTP/AVP 0 8 101 a=fmtp:101 0-15 a=rtpmap:101 telephone-event/8000 a=sendrecv --end msg-- 12:29:22.291 pjsua_app.c Call 3 state changed to CONNECTING 12:29:22.292 strm0x86e5474 VAD temporarily disabled 12:29:22.292 strm0x86e5474 Encoder stream started 12:29:22.292 strm0x86e5474 Decoder stream started 12:29:22.295 pjsua_media.c Media updates, stream #0: PCMU (sendrecv) 12:29:22.295 conference.c Port 1 (ringback) stop transmitting to port 0 (Intel 82801AA-ICH: Intel 82801AA-ICH (hw:0,0)) 12:29:22.295 conference.c Port 3 (sip:101 at 192.168.203.4) transmitting to port 0 (Intel 82801AA-ICH: Intel 82801AA-ICH (hw:0,0)) 12:29:22.295 conference.c Port 0 (Intel 82801AA-ICH: Intel 82801AA-ICH (hw:0,0)) transmitting to port 3 (sip:101 at 192.168.203.4) 12:29:22.295 pjsua_app.c Media for call 3 is active 12:29:22.295 pjsua_core.c TX 329 bytes Request msg ACK/cseq=17447 (tdta0x86e9038) to UDP 192.168.203.4:5060: ACK sip:101 at 192.168.203.4 SIP/2.0 Via: SIP/2.0/UDP 10.0.2.15:5060;rport;branch=z9hG4bKPjeen.51w2gZaQUXu6qh8N5cATxVnuA33b Max-Forwards: 70 From: sip:100@192.168.203.4;tag=eJib-NS5y6fJOHSgsptfBhFlyoswTZxB To: sip:101 at 192.168.203.4;tag=6a231b74 Call-ID: f8T9ktOvsnA3N1h6PAi2hwW.2rIMajJX CSeq: 17447 ACK Content-Length: 0 --end msg-- Remote IP 192.168.203.4 Remote Port 15194 12:29:22.298 pjsua_app.c Call 3 state changed to CONFIRMED 12:29:23.009 strm0x86e5474 VAD re-enabled 12:29:26.553 sound_port.c EC suspended because of inactivity 12:29:33.417 pjsua_core.c RX 423 bytes Request msg BYE/cseq=1 (rdata0x869b9cc) from UDP 192.168.203.4:5060: BYE sip:100 at 192.168.203.4:2609 SIP/2.0 Via: SIP/2.0/UDP 192.168.203.4:5060;branch=z9hG4bK-167a4a45-4a93bd0d-b5498fc;rport Contact: <sip:101 at 192.168.203.4> From: "101"<sip:101@192.168.203.4>;tag=6a231b74 To: "100"<sip:100 at 192.168.203.4>;tag=eJib-NS5y6fJOHSgsptfBhFlyoswTZxB Call-ID: f8T9ktOvsnA3N1h6PAi2hwW.2rIMajJX User-Agent: miniSipServer V2.6 (100) May 4 2009 CSeq: 1 BYE Max-Forwards: 70 Content-Length: 0 __________ Information provenant d'ESET Smart Security, version de la base des signatures de virus 4365 (20090825) __________ Le message a ?t? v?rifi? par ESET Smart Security. http://www.eset.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090825/c645de3c/attachment.html>