On Tue, Jun 3, 2008 at 10:51 AM, Jo?o C?sar <jpcesar at gmail.com> wrote: > Hell all > > I'm working on a project that uses pjsip, pjmedia and pjsua-api. We have a > memory port as source of audio, and we are establishing a sip connection to > a SIP compliant third party product. However, on call termination from the > other side, i think we are not properly handing the hangup of the call since > we are getting this kind of errors: > > strm0284c64c RTP recv() error: Connection reset by peer (WSAECONNRESET) > [err:130054] > strm0284c64c RTP recv() error: Connection reset by peer (WSAECONNRESET) > [err:130054] > strm0284c64c RTP recv() error: Connection reset by peer (WSAECONNRESET) > [err:130054] > > assumptions: > - we are using UDP transport > - we are adding the ports with pjsua_conf_add_port > - making the call with pjsua_call_make_call > - using pjmedia_snd_port_create_player to create the port > - using pjmedia_snd_port_connect to connect the ports > > we have implemented the following callback functions > - on_call_media_state > - on_call_state > - on_incoming_call > > However, on the on_call_state we are only printing some call info. do we > need to implement explicit hangup here if connection is no longer active? > No you don't need to do anything in on_call_state(), as call disconnection will be handled automatically and on_call_state() only serves to report the changes in call state. In your case above, I suspect that the pjsip doesn't receive the BYE request from the other side. Please check the log and/or Wireshark packet capture to see if this is/isn't the case. Cheers Benny