I’m developing an iOS app using Swift and PJSIP for SIP calling. I want to dynamically update the phone number displayed in the app when a call is initiated.
Here’s the relevant part of my code:
import PJSUA2
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);
}
New contributor
Suresh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.