MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / b2bl_init_request

Function b2bl_init_request

modules/b2b_logic/logic.c:3378–3412  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3376
3377
3378str *b2bl_init_request(struct sip_msg *msg, struct b2b_params *init_params,
3379 b2bl_cback_f cbf, void* cb_param, unsigned int cb_mask, str* custom_hdrs)
3380{
3381 str* key;
3382 int_str avp_val;
3383
3384 /* parse message to extract needed info */
3385 if (parse_headers(msg, HDR_EOH_F, 0) < 0)
3386 {
3387 LM_ERR("failed to parse message\n");
3388 return NULL;
3389 }
3390
3391 if(init_params->id == B2B_TOP_HIDING_ID_PTR)
3392 key = create_top_hiding_entities(msg, cbf, cb_param, cb_mask,
3393 custom_hdrs, init_params);
3394 else
3395 key = b2b_process_scenario_init(msg, cbf, cb_param, cb_mask,
3396 custom_hdrs, init_params);
3397
3398 if(key)
3399 {
3400 if (b2bl_key_avp_name >= 0)
3401 {
3402 avp_val.s = *key;
3403 if ( add_avp(AVP_VAL_STR|b2bl_key_avp_type, b2bl_key_avp_name,
3404 avp_val)!=0)
3405 {
3406 LM_ERR("failed to build b2bl_key avp\n");
3407 }
3408 }
3409 }
3410
3411 return key;
3412}
3413
3414str* b2bl_api_init(struct sip_msg* msg, str *scen_name,
3415 b2bl_init_params_t *scen_params, b2bl_cback_f cbf, void* cb_param,

Callers 2

b2bl_api_initFunction · 0.85
b2bl_script_init_requestFunction · 0.85

Calls 3

add_avpFunction · 0.85

Tested by

no test coverage detected