katjusha KATJUSHA wrote: > Hi all! > > I've studied the ice_strans.c source code, in order to retreive the > informations to develop my own > NAT traversal solution. > I've understood that: > - the ICE stream transport can be kept-alive as long as I need, > - instead the ICE session is temporary (and relative to a call); > - the ICE connectivity check starts when both peers have the remode > candidate list. > > The question is: how can I send my candidate list? How can I receive > the remote candidate list? > I haven't seen these functions in the code... where I've to look? > Should I've to look deeply in the pjsua application? > All I need to do is to send a simple message among 2 clients.... > > When the ICE connectivity checks end, all I have to do is call the > pj_ice_strans_sendto() for exchange data between 2 peers? > > I hope my questions don't look too silly for you... :-( > so that you can answer at me... > > Bye > Hi! I've managed to send/receive candidates between caller and callee, and to make them negotiate using ICE. Here is the flow: 1) Caller sends Initial Offer by calling *pjmedia_ice_create*, > *pjmedia_transport_media_create* and *pjmedia_transport_encode_sdp* > 2) Callee receives the Initial Offer and sends the Initial Answer by > calling the same functions: *pjmedia_ice_create*, > *pjmedia_transport_media_create* and *pjmedia_transport_encode_sdp* > 3) Callee starts ICE connectivity checks when *on_media_update()* is > called, by calling *pjmedia_transport_media_start* > 4) Caller's *on_media_update()* is called and he also starts ICE > connectivity checks by calling *pjmedia_transport_media_start* 5) When Caller's *on_ice_complete* is called with ice_strans_op == > PJ_ICE_STRANS_OP_NEGOTIATION, he sends the Subsequent Offer, by calling > *pjmedia_endpt_create_sdp*, *pjmedia_transport_encode_sdp*, > *pjsip_inv_reinvite* and *pjsip_inv_send_msg* 6) Callee receives Subsequent Offer on *on_rx_offer()* and sends > Subsequent Response by calling *pjmedia_endpt_create_sdp*, > *pjmedia_transport_encode_sdp* and *pjsip_inv_set_sdp_answer* Hope this helps you Pedro Gon?alves