Hi, I have found the problem. The problem wasn't related to pjsip at all. The loop was the result of sidetone which caused by the modem i was using (simcom 300). I set sidetone value to 0 by "at+sidet=0" command and loop ended. 2010/4/21 bugra HASBEK <bugrahasbek at gmail.com> > Hi, > > I have a pjsip application similar to simple pjsua example ( > http://www.pjsip.org/pjsip/docs/html/page_pjsip_sample_simple_pjsuaua_c.htm) > . I am calling my application from a sip phone (xlite). i need bidirectional > flow so I am connecting media to sound card on 'on_call_media_state' > callback. > ----------- > static void on_call_media_state(pjsua_call_id call_id) > { > pjsua_call_info ci; > pjsua_call_get_info(call_id, &ci); > > if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) > { > /// When media is active, connect call to sound device. > cout << "Connecting media to sound card" << endl; > pjsua_conf_connect(ci.conf_slot, 0); > pjsua_conf_connect(0, ci.conf_slot); > } > } > ------------ > > I can receive sip phone's voice from my application succesfully. sip phone > can also receive voice from my application succesfully. however, sip phone > also receives its own voice. I think i am somehow looping media back to sip > phone. > > How do i prevent looping media back to sip phone? Should i use echo > cancellation api or is there any other trick that i don't know yet? > > Any help is appreciated! Thanks > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100422/8797e73d/attachment.html>