[OpenSIPS-Users] Question regarding b2b_bridge function

Ping Han pinghan022 at gmail.com
Fri Jun 3 05:27:27 CEST 2016


Thanks, Bogdan,

It seems the function you mentioned is the internal function  "1.4.2
b2b_bridge_request(b2bl_key,entity_no)".

Actually the function that I am trying to use is the "b2b_bridge" (Exported
MI Functions). It is defined as below
----------------------------------
http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210


1.5.2.  b2b_bridge

Example: opensipsctl b2b_bridge 1020.30 sip:alice at opensips.org
----------------------------------

In the example "1020.30" is the "dialog-id". This is the parameter that I
am not sure how to easily access in the Opensips config.

What I am trying to do is to get the value and deliver to the next hop via
a custom SIP header. When the next hop tries to transfer the call to a new
destination. It can run the b2b_bridge command straight away with the
"dialog-id" without rechieving the value from the Opensips database (from
b2b_logic or b2b_entities tables).

Any advice will be appreciated.

Thanks,
Ping


On Thu, Jun 2, 2016 at 5:35 PM, Bogdan-Andrei Iancu <bogdan at opensips.org>
wrote:

> Hi Ping,
>
> In script, in a b2b route, you can look at the callid or TO tag (depending
> on the direction) to get the key :
>
> http://www.opensips.org/html/docs/modules/2.2.x/b2b_logic.html#id294094
>
> The B2B uses that key as Call-ID when acting as UAC and as To tag when
> acting as UAS. You can run a SIP capture to see the traffic.
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>
> On 02.06.2016 05:13, Ping Han wrote:
>
> Hi Bogdan,
>
> Thanks for the information.
>
> I need the value in the Opensips cfg.
>
> I understand that I can query the b2b_logic or b2b_entities tables to get
> the value in Opensips config. Apart from that could you tell me other way
> to easily access the value in Opensips config?
>
> Thanks,
> Ping
>
>
>
> On Wed, Jun 1, 2016 at 5:13 PM, Bogdan-Andrei Iancu <
> <bogdan at opensips.org>bogdan at opensips.org> wrote:
>
>> Hi Ping,
>>
>> Indeed, my bad - the docs are not updated, as that param was disabled
>> long time ago (4 years ago):
>>     https://sourceforge.net/p/opensips/bugs/502/
>>
>> Still, there are available option. But the question is : do you need that
>> value in OpenSIPS cfg or outside OpenSIPS ? as there are different way to
>> get the ID.
>>
>> Regards,
>>
>> Bogdan-Andrei Iancu
>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>
>> On 01.06.2016 03:48, Ping Han wrote:
>>
>> Hi Bogdan,
>>
>> Thank you very much for your reply.
>>
>> I have tried to use the module parameter "b2bl_key_avp" as described in
>> the document as below.
>>
>> ------------------------------------
>> modparam("b2b_logic", "b2bl_key_avp", "$avp(99)")
>> ------------------------------------
>>
>> However, I got the following errors when the Opensips is restarted.
>> ------------------------------------
>> ERROR:core:set_mod_param_regex: parameter <b2bl_key_avp> not found in
>> module <b2b_logic>
>> ------------------------------------
>>
>> I am using the Opensips version opensips-2.1.2-1.el6.x86_64 (rpm).
>>
>> Thanks,
>> Chris
>>
>> On Tue, May 31, 2016 at 6:01 PM, Bogdan-Andrei Iancu <
>> <bogdan at opensips.org>bogdan at opensips.org> wrote:
>>
>>> Hi Chris,
>>>
>>> The "dialog_id" is actually the b2b key, that is expose by the b2b_logic
>>> via the module parameter b2bl_key_avp. See:
>>>
>>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094
>>>
>>> That key can also be found in the b2b_logic table in DB.
>>>
>>> At signaling level, the key is the Call-ID of the outbound calls from
>>> b2b.
>>>
>>> Regards,
>>>
>>> Bogdan-Andrei Iancu
>>> OpenSIPS Founder and Developerhttp://www.opensips-solutions.com
>>>
>>> On 23.05.2016 07:32, Ping Han wrote:
>>>
>>> Hi Bogdan,
>>>
>>> I asked the question a few days ago but have not got a response.
>>>
>>> I am just wondering if I could get some advice from you.
>>>
>>> Any advice will be appreciated.
>>>
>>> Thanks,
>>> Chris
>>>
>>> On Wed, May 18, 2016 at 4:39 PM, Ping Han < <pinghan022 at gmail.com>
>>> pinghan022 at gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to use the b2b_bridge fifo function as specified at
>>>> <http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916>
>>>> http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916
>>>> .
>>>>
>>>> The function will be triggered by a third party. I will need to pass
>>>> the parameters to the third party for it to trigger the function. One of
>>>> the parameters is the "dialog-id".
>>>>
>>>> The problem is that I am not sure how the value of the dialog-id can be
>>>> available in the Opensips config. Is there any Opensips modules/function
>>>> that can retrieve the value of the dialog-id?
>>>>
>>>> I tried to get the value from the "b2b_entities" and "b2b_logic" table.
>>>> However, it seems that it does not work this way because the two tables do
>>>> not pop the data in real time. Sometimes I can see the data but sometimes I
>>>> am not able to see it.
>>>>
>>>> It is appreciated that you can give me some idea.
>>>>
>>>> Thanks,
>>>>
>>>> Ping
>>>>
>>>
>>>
>>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160603/fa212157/attachment-0001.htm>


More information about the Users mailing list