當前位置: 首頁>>代碼示例>>Java>>正文


Java SipUri.encodeUser方法代碼示例

本文整理匯總了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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:18,代碼來源:Broadsoft.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:18,代碼來源:AuthorizationImplementation.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:24,代碼來源:SecurData.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:21,代碼來源:BroadVoice.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:22,代碼來源:Basic.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:19,代碼來源:Babytel.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:13,代碼來源:VoipLlama.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:28,代碼來源:Advanced.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:8,代碼來源:SolidVoice.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:9,代碼來源:ReachPhones.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:12,代碼來源:Fritzbox.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:14,代碼來源:LiberTalk.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:10,代碼來源:CongstarQSC.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:13,代碼來源:Mobex.java

示例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;
}
 
開發者ID:treasure-lau,項目名稱:CSipSimple,代碼行數:12,代碼來源:TOnline.java


注:本文中的com.csipsimple.api.SipUri.encodeUser方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。