<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">hi all,</div><div dir="ltr" class="gmail_attr">I write a javascript to bridge two endpoints. The senes is like the following,</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">A(web+sip.js+wrtc) <--->Freeswitch(sofia+javascript) <---> Twilio sip trunking <---> B(pstn phone).</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">I tried two methods in Freeswitch javascript to call from A to B:</div><div dir="ltr" class="gmail_attr">  1. create new sessionB then bridge A to B:</div><div dir="ltr" class="gmail_attr">       (1) sessionA.answer() and ring back to A, </div><div dir="ltr" class="gmail_attr">       (2) create new session to B via sip bridge, then break sessionA ringback and park sessionB, </div><div dir="ltr" class="gmail_attr">       (3) bridge(sessionA, sessionB)</div><div dir="ltr" class="gmail_attr">   </div><div dir="ltr" class="gmail_attr">   2. bridge A to B directly without create sessionB:</div><div dir="ltr" class="gmail_attr">       (1) sessionA.answer(),</div><div dir="ltr" class="gmail_attr">       (2) sessionA.execute('bridge','sofia/gateway/32d1440c-d13c-44b3-94da-1589daf6e81b/'+sessionA.getVariable('callee_id_number'));</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">The second one works well. But in the first one, A always loses some audio from B. </div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">I use tcpdump on my Freeswitch server to check the connection and find that some UDP packets from Freeswitch to A are lost, but the packets from Twillo to Freeswitch are not lose.</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">It seems that some UDP packets are lost while the Freeswitch relays the udp packets to A.</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">So, what the difference is between the two methods?  And how can I fix this problem? I need to use the first method to make the call.</div><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr" class="gmail_attr">Thank!</div></div></div>