当前位置: 首页>>代码示例>>Java>>正文


Java SipProfile.TRANSPORT_TCP属性代码示例

本文整理汇总了Java中com.csipsimple.api.SipProfile.TRANSPORT_TCP属性的典型用法代码示例。如果您正苦于以下问题:Java SipProfile.TRANSPORT_TCP属性的具体用法?Java SipProfile.TRANSPORT_TCP怎么用?Java SipProfile.TRANSPORT_TCP使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在com.csipsimple.api.SipProfile的用法示例。


在下文中一共展示了SipProfile.TRANSPORT_TCP属性的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildAccount

@Override
public SipProfile buildAccount(SipProfile account) {
    SipProfile acc = super.buildAccount(account);

       acc.transport = SipProfile.TRANSPORT_TCP;
       acc.reg_uri = "sip:" + getText(accountUsername) + ".zpe.voxis.zon.pt";
       acc.acc_id = "<sip:1290" + getText(accountUsername)+"@"+getDomain()+">";
       acc.proxies = new String[] {
           acc.reg_uri
       };
       acc.username = "1290" + getText(accountUsername);
       acc.allow_contact_rewrite = false;
       acc.allow_via_rewrite = false;

    return acc;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:16,代码来源:ZonPt.java

示例2: buildAccount

@Override
public SipProfile buildAccount(SipProfile account) {
    account = super.buildAccount(account);
    
    account.reg_uri = "sip:sipnet.ru";
    account.realm = "*";
    //account.transport = SipProfile.TRANSPORT_TLS;
    account.transport = SipProfile.TRANSPORT_TCP;
    account.use_srtp = 0;
    account.use_zrtp = 1;
    account.allow_contact_rewrite = false;
    account.allow_via_rewrite = false;
    account.contact_rewrite_method = 1;
    account.try_clean_registers = 0;
    account.sip_stun_use = 0;
    account.media_stun_use = 0;
    account.ice_cfg_enable = 1;
    account.ice_cfg_use = 0;
    
    return account;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:21,代码来源:Sipnet.java

示例3: buildAccount

public SipProfile buildAccount(SipProfile account) {
	account.display_name = accountDisplayName.getText().trim();
	account.acc_id = accountUsername.getText().trim()+" <sip:"+ accountUsername.getText().trim() + "@voip.sapo.pt:5060>";
	
	account.reg_uri = "sip:proxy.voip.sapo.pt:5070";
	account.proxies = new String[] { "sip:proxy.voip.sapo.pt:5070" } ;

	
	account.realm = "*";
	account.username = getText(accountUsername).trim();
	account.data = getText(accountPassword);
	account.scheme = SipProfile.CRED_SCHEME_DIGEST;
	account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;

	account.reg_timeout = 1800;
	
	if(canTcp()) {
		account.transport = accountUseTcp.isChecked() ? SipProfile.TRANSPORT_TCP : SipProfile.TRANSPORT_UDP;
	}else {
		account.transport = SipProfile.TRANSPORT_UDP;
	}
	
	return account;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:24,代码来源:Sapo.java

示例4: buildAccount

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,代码行数:27,代码来源:Advanced.java

示例5: setDefaultParams

@Override
public void setDefaultParams(PreferencesWrapper prefs) {
	super.setDefaultParams(prefs);
	int transport = getIntValue(transportPref, SipProfile.TRANSPORT_UDP);
	if(transport == SipProfile.TRANSPORT_UDP || transport == SipProfile.TRANSPORT_AUTO) {
	    prefs.setPreferenceStringValue(SipConfigManager.UDP_TRANSPORT_PORT, "5060");
	}else if(transport == SipProfile.TRANSPORT_TCP) {
	    prefs.setPreferenceStringValue(SipConfigManager.TCP_TRANSPORT_PORT, "5060");
	}else if(transport == SipProfile.TRANSPORT_TLS) {
           prefs.setPreferenceStringValue(SipConfigManager.TLS_TRANSPORT_PORT, "5061");
       }
	
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:13,代码来源:Local.java

示例6: buildAccount

/**
    * Basic implementation of the account building based on simple implementation fields.
    * A specification of this class could extend and add its own post processing here.
    * 
    * {@inheritDoc}
 */
public SipProfile buildAccount(SipProfile account) {
	account.display_name = accountDisplayName.getText().trim();
	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(accountUsername).trim();
	account.data = getText(accountPassword);
	account.scheme = SipProfile.CRED_SCHEME_DIGEST;
	account.datatype = SipProfile.CRED_DATA_PLAIN_PASSWD;

	account.reg_timeout = 1800;
	
	if(canTcp()) {
		account.transport = accountUseTcp.isChecked() ? SipProfile.TRANSPORT_TCP : SipProfile.TRANSPORT_UDP;
	}else {
		account.transport = SipProfile.TRANSPORT_UDP;
	}
	
	return account;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:32,代码来源:SimpleImplementation.java

示例7: buildAccount

/**
    * {@inheritDoc}
    */
@Override
public SipProfile buildAccount(SipProfile account) {
    SipProfile acc = super.buildAccount(account);
    acc.transport = SipProfile.TRANSPORT_TCP;
    return acc;
}
 
开发者ID:treasure-lau,项目名称:CSipSimple,代码行数:9,代码来源:EasyBell.java


注:本文中的com.csipsimple.api.SipProfile.TRANSPORT_TCP属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。