Problem in creating conference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

I'm trying to perform conference having totally three members, but it is
not working. Please find the code snippet below. Can anyone please look
into the code and input some clue to get it work.

static void confconnect(pjsua_call_id call_id)
 {
     pjsua_call_info ci[4];

     pjsua_call_get_info(call_id, &ci[call_id]);

// When media is active, connect call to sound device.
     if (ci[call_id].media_status == PJSUA_CALL_MEDIA_ACTIVE)
      {
         pjsua_conf_connect(ci[call_id].conf_slot, 0);
         pjsua_conf_connect(0, ci[call_id].conf_slot);
      }
      else
       cout<<"\n\n\n\n\t\t\t\t\t*******Error in Media Status***********";
 }


/* Conference Call */
  
void pjconfcall()
{
        char *confuri1[0];
        char *confuri2[0];
        pjsua_call_id call_id1;
        call_id1 = 1;

      for(;;)
       {  
        cout<<"\nDial the SIP number-> ";
        cin>>confuri1[0];
 // Check for valid SIP URL
        status = pjsua_verify_sip_url(confuri1[0]);
        if (status != PJ_SUCCESS)
          cout<<"\nInvalid URL!!!! ";
        else
          break;
        }
        pj_str_t uri = pj_str(confuri1[0]);
        status = pjsua_call_make_call(acc_id, &uri, 0, NULL, NULL, NULL);
          if (status != PJ_SUCCESS)
            error_exit("Error making conference call", status);
          else
           {
            confconnect(call_id1);
            call_id1++;
           }
        sleep(5);

 // Now place second call
      for(;;)
       {  
        cout<<"\nDial the SIP number-> ";
        cin>>confuri2[0];
   // Check for valid SIP URL
        status = pjsua_verify_sip_url(confuri2[0]);
        if (status != PJ_SUCCESS)
          cout<<"\nInvalid URL!!!! ";
        else
          break;
        }
    pj_str_t uri1 = pj_str(confuri2[0]);
        status = pjsua_call_make_call(acc_id, &uri1, 0, NULL, NULL, NULL);
          if (status != PJ_SUCCESS)
            error_exit("Error making second conference call", status);
          else
           {
            confconnect(call_id1);
           }
}

Thanks & Regards,
- Senthil

--------------------------------------------------------------------
mail2web.com - Microsoft? Exchange solutions from a leading provider -
http://link.mail2web.com/Business/Exchange





[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux