`Hi guys, im trying to display dialled number on touser phone, now it was showing the sip registered number in touser phone. but i want to show dialled number.
NOTE: this is voip call, no incoming feature with in the app.
Here is the sample code:
// make call method
void make_call(char* name, char* sip_id, char* sip_server){
pj_status_t status;
/* If URL is specified, make call to the URL. */
char sip_uri[80];
sprintf(sip_uri, ""%s" <sip:%s@%s>",name, sip_id, sip_server);
pj_str_t uri = pj_str(sip_uri);
pjsua_call_setting call_set;
pjsua_call_setting_default(&call_set);
status = pjsua_call_make_call(account_id, &uri, &call_set, NULL, NULL, NULL);
if (status != PJ_SUCCESS)
error_exit("Error making call", status);
}
// registered method
int account_registered(char *sip_domain, char *sip_user, char *sip_passwd)
{
pj_status_t status;
/* Add UDP transport. */
{
pjsua_transport_config cfg;
pjsua_transport_config_default(&cfg);
cfg.port = 5060;
status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
if (status != PJ_SUCCESS)
{
error_exit("Error creating transport", status);
return 1;
}
}
/* Initialization is done, now start pjsua */
status = pjsua_start();
if (status != PJ_SUCCESS)
{
error_exit("Error starting pjsua", status);
return 1;
}
/* Register to SIP server by creating SIP account. */
{
pjsua_acc_config cfg;
// cfg.cred_info[0].realm = pj_str(SIP_DOMAIN);
pjsua_acc_config_default(&cfg);
char id[60];
sprintf(id, "sip:%s@%s",sip_user, sip_domain);
char reg_uri[60];
sprintf(reg_uri, "sip:%s", sip_domain);
cfg.id = pj_str(id);
cfg.reg_uri = pj_str(reg_uri);
cfg.cred_count = 1;
cfg.cred_info[0].realm = pj_str("*");
cfg.cred_info[0].scheme = pj_str("digest");
cfg.cred_info[0].username = pj_str(sip_user);
cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
cfg.cred_info[0].data = pj_str(sip_passwd);
status = pjsua_acc_add(&cfg, PJ_TRUE, &account_id);
if (status != PJ_SUCCESS)
{
error_exit("Error adding account", status);
return 1;
}
}
return 0;
}
please help me, Thanks in advance