settign transport_param in sip_uri (SIP over TCP problem)

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

 



On Thu, Jul 10, 2008 at 3:25 PM, Zahed Emon <ena2413 at gmail.com> wrote:

> 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);
>


First of all, you don't have to call pjsua_acc_set_transport() unless you
really want to. With the default behavior (by not calling this function),
account can use any available transports, and normally this is the desired
behavior for typical applications.

The pjsua_acc_set_transport() is provided for applications that want
explicit control on which transport to use to send/receive messages, for
example in multi-homed host and when application specificly wants to
send/receive messages using a specific interface.




>
>
>        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 ).
>
>
Please see http://trac.pjsip.org/repos/wiki/FAQ#tcp

Cheers
 Benny




> BR
>
> Zahed
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080710/80d06ddd/attachment.html 


[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