123 | | /* TLS */ |
124 | | tp_type = PJSIP_TRANSPORT_TLS6; |
125 | | tp_cfg.port = 5061; |
126 | | tp_cfg.tls_setting.ca_list_file = pj_str("<path to CA file>"); |
127 | | tp_cfg.tls_setting.cert_file = ...; |
128 | | tp_cfg.tls_setting.privkey_file = ...; |
129 | | tp_cfg.tls_setting.password = ...; |
130 | | status = pjsua_transport_create(tp_type, &tp_cfg, &tp_id); |
131 | | if (status != PJ_SUCCESS) |
132 | | ... |
| 123 | /* TLS */ |
| 124 | tp_type = PJSIP_TRANSPORT_TLS6; |
| 125 | tp_cfg.port = 5061; |
| 126 | tp_cfg.tls_setting.ca_list_file = pj_str("<path to CA file>"); |
| 127 | tp_cfg.tls_setting.cert_file = ...; |
| 128 | tp_cfg.tls_setting.privkey_file = ...; |
| 129 | tp_cfg.tls_setting.password = ...; |
| 130 | status = pjsua_transport_create(tp_type, &tp_cfg, &tp_id); |
| 131 | if (status != PJ_SUCCESS) |
| 132 | ... |
149 | | acc_cfg.id = pj_str("sip:" SIP_USER "@" SIP_SERVER); |
150 | | acc_cfg.reg_uri = pj_str("sip:" SIP_SERVER); |
151 | | acc_cfg.cred_count = 1; |
152 | | acc_cfg.cred_info[0].realm = pj_str("*"); |
153 | | acc_cfg.cred_info[0].scheme = pj_str("digest"); |
154 | | acc_cfg.cred_info[0].username = pj_str(SIP_USER); |
155 | | acc_cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; |
156 | | acc_cfg.cred_info[0].data = pj_str(SIP_PASSWD); |
| 149 | acc_cfg.id = pj_str("sip:" SIP_USER "@" SIP_SERVER); |
| 150 | acc_cfg.reg_uri = pj_str("sip:" SIP_SERVER); |
| 151 | acc_cfg.cred_count = 1; |
| 152 | acc_cfg.cred_info[0].realm = pj_str("*"); |
| 153 | acc_cfg.cred_info[0].scheme = pj_str("digest"); |
| 154 | acc_cfg.cred_info[0].username = pj_str(SIP_USER); |
| 155 | acc_cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; |
| 156 | acc_cfg.cred_info[0].data = pj_str(SIP_PASSWD); |
158 | | /* As currently IPv6 DNS resolution is not supported yet, application should resolve it manually, e.g: using getaddrinfo(), and set the IPv6 address via proxy setting */ |
159 | | /* Note that application may add 'hide' param to hide the proxy setting from the message (this is PJSIP proprietary feature) */ |
160 | | acc_cfg.proxy_cnt = 1; |
161 | | acc_cfg.proxy[0] = pj_str("sip:" SIP_SERVER_IPv6 ";lr;hide"); |
| 158 | /* As currently IPv6 DNS resolution is not supported yet, application should resolve it manually, e.g: using getaddrinfo(), and set the IPv6 address via proxy setting */ |
| 159 | /* Note that application may add 'hide' param to hide the proxy setting from the message (this is PJSIP proprietary feature) */ |
| 160 | acc_cfg.proxy_cnt = 1; |
| 161 | acc_cfg.proxy[0] = pj_str("sip:" SIP_SERVER_IPv6 ";lr;hide"); |