how to register in server? (with simpleua code)

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

 



hi,
thanks to all who gave me response. i tried both answers.
i have added the code whatever you told and i made some changes

 pjsua_acc_id pjAccId = -1;
 pjsua_acc_config acc_cfg;
 pjsua_acc_config_default(&acc_cfg);
 acc_cfg.id = pj_str("sip:"SIP_USER"@"SIP_DOMAIN);

 if (strlen(SIP_USER) > 0)
 {
  acc_cfg.cred_count = 1;
  acc_cfg.cred_info[0].scheme = pj_str("Digest");

   acc_cfg.cred_info[0].realm = pj_str("*");
  acc_cfg.cred_info[0].username = pj_str(SIP_USER);
  acc_cfg.cred_info[0].data_type = 0;
  acc_cfg.cred_info[0].data = pj_str(auth_password);
 }
 if (outbound_proxy != NULL)
 {
  acc_cfg.proxy[0] = pj_str(outbound_proxy);
  acc_cfg.proxy_cnt = 1;
 }
 status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id);
 if (status != PJ_SUCCESS) {
     pjsua_perror(THIS_FILE, "ERR adding new account", status);
 }

 it is giving me error "ERR adding new account".
can you tell me what is the reason and one more thing how i have to give in
output for execute this ....

Regards
New_bie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081202/28f2a1e9/attachment-0001.html>


[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