本文整理汇总了Java中com.csipsimple.api.SipUri.encodeUser方法的典型用法代码示例。如果您正苦于以下问题:Java SipUri.encodeUser方法的具体用法?Java SipUri.encodeUser怎么用?Java SipUri.encodeUser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.csipsimple.api.SipUri
的用法示例。
在下文中一共展示了SipUri.encodeUser方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account.display_name = accountDisplayName.getText();
account.acc_id = "<sip:" + SipUri.encodeUser(accountUsername.getText().trim()) + "@" + getDomain() + ">";
String regUri = "sip:" + getDomain();
account.reg_uri = regUri;
account.proxies = new String[] { "sip:"+accountProxy.getText() } ;
account.realm = "*";
account.username = getText(accountAuthorization).trim();
account.data = getText(accountPassword);
account.scheme = SipProfile.CRED_SCHEME_DIGEST;
account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;
account.reg_timeout = 1800;
account.transport = SipProfile.TRANSPORT_UDP;
return account;
}
示例2: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account.display_name = accountDisplayName.getText();
account.acc_id = "<sip:" + SipUri.encodeUser(accountUsername.getText().trim()) + "@" + getDomain() + ">";
String regUri = "sip:" + getDomain();
account.reg_uri = regUri;
account.proxies = new String[] { regUri } ;
account.realm = "*";
account.username = getText(accountAuthorization).trim();
account.data = getText(accountPassword);
account.scheme = SipProfile.CRED_SCHEME_DIGEST;
account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;
account.reg_timeout = 1800;
account.transport = SipProfile.TRANSPORT_UDP;
return account;
}
示例3: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
String domain = getDomain();
String[] domainPart = domain.split(":");
boolean shouldAddPort = true;
if (domainPart.length > 1) {
// If latest part is digit we should not add port
shouldAddPort = !Pattern.matches("^[0-9]+$", domainPart[1]);
}
if (shouldAddPort) {
domain = domain + ":5061";
}
account.acc_id = "<sips:" + SipUri.encodeUser(accountUsername.getText().trim()) + "@"+domainPart[0].trim()+">";
account.reg_uri = "sips:" + domain;
account.proxies = new String[] {
"sips:" + domain + ";hide"
};
account.transport = SipProfile.TRANSPORT_TLS;
account.use_zrtp = 1;
account.vm_nbr = "*98";
return account;
}
示例4: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
@Override
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
account.proxies = null;
account.reg_timeout = 3600;
account.contact_rewrite_method = 1;
account.try_clean_registers = 0;
String finalUsername = accountUsername.getText().trim();
if(accountSuffix != null) {
String suffix = accountSuffix.getText();
if(!TextUtils.isEmpty(suffix)) {
finalUsername += "x"+suffix.trim();
}
}
account.acc_id = "<sip:" + SipUri.encodeUser(finalUsername) + "@"+getDomain()+">";
return account;
}
示例5: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
Log.d(THIS_FILE, "begin of save ....");
account.display_name = accountDisplayName.getText().trim();
String[] serverParts = accountServer.getText().split(":");
account.acc_id = "<sip:" + SipUri.encodeUser(accountUserName.getText().trim()) + "@"+serverParts[0].trim()+">";
String regUri = "sip:" + accountServer.getText();
account.reg_uri = regUri;
account.proxies = new String[] { regUri } ;
account.realm = "*";
account.username = getText(accountUserName).trim();
account.data = getText(accountPassword);
account.scheme = SipProfile.CRED_SCHEME_DIGEST;
account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;
//By default auto transport
account.transport = SipProfile.TRANSPORT_UDP;
return account;
}
示例6: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
String accId = "";
if(!TextUtils.isEmpty(accountCallerId.getText().trim())) {
accId += accountCallerId.getText().trim() +" ";
}
accId += "<sip:" + SipUri.encodeUser(accountUserName.getText().trim()) + "@" + getDomain() + ">";
account.acc_id = accId;
String regUri = "sip:" + getDomain();
account.reg_uri = regUri;
account.proxies = new String[]{regUri};
account.proxies = new String[] {"sip:nat.babytel.ca:5065"};
account.transport = SipProfile.TRANSPORT_UDP;
account.reg_timeout = 900;
account.ice_cfg_use = 1;
account.ice_cfg_enable = 1;
return account;
}
示例7: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
account.acc_id = accountCallerId.getText().trim() +
" <sip:" + SipUri.encodeUser(accountUserName.getText().trim()) + "@" + getDomain() + ">";
String regUri = "sip:" + getDomain();
account.reg_uri = regUri;
account.proxies = new String[]{regUri};
account.transport = SipProfile.TRANSPORT_UDP;
return account;
}
示例8: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account.display_name = accountDisplayName.getText().trim();
String[] serverParts = getServer().split(":");
account.acc_id = accountCallerId.getText().trim() +
" <sip:" + SipUri.encodeUser(accountUserName.getText().trim()) + "@" + serverParts[0].trim() + ">";
account.reg_uri = "sip:" + getServer();
account.realm = "*";
account.username = getText(accountAuthId).trim();
if (TextUtils.isEmpty(account.username)) {
account.username = getText(accountUserName).trim();
}
account.data = getText(accountPassword);
account.scheme = SipProfile.CRED_SCHEME_DIGEST;
account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;
account.transport = accountUseTcp.isChecked() ? SipProfile.TRANSPORT_TCP : SipProfile.TRANSPORT_AUTO;
if (!isEmpty(accountProxy)) {
account.proxies = new String[] { "sip:"+accountProxy.getText().trim() };
} else {
account.proxies = null;
}
return account;
}
示例9: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
@Override
public SipProfile buildAccount(SipProfile account) {
SipProfile acc = super.buildAccount(account);
account.acc_id = "<sip:" + SipUri.encodeUser(accountUsername.getText().trim()) + "@sip.solid-voice.net>";
return acc;
}
示例10: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
@Override
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
String finalUsername = accountUsername.getText().trim();
account.acc_id = "\"1-877-617-1017\" <sip:" + SipUri.encodeUser(finalUsername) + "@"+getDomain()+">";
return account;
}
示例11: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
//Ensure registration timeout value
account.reg_uri = "sip:fritz.box";
account.acc_id = "<sip:"
+ SipUri.encodeUser(accountUsername.getText().trim()) + "@fritz.box>";
account.contact_rewrite_method = 1;
account.try_clean_registers = 0;
account.allow_contact_rewrite = false;
return account;
}
示例12: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
@Override
public SipProfile buildAccount(SipProfile account) {
SipProfile acc = super.buildAccount(account);
String phoneNumber = SipUri.encodeUser(accountUsername.getText().trim());
acc.acc_id = phoneNumber + " <sip:+3399"+ phoneNumber + "@"+getDomain()+">";
acc.reg_uri = "sip:ims.mnc010.mcc208.3gppnetwork.org";
acc.username = "NDI"+phoneNumber+"[email protected]";
acc.reg_timeout = 3600;
acc.proxies = new String[] {"sip:internet.p-cscf.sfr.net:5064"};
acc.vm_nbr = "147";
return acc;
}
示例13: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
public SipProfile buildAccount(SipProfile account) {
account = super.buildAccount(account);
account.proxies = new String[] {"sip:farm2.tel2.congstar.qsc.de"};
account.reg_uri = "sip:tel2.congstar.de";
account.transport = SipProfile.TRANSPORT_UDP;
String uname = SipUri.encodeUser(accountUsername.getText().trim());
account.acc_id = uname + " <sip:" + uname + "@" + getDomain() + ">";
return account;
}
示例14: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public SipProfile buildAccount(SipProfile account) {
SipProfile acc = super.buildAccount(account);
acc.proxies = null;
String encodedUser = SipUri.encodeUser(accountUsername.getText().trim());
account.acc_id = "0"+encodedUser+" <sip:"
+ encodedUser + "@"+getDomain()+">";
return acc;
}
示例15: buildAccount
import com.csipsimple.api.SipUri; //导入方法依赖的package包/类
@Override
public SipProfile buildAccount(SipProfile account) {
SipProfile acc = super.buildAccount(account);
String domain = "t-online.de";
account.acc_id = "<sip:" + SipUri.encodeUser(accountUsername.getText().trim()) + "@"
+ domain + ">";
acc.username = getText(accountAuthorization).trim() + "@" + domain;
return acc;
}