<div dir="ltr">Thanks, Bogdan,<div><br></div><div>I have done a few testing. It seems only the value of the param works for this function. However, it does not look like the callid and the to-tag. </div><div>Is it possible to get the param value in the Opensips config? </div><div><br></div><div>Please see the test results below. <br><div><br><div>---------------------------------</div><div><div>[root@opensips-02 ~]# opensipsctl fifo b2be_list</div><div>dlg:: 37 param=<span style="background-color:rgb(255,255,0)">237.0</span> state=5 last_invite_cseq=1 last_method=0 last_reply_code=200 db_flag=2</div><div>        ruri:: <a href="http://sip:2401012350@10.216.235.38:5060">sip:2401012350@10.216.235.38:5060</a></div><div>        callid:: NjEyZWEyOTEwZmVlZDIzOTViMTc3YjJiMmJmY2RjODI.</div><div>        from:: &quot;Tropo test&quot; uri=<a href="http://sip:2401012350@10.216.235.115:5060">sip:2401012350@10.216.235.115:5060</a> tag=1e53cf61</div><div>        to:: &quot;2401012350&quot; uri=<a href="http://sip:2401012350@10.216.235.115:5060">sip:2401012350@10.216.235.115:5060</a> tag=<span style="background-color:rgb(255,153,0)">B2B.297.37</span></div><div>        cseq::  caller=1 callee=1</div><div>        route_set::  caller=&lt;sip:10.216.235.72;lr;ftag=1e53cf61&gt;,&lt;sip:10.216.235.115;lr;ftag=1e53cf61&gt;</div><div>        contact::  caller=<a href="http://sip:2401012350@10.203.1.196:22238">sip:2401012350@10.203.1.196:22238</a> callee=sip:<a href="http://10.216.235.72:5060">10.216.235.72:5060</a></div><div>        send_sock:: 10.216.235.72</div><div>dlg:: 6715348 param=<span style="background-color:rgb(255,255,0)">237.0</span> state=5 last_invite_cseq=2 last_method=4 db_flag=2</div><div>        callid:: <span style="background-color:rgb(0,255,0)">B2B.237.6715348</span></div><div>        from:: &quot;Tropo test&quot; uri=<a href="http://sip:2401012350@10.216.235.115:5060">sip:2401012350@10.216.235.115:5060</a> tag=44623c403b25fd7905bfa7a7325b2b8f</div><div>        to::  uri=<a href="http://sip:dialog@10.216.235.38:5060">sip:dialog@10.216.235.38:5060</a> tag=40711690</div><div>        cseq::  caller=2 callee=1</div><div>        contact::  caller=sip:<a href="http://10.216.235.72:5060">10.216.235.72:5060</a> callee=sip:<a href="http://10.216.235.38:5060">10.216.235.38:5060</a></div><div>        send_sock:: 10.216.235.72</div><div>        LEGS::</div><div>                leg:: 0 tag=40711690 cseq=2 contact=sip:<a href="http://10.216.235.38:5060">10.216.235.38:5060</a></div><div><br></div><div>[root@opensips-02 ~]# opensipsctl fifo b2b_bridge <span style="background-color:rgb(0,255,0)">237.6715348</span> <a href="mailto:sip%3A123@10.203.1.196">sip:123@10.203.1.196</a>  (this is the callid with out the &quot;B2B&quot; prefix)</div><div>500 command &#39;b2b_bridge&#39; failed</div><div><br></div><div>[root@opensips-02 ~]# opensipsctl fifo b2b_bridge <span style="background-color:rgb(255,153,0)">297.37</span>  <a href="mailto:sip%3A123@10.203.1.196">sip:123@10.203.1.196</a>  (this is the To-tag)</div><div>500 command &#39;b2b_bridge&#39; failed</div><div><br></div><div>[root@opensips-02 ~]# opensipsctl fifo b2b_bridge <span style="background-color:rgb(255,255,0)">237.0</span> <a href="mailto:sip%3A123@10.203.1.196">sip:123@10.203.1.196</a> (this is the value of param, only this works)</div></div><div><br></div><div>---------------------------------<br></div><div><br></div><div>Regards,</div><div>Ping </div><div><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 6:54 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <tt>Hi Ping,<br>
      <br>
      b2b_bridge_request() is a script function:<br>
         
      <a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094</a><br>
      <br>
      I pointed to this function as you mentioned (on my question) that
      you want to do the bridging from script level.<br>
      <br>
      Indeed, the equivalent MI function is b2b_bridge:<br>
         
      <a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210</a><br>
      <br>
      If you want to get that </tt><tt>&quot;1020.30&quot;, you can get it from
      Call-ID or To tag, where you have B2B.</tt><tt><tt>1020.30 (so you
        have to strip that B2B prefix).<br>
        <br>
        Regards,<br>
        <br>
      </tt></tt><span class="">
    <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
    </span><div><div class="h5"><div>On 03.06.2016 06:27, Ping Han wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">Thanks, Bogdan,<br>
        <br>
        It seems the function you mentioned is the internal function
         &quot;1.4.2 b2b_bridge_request(b2bl_key,entity_no)&quot;. <br>
        <br>
        Actually the function that I am trying to use is the
        &quot;b2b_bridge&quot; (Exported MI Functions). It is defined as below<br>
        ----------------------------------<br>
        <a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294210</a><br>
        <br>
        <br>
        1.5.2.  b2b_bridge<br>
        <br>
        Example: opensipsctl b2b_bridge 1020.30 <a href="mailto:sip%3Aalice@opensips.org" target="_blank"></a><a href="mailto:sip:alice@opensips.org" target="_blank">sip:alice@opensips.org</a><br>
        ----------------------------------<br>
        <br>
        In the example &quot;1020.30&quot; is the &quot;dialog-id&quot;. This is the
        parameter that I am not sure how to easily access in the
        Opensips config. <br>
        <br>
        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 &quot;dialog-id&quot; without
        rechieving the value from the Opensips database (from b2b_logic
        or b2b_entities tables). 
        <div><br>
        </div>
        <div>Any advice will be appreciated.</div>
        <div><br>
        </div>
        <div>Thanks,</div>
        <div>Ping<br>
          <br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Jun 2, 2016 at 5:35 PM,
          Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span> wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi Ping,<br>
                <br>
                In script, in a b2b route, you can look at the callid or
                TO tag (depending on the direction) to get the key :<br>
                    <a href="http://www.opensips.org/html/docs/modules/2.2.x/b2b_logic.html#id294094" target="_blank">http://www.opensips.org/html/docs/modules/2.2.x/b2b_logic.html#id294094</a><br>
                <br>
                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.<br>
                <br>
                Regards,<br>
              </tt><span>
                <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
              </span>
              <div>
                <div>
                  <div>On 02.06.2016 05:13, Ping Han wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hi Bogdan,<br>
                      <br>
                      Thanks for the information. <br>
                      <br>
                      I need the value in the Opensips cfg. <br>
                      <br>
                      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?
                      <div><br>
                      </div>
                      <div>Thanks,</div>
                      <div>Ping<br>
                        <div><br>
                        </div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Wed, Jun 1, 2016 at
                        5:13 PM, Bogdan-Andrei Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi
                              Ping,<br>
                              <br>
                              Indeed, my bad - the docs are not updated,
                              as that param was disabled long time ago
                              (4 years ago):<br>
                                  <a href="https://sourceforge.net/p/opensips/bugs/502/" target="_blank">https://sourceforge.net/p/opensips/bugs/502/</a><br>
                              <br>
                              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.<br>
                              <br>
                              Regards,<br>
                            </tt><span>
                              <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            </span>
                            <div>
                              <div>
                                <div>On 01.06.2016 03:48, Ping Han
                                  wrote:<br>
                                </div>
                                <blockquote type="cite">
                                  <div dir="ltr">Hi Bogdan,
                                    <div><br>
                                    </div>
                                    <div>Thank you very much for your
                                      reply. </div>
                                    <div><br>
                                    </div>
                                    <div>I have tried to use the module
                                      parameter &quot;b2bl_key_avp&quot; as
                                      described in the document as
                                      below.</div>
                                    <div><br>
                                    </div>
                                    <div>
                                      <div>------------------------------------</div>
                                      <div>modparam(&quot;b2b_logic&quot;,
                                        &quot;b2bl_key_avp&quot;, &quot;$avp(99)&quot;)</div>
                                      <div>------------------------------------<br>
                                      </div>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>However, I got the following
                                      errors when the Opensips is
                                      restarted. </div>
                                    <div>------------------------------------<br>
                                    </div>
                                    <div>ERROR:core:set_mod_param_regex:
                                      parameter &lt;b2bl_key_avp&gt; not
                                      found in module &lt;b2b_logic&gt;<br>
                                    </div>
                                    <div>------------------------------------<br>
                                    </div>
                                    <div><br>
                                    </div>
                                    <div>I am using the Opensips version
                                      opensips-2.1.2-1.el6.x86_64 (rpm).</div>
                                    <div><br>
                                    </div>
                                    <div>Thanks,</div>
                                    <div>Chris</div>
                                  </div>
                                  <div class="gmail_extra"><br>
                                    <div class="gmail_quote">On Tue, May
                                      31, 2016 at 6:01 PM, Bogdan-Andrei
                                      Iancu <span dir="ltr">&lt;<a href="mailto:bogdan@opensips.org" target="_blank"></a><a href="mailto:bogdan@opensips.org" target="_blank">bogdan@opensips.org</a>&gt;</span>
                                      wrote:<br>
                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                        <div text="#000000" bgcolor="#FFFFFF"> <tt>Hi
                                            Chris,</tt><tt><br>
                                          </tt><tt><br>
                                          </tt><tt>The &quot;dialog_id&quot; is
                                            actually the b2b key, that
                                            is expose by the b2b_logic
                                            via the module parameter </tt><tt>b2bl_key_avp.



                                            See:</tt><tt><br>
                                          </tt><tt>    <a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094" target="_blank"></a><a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id294094</a></tt><tt><br>
                                          </tt><tt><br>
                                          </tt><tt>That key can also be
                                            found in the b2b_logic table
                                            in DB.</tt><tt><br>
                                          </tt><tt><br>
                                          </tt><tt>At signaling level,
                                            the key is the Call-ID of
                                            the outbound calls from b2b.</tt><tt><br>
                                          </tt><tt><br>
                                            Regards,<br>
                                          </tt>
                                          <pre cols="72">Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                                          <div>
                                            <div>
                                              <div>On 23.05.2016 07:32,
                                                Ping Han wrote:<br>
                                              </div>
                                              <blockquote type="cite">
                                                <div dir="ltr">Hi
                                                  Bogdan,
                                                  <div><br>
                                                  </div>
                                                  <div>I asked the
                                                    question a few days
                                                    ago but have not got
                                                    a response. </div>
                                                  <div><br>
                                                  </div>
                                                  <div>I am just
                                                    wondering if I could
                                                    get some advice from
                                                    you. </div>
                                                  <div><br>
                                                  </div>
                                                  <div>Any advice will
                                                    be appreciated.</div>
                                                  <div><br>
                                                  </div>
                                                  <div>Thanks,</div>
                                                  <div>Chris </div>
                                                  <div class="gmail_extra"><br>
                                                    <div class="gmail_quote">On
                                                      Wed, May 18, 2016
                                                      at 4:39 PM, Ping
                                                      Han <span dir="ltr">&lt;<a href="mailto:pinghan022@gmail.com" target="_blank"></a><a href="mailto:pinghan022@gmail.com" target="_blank">pinghan022@gmail.com</a>&gt;</span>
                                                      wrote:<br>
                                                      <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                                        <div dir="ltr">
                                                          <div>Hi, </div>
                                                          <div><br>
                                                          </div>
                                                          <div>I would
                                                          like to use
                                                          the b2b_bridge
                                                          fifo function
                                                          as specified
                                                          at <a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916" target="_blank"></a><a href="http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/b2b_logic.html#id248916</a>.</div>
                                                          <div><br>
                                                          </div>
                                                          <div>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
                                                          &quot;dialog-id&quot;. </div>
                                                          <div><br>
                                                          </div>
                                                          <div>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? </div>
                                                          <div><br>
                                                          </div>
                                                          <div>I tried
                                                          to get the
                                                          value from the
                                                          &quot;b2b_entities&quot;
                                                          and
                                                          &quot;b2b_logic&quot;
                                                          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. </div>
                                                          <div><br>
                                                          </div>
                                                          <div>It is
                                                          appreciated
                                                          that you can
                                                          give me some
                                                          idea. </div>
                                                          <div><br>
                                                          </div>
                                                          <div>Thanks,</div>
                                                          <div><br>
                                                          </div>
                                                          <div>Ping </div>
                                                        </div>
                                                      </blockquote>
                                                    </div>
                                                    <br>
                                                  </div>
                                                </div>
                                              </blockquote>
                                              <br>
                                            </div>
                                          </div>
                                        </div>
                                      </blockquote>
                                    </div>
                                    <br>
                                  </div>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </div></div></div>

</blockquote></div><br></div>