1、Pjsip通信如何使用TCP協(xié)議
pjsua_acc_config config;
pjsua_acc_config_default(&config);
char *sipAccount;
//設置sip賬號
NSString* sipAccountStr = [NSString stringWithFormat:@"sip:%@@%@;transport=tcp",accountsString,ipString];
sipAccount = malloc(sipAccountStr.length*sizeof(char));
strcpy(sipAccount, sipAccountStr.UTF8String);
config.id = pj_str(sipAccount);
//設置服務器格式: sip:服務器地址
char serviceId[50];
sprintf(serviceId, "sip:%s;transport=tcp",[ipString UTF8String]);
config.reg_uri = pj_str(serviceId);