#include "asterisk.h"
#include <pjsip.h>
#include <pjsip_ua.h>
#include "asterisk/res_pjsip.h"
#include "asterisk/res_pjsip_session.h"
#include "asterisk/module.h"
Go to the source code of this file.
|  | 
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP Empty INFO Support" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, .requires = "res_pjsip,res_pjsip_session", } | 
|  | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
|  | 
| static struct ast_sip_session_supplement | empty_info_supplement | 
|  | 
◆ __reg_module()
  
  | 
        
          | static void __reg_module | ( | void |  | ) |  |  | static | 
 
 
◆ __unreg_module()
  
  | 
        
          | static void __unreg_module | ( | void |  | ) |  |  | static | 
 
 
◆ AST_MODULE_SELF_SYM()
◆ empty_info_incoming_request()
  
  | 
        
          | static int empty_info_incoming_request | ( | struct ast_sip_session * | session, |  
          |  |  | struct pjsip_rx_data * | rdata |  
          |  | ) |  |  |  | static | 
 
Definition at line 47 of file res_pjsip_empty_info.c.
   49{
   50    if (!rdata->msg_info.ctype) {
   51        
   52        
   54        return 1;
   55    }
   56 
   57    
   58    return 0;
   59 
   60}
static struct ast_mansession session
static void send_response(struct ast_sip_session *session, struct pjsip_rx_data *rdata, int code)
References send_response(), and session.
 
 
◆ load_module()
  
  | 
        
          | static int load_module | ( | void |  | ) |  |  | static | 
 
 
◆ send_response()
  
  | 
        
          | static void send_response | ( | struct ast_sip_session * | session, |  
          |  |  | struct pjsip_rx_data * | rdata, |  
          |  |  | int | code |  
          |  | ) |  |  |  | static | 
 
Definition at line 35 of file res_pjsip_empty_info.c.
   37{
   38    pjsip_tx_data *tdata;
   39    pjsip_dialog *dlg = 
session->inv_session->dlg;
 
   40 
   41    if (pjsip_dlg_create_response(dlg, rdata, code, 
NULL, &tdata) == PJ_SUCCESS) {
 
   42        struct pjsip_transaction *tsx = pjsip_rdata_get_tsx(rdata);
   43        pjsip_dlg_send_response(dlg, tsx, tdata);
   44    }
   45}
References NULL, and session.
Referenced by empty_info_incoming_request().
 
 
◆ unload_module()
  
  | 
        
          | static int unload_module | ( | void |  | ) |  |  | static | 
 
 
◆ __mod_info
  
  | 
        
          | struct ast_module_info __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "PJSIP Empty INFO Support" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_APP_DEPEND, .requires = "res_pjsip,res_pjsip_session", } |  | static | 
 
 
◆ ast_module_info
◆ empty_info_supplement
Initial value:= {
    .method = "INFO",
}
@ AST_SIP_SUPPLEMENT_PRIORITY_LAST
static int empty_info_incoming_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
Definition at line 62 of file res_pjsip_empty_info.c.
   62                                                                 {
   63    .method = "INFO",
   66};
Referenced by load_module(), and unload_module().