Sample code showing PJSIP client using digital certificate

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

 



Hi Sandip,

Seems like you haven't really built PJSIP with TLS support. Just
follow the wiki page carefully.

BR,
nanang


On Sat, Sep 15, 2012 at 8:06 AM, Sandip Dhummad <sandipmit at yahoo.com> wrote:
> Hi,
>
> I am new to PJSIP. I want to access company PBX server with digital
> certificate. I was trying make changes in sample_pjsua code following the
> guideline given at:
>
> http://trac.pjsip.org/repos/wiki/SRTP#no1
> http://trac.pjsip.org/repos/wiki/TLS
>
> I have made following changes, in BOLD:
>     pjsua_config cfg;
>     pjsua_logging_config log_cfg;
>
>     pjsua_config_default(&cfg);
>     //cfg.cb.on_incoming_call = &on_incoming_call;
>     cfg.cb.on_call_media_state = &on_call_media_state;
>     cfg.cb.on_call_state = &on_call_state;
>
>     //SRTP
>     cfg.use_srtp = PJMEDIA_SRTP_MANDATORY;
>     cfg.srtp_secure_signaling = 1;
>
> and
>
>         pjsip_tls_setting tlsSettings;
>         pjsip_tls_setting_default(&tlsSettings);
>         tlsSettings.method = PJSIP_TLSV1_METHOD;
>         tlsSettings.verify_server = PJ_TRUE;
>
>         pjsua_transport_config cfg;
>
>         pjsua_transport_config_default(&cfg);
>         cfg.port = 5060;
>         cfg.tls_setting = tlsSettings;
>
>         status = pjsua_transport_create(PJSIP_TRANSPORT_TLS, &cfg, NULL);
>         if (status != PJ_SUCCESS) {
>             pjsua_destroy();
>             exit(3);
>         }
>
> and
> changed port# to be SRTP port.
>
> But I get following error:
>
> 20:52:10.548   pjsua_core.c  Error creating transport: Unsupported transport
> (PJSIP_EUNSUPTRANSPORT) [status=171060]
>
> I know that I have to set certificate file in tls_settings struct but this
> error is killing me, I spent so much of time on this. Could you please point
> me what is the issue? Has any one running sample program using client side
> digital certificate and TLS.
>
> Thanks in advance for helping me out here!!
>
> Thanks & Regards,
> Sandip Dhummad
>
> _______________________________________________
> 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
>



[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