<div dir="ltr"><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace">Hello All,</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">In order to verify the TURN functionality, I modified the simple-example code as given below.  I setup coturn in one of the AWS servers with a username and password.</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">1. Just before calling nice_agent_gather_candidates(), included the following </font><span style="font-family:monospace,monospace">code.</span></div><div class="gmail_default" style=""><font face="monospace, monospace">nice_agent_set_relay_info(agent, stream_id, 1, turn_addr, turn_port,</font></div><div class="gmail_default" style=""><font face="monospace, monospace">    COTURN_LOGIN, COTURN_PASSWORD, NICE_RELAY_TYPE_TURN_UDP)</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">With this change, I could see relay along with host and srflx candidates in the list of gathered candidates, but still it was using host/srflx.</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">2. In order to force using relay, I made the following change in print_local_data() to print only the relay candidates.</font></div><div class="gmail_default" style=""><font face="monospace, monospace">for (item = cands; item; item = item->next) {</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  NiceCandidate *c = (NiceCandidate *)item->data;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  if((c->type == NICE_CANDIDATE_TYPE_HOST) || (c->type == NICE_CANDIDATE_TYPE_SERVER_REFLEXIVE)) {</font></div><div class="gmail_default" style=""><font face="monospace, monospace">      continue;  //do not print these candidates</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  }</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">Then, I copy pasted the generated data between the two simple-example instances as I did previously.</font></div><div class="gmail_default" style=""><font face="monospace, monospace">But, this time I am getting the following message as the connectivity check failed.</font></div><div class="gmail_default" style=""><font face="monospace, monospace">SIGNAL: state changed stream 1 comp 1 connecting[2]</font></div><div class="gmail_default" style=""><font face="monospace, monospace">SIGNAL: state changed stream 1 comp 1 failed[5]</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">I captured all messages using wireshark.  Interestingly both Allocation Success Response and CreatePermission Success Response are coming back from the TURN server.  Also, libnice is sending a few Send Indication to the relay address of the other party.  But, after this libnice is sending a Refresh Request with a lifetime = 0 and the communication with TURN server is closed down.</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">Any idea how to proceed?</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">Thanks and Regards</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">Anand</font></div><div class="gmail_default" style="font-family:monospace,monospace;font-size:small"><br></div></div></div>