settign transport_param in sip_uri (SIP over TCP problem)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to register my client using TCP.

I have created the TCP transport and  did the registration with pjsua_acc_add

        acc_cfg.id = pj_str(uri);
	acc_cfg.reg_uri = pj_str (sip_domain);
	acc_cfg.cred_count = 1;
	acc_cfg.cred_info[0].realm = pj_str("*");
	acc_cfg.cred_info[0].scheme = pj_str("digest");
	acc_cfg.cred_info[0].username = pj_str(user);
	acc_cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD;
	acc_cfg.cred_info[0].data = pj_str(pass);
	//acc_cfg.transport_id = trans_id;
	//acc_cfg.

	//acc_cfg.r

	//
	status = pjsua_acc_set_transport(acc_id,trans_id);


	status = pjsua_acc_add(&acc_cfg,PJ_TRUE,&acc_id);
	if(status != PJ_SUCCESS)
	{
		error_exit("Error in registration", status);
	}

now I get error saying unsupported transport.

When I checked the code. I found that in
pjsua_acc_create_uac_contact() it checks for the transport type in URI

if (PJSIP_URI_SCHEME_IS_SIPS(sip_uri))
	tp_type = PJSIP_TRANSPORT_TLS;
    else if (sip_uri->transport_param.slen == 0) {
	tp_type = PJSIP_TRANSPORT_UDP;
    } else
	tp_type = pjsip_transport_get_type_from_name(&sip_uri->transport_param);

    if (tp_type == PJSIP_TRANSPORT_UNSPECIFIED)
	return PJSIP_EUNSUPTRANSPORT;


Now how can I specify value for transport_param? I am not giving
anything to get the transport other than UDP (I have not found it ).

BR

Zahed



[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux