41    pjsip_contact_hdr *contact;
 
   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.
Asterisk module definitions.
#define AST_MODULE_INFO(keystr, flags_to_set, desc, fields...)
@ AST_MODULE_SUPPORT_CORE
#define ASTERISK_GPL_KEY
The text the key() function should return.
@ AST_MODULE_LOAD_SUCCESS
@ AST_MODULE_LOAD_DECLINE
Module has failed to load, may be in an inconsistent state.
void ast_sip_unregister_service(pjsip_module *module)
int ast_sip_register_service(pjsip_module *module)
Register a SIP service in Asterisk.