Hi I think we're making progress: Benny Prijono wrote: > I think the rest is probably explained in the invite session's offer > answer framework in the Dev Guide PDF. But okay here it goes. > > When sending subsequent offer, once you have the local SDP (either > getting the active SDP from SDP negotiator in the invite session, or > creating a fresh one from pjmedia_endpt), once again you'd need to > call pjmedia_transport_encode_sdp() to let it put transport > information in the offer. Then you'd send the SDP with > pjsip_inv_update() or pjsip_inv_reinvite(). > OK, I was able to do so, getting the active SDP from the negotiator and then calling pjmedia_transport_encode_sdp(), pjsip_inv_reinvite() and pjsip_inv_send_msg() > When you receive subsequent incoming offer, the on_rx_offer() callback > of the invite session is called. Again you'd create the local SDP and > give it to pjmedia_transport_encode_sdp() along with the remote offer. > Then give the SDP to pjsip_inv_set_sdp_answer() to be sent to the > response (of the re-INVITE or UPDATE). > Here I am having a small problem: how do I know if the answer contains ICE stuff? Another problem is: I can get the local SDP from the negotiator to use in pjmedia_transport_encode_sdp. I will have to include the remote SDP from the negotiator as well, right? However, calling pjmedia_sdp_neg_set_local_answer throws an assert error: PJ_ASSERT_RETURN(neg->state == PJMEDIA_SDP_NEG_STATE_REMOTE_OFFER, PJMEDIA_SDPNEG_EINSTATE); because neg->state is PJMEDIA_SDP_NEG_STATE_DONE. Did I miss something? Cheers Pedro Gon?alves