42 pjsip_route_hdr *route;
43 pjsip_sip_uri *contact_uri;
45 contact = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT,
NULL);
50 contact_uri = pjsip_uri_get_uri(contact->uri);
51 if (PJSIP_URI_SCHEME_IS_SIPS(contact_uri)) {
56 if (PJSIP_URI_SCHEME_IS_SIPS(tdata->msg->line.req.uri)) {
57 ast_debug(1,
"Upgrading contact URI on outgoing SIP request to SIPS due to SIPS Request URI\n");
58 pjsip_sip_uri_set_secure(contact_uri, PJ_TRUE);
62 route = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_ROUTE,
NULL);
67 if (!PJSIP_URI_SCHEME_IS_SIPS(&route->name_addr)) {
72 ast_debug(1,
"Upgrading contact URI on outgoing SIP request to SIPS due to SIPS Route header\n");
73 pjsip_sip_uri_set_secure(contact_uri, PJ_TRUE);
79 .name = {
"SIPS Contact", 12 },
81 .priority = PJSIP_MOD_PRIORITY_TSX_LAYER - 2,
105 .requires =
"res_pjsip",
Asterisk main include file. File version handling, generic pbx functions.
#define ast_debug(level,...)
Log a DEBUG message.
int ast_sip_register_service(pjsip_module *module)
Register a SIP service in Asterisk.
Module has failed to load, may be in an inconsistent state.
AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_GLOBAL_SYMBOLS|AST_MODFLAG_LOAD_ORDER, "HTTP Phone Provisioning",.support_level=AST_MODULE_SUPPORT_EXTENDED,.load=load_module,.unload=unload_module,.reload=reload,.load_pri=AST_MODPRI_CHANNEL_DEPEND,.requires="http",)
void ast_sip_unregister_service(pjsip_module *module)
#define ASTERISK_GPL_KEY
The text the key() function should return.
Asterisk module definitions.