TLS issues in simple_pjsua

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

 



If I'm not mistaken I'm pretty sure you will need to manually add ;transport=tls to your SIP URI's.
Register, invite etc.

Best regards,
Even Andr?

On 5. des. 2010, at 07.14, LiYonggang wrote:

> I am trying to use simple_pjsua with TLS on Mac, OpenSSL is installed.
> the issue is when I create a TLS transport, but can not generate TLS correctly. but use the url beginning with sips:, the register message can be generated, is it by design or there is anything wrong with the call.
> 
> the detail step is:
> 
> 1. I update the simple_pjsua.c : from
> 	status = pjsua_transport_create(PJSIP_TRANSPORT_UDP, &cfg, NULL);
> to:
>          status = pjsua_transport_create(PJSIP_TRANSPORT_TLS, &cfg, NULL);
> 
> 2. run ./simple_pjsua, there is an error:
> "22:06:02.009    pjsua_acc.c  Unable to generate suitable Contact header for registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
>  22:06:02.009    pjsua_acc.c  Unable to create registration: Unsupported transport (PJSIP_EUNSUPTRANSPORT) [status=171060]
> "
> 
> After investigating, I found in pjsua_acc.c:pjsua_acc_create_uac_contact, the tp_type is set to PJSIP_TRANSPORT_UDP instead of TLS
> "
>     /* Get transport type of the 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);
> "
> and if sip_uri begins "sips:", tp_type will be TLS.
> 
> Thanks,
> leeygang
> _______________________________________________
> 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/20101205/6dd799ec/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