[OpenSIPS-Devel] [ opensips-Bugs-3295358 ] b2b_logic -> b2bl_key_avp -- possible bug

SourceForge.net noreply at sourceforge.net
Sun May 1 07:09:02 CEST 2011


Bugs item #3295358, was opened at 2011-04-30 08:54
Message generated for change (Comment added) made by osas
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3295358&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: trunk
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: b2b_logic -> b2bl_key_avp -- possible bug

Initial Comment:
Hi Anca,

It's me again. Sorry to bother you, but I need to clarify something that looks like a bug to me.

Because of the dialog module leading to the issues I reported earlier, I'm looking for a way to pass some data from leg1 to leg2.
It seems like the b2bl_key_avp option is the right one for me, but I'm facing some troubles.

Reading here:
http://www.opensips.org/html/docs/modules/devel/b2b_logic.html#id250244

It says: "The name of the Attribute-Value-Pair (AVP) used to store the b2b_logic entity key."

What really is the b2b_logic entity key ?

I have:
modparam("b2b_logic", "b2bl_key_avp", "$avp(i:99)")

and after calling: 
b2b_init_request("top hiding");

the $avp(i:99) is equal to 642.0 and the $ci is B2B.642.954463

Isn't B2B.642.954463 what should be assigned to $avp(i:99) ?

Because of that difference I have to do:

route[b2b_reply] {
        if (is_method("INVITE")) {
                cache_fetch("memcached_local","b2b_call_info_$avp(i:99)",$avp(s:call_setup));
                xlog("[leg2]INVITE GOT ($avp(i:99)): $avp(s:call_setup)\n");
                cache_store("memcached_local","b2b_call_info_$ci","$avp(s:call_setup)",14400);
        }
}

route {
....
     b2b_init_request("top hiding");
     cache_store("memcached_local","b2b_call_info_$avp(i:99)","$json(cs)",14400);
....
}

If there is any way to know the B2B call id, then I can skip the whole b2b_reply manipulation.

Please advise.

A fan of you:
-- Kamen :)

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2011-05-01 01:09

Message:
b2b_logic entity key are never duplicated (i.e. there will be no two
identical keys at the same point in time).  However, once a call is
terminated, a b2b_logic key can be reused.

For now, you can only specify which headers can be passed from leg1 into
leg2:
http://www.opensips.org/html/docs/modules/devel/b2b_logic.html#id250014
or, you can set a custom from header:
http://www.opensips.org/html/docs/modules/devel/b2b_logic.html#id250292


Regards,
Ovidiu Sas

----------------------------------------------------------------------

Comment By: https://www.google.com/accounts ()
Date: 2011-04-30 16:11

Message:
Hi Osas,

Ok, that makes sense, but:

1) if there are let say 5000 concurrent calls, what is the chance for the
b2b_logic entity key to get duplicated ?
2) since the top hiding scenario resets all the applied avps, how could I
pass a parameter between the:
   - before top hiding
   - after top hiding

All what I need is a way to see the leg1 Call-ID in leg2.

Thank you for your time
-- Kamen

----------------------------------------------------------------------

Comment By: Ovidiu Sas (osas)
Date: 2011-04-30 10:24

Message:
When a B2B call is created, there are:
 - one b2b_logic entity
 - two b2b_entities entities

The avp that you is set via the b2b_logic modparam is for the key of the
b2b_logic entity and it has the correct value.  This key is not visible in
any part of a SIP message that is part of the call.
The b2b_entities entities keys are identifying the caller/callee (those
are with the special format: B2B.XXX.YYY).  These keys are used in the
call-id field of the callee and in the to-tag of the caller.  Please note,
that in some scenario, one of the participants may be replaced with another
and these keys will change.  However, for the duration of the call (even if
any of the participants are replaced) the b2b_logic key is still the same.

The b2b_logic key is useful while inspecting the internals of the
b2b_logic context:
opensipsctl fifo b2b_list <b2b_logic_key>.

Regards,
Ovidiu Sas

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3295358&group_id=232389



More information about the Devel mailing list