config_site.h
#include <pj/config_site_sample.h>VC++ Header and Library Path
#define PJ_HAS_SSL_SOCK 1
Build then Install
pjproject\pjsip-apps\lib\_pjsua.pyd
python pjsip-apps\src\python\setup-vc.py install
Sip2Sip.info Authentication Script
try:References:
ua_cfg = pj.UAConfig()
ua_cfg.nameserver = ['8.8.8.8', '8.8.4.4'] # Example: Google Public DNS
lib.init(ua_cfg=ua_cfg, log_cfg=pj.LogConfig(level=4, callback=log_cb))
transport = lib.create_transport(pj.TransportType.TLS, pj.TransportConfig(port=5060))
lib.start()
acc_cfg = pj.AccountConfig()
acc_cfg.id = "sip:ID@sip2sip.info"
acc_cfg.reg_uri = "sip:sip2sip.info;transport=tls"
acc_cfg.auth_cred = [pj.AuthCred(
realm="sip2sip.info",
username="USERNAME",
passwd="PASSWORD",
)]
acc_cb = MyAccountCallback(acc_cfg)
acc = lib.create_account(acc_cfg, cb=acc_cb)
except Exception, err:
print 'Error creating account:', err
http://trac.pjsip.org/repos/wiki/Getting-Started/Installing-OpenSSL-Windows
http://trac.pjsip.org/repos/wiki/TLS
No comments :
Post a Comment