Sample code showing PJSIP client using digital certificate

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

 



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_configcfg;
? ? pjsua_logging_configlog_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_configcfg;
?? ? ? ?
? ? ? ? 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120914/0e6e2513/attachment-0001.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