<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Hi,<br>
    <br>
    For example you could store some meaning-full information in the
    dr_gateways attrs field, which will get populated in the
    gw_attrs_avp ( see [1] ) when you do do_routing() or use_next_gw() .
    You could use the info in that AVP to store the profiles, like<br>
    &nbsp;&nbsp;&nbsp; set_dlg_profile("gateways","$avp(gw_attrs)");<br>
    and then call the profile_get_size MI command with the attr of the
    specific GW you are interested on.<br>
    <br>
    [1]
    <a class="moz-txt-link-freetext" href="http://www.opensips.org/html/docs/modules/1.8.x/drouting.html#id292866">http://www.opensips.org/html/docs/modules/1.8.x/drouting.html#id292866</a><br>
    <br>
    Regards,<br>
    <pre class="moz-signature" cols="72">Vlad Paiu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a> </pre>
    <br>
    On 03/30/2012 09:26 PM, Ali Pey wrote:
    <blockquote
cite="mid:CA+q4kRLYyhrvnv-YfU7os1abeMfcd_k=3t9Uam06Qm_qbeP_Jg@mail.gmail.com"
      type="cite">Hi Vlad,
      <div><br>
      </div>
      <div>So when I call the&nbsp;<code class="function"
          style="background-color: rgb(255, 255, 255);"><font
            face="tahoma, sans-serif">do_routing()</font>&nbsp;</code><span
          style="font-family: Helvetica,Arial;">function, how would I
          know where it eventually routed the call?</span></div>
      <div><span style="font-family: Helvetica,Arial;"><br>
        </span></div>
      <div><span style="font-family: Helvetica,Arial;">Regards,</span></div>
      <div>Ali</div>
      <div><br>
      </div>
      <div><br>
        <div class="gmail_quote">On Fri, Mar 30, 2012 at 12:28 PM, Vlad
          Paiu <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:vladpaiu@opensips.org">vladpaiu@opensips.org</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
            0.8ex; border-left: 1px solid rgb(204, 204, 204);
            padding-left: 1ex;">
            <div bgcolor="#ffffff" text="#000000"> Hello,<br>
              <br>
              The DR module does not support such a feature, but you can
              implement it manually, from your script.<br>
              Just create different dialog profiles for each of your
              carrier, and each time you route to a specific carrier,
              set the dialog as belonging to the coresponding profile
              with the set_dlg_profile() function ( see [1] ).<br>
              After that you can use the profile_get_size MI command (
              see [2] ) in order to fetch the actual number of ongoing
              calls per carrier.<br>
              <br>
              [1] <a moz-do-not-send="true"
                href="http://www.opensips.org/html/docs/modules/devel/dialog#id294472"
                target="_blank">http://www.opensips.org/html/docs/modules/devel/dialog#id294472</a><br>
              [2] <a moz-do-not-send="true"
                href="http://www.opensips.org/html/docs/modules/devel/dialog#id295442"
                target="_blank">http://www.opensips.org/html/docs/modules/devel/dialog#id295442</a>
              <div class="im"><br>
                <br>
                Regards,
                <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre>
                <br>
              </div>
              <div class="im"> On 03/30/2012 04:34 PM, Ali Pey wrote:
                <blockquote type="cite">Thank you Vlad.
                  <div><br>
                  </div>
                  <div>In load balancer module you can use the lb_list
                    command to see the current load for each
                    destination. That's very useful for
                    monitoring/reporting tools. Is there a similar
                    command for the DR module?</div>
                  <div><br>
                  </div>
                  <div>How can I see the current load for a carrier or
                    gateway in DR module?</div>
                  <div><br>
                  </div>
                  <div>Regards,</div>
                  <div>Ali</div>
                  <div><br>
                    <br>
                    <div class="gmail_quote">On Fri, Mar 30, 2012 at
                      4:46 AM, Vlad Paiu <span dir="ltr">&lt;<a
                          moz-do-not-send="true"
                          href="mailto:vladpaiu@opensips.org"
                          target="_blank">vladpaiu@opensips.org</a>&gt;</span>
                      wrote:<br>
                      <blockquote class="gmail_quote" style="margin: 0pt
                        0pt 0pt 0.8ex; border-left: 1px solid rgb(204,
                        204, 204); padding-left: 1ex;">
                        <div bgcolor="#ffffff" text="#000000"> Hello,<br>
                          <br>
                          Yes, you could do that. Just use the
                          drouting's is_from_gw() function ( docs at [1]
                          ) to detect direction. If is_from_gw() returns
                          true, apply your load-balancer logic,
                          otherwise apply the DR logic.<br>
                          <br>
                          [1] <a moz-do-not-send="true"
href="http://www.opensips.org/html/docs/modules/1.8.x/drouting.html#id293884"
                            target="_blank">http://www.opensips.org/html/docs/modules/1.8.x/drouting.html#id293884</a>
                          <div><br>
                            <br>
                            Regards,<br>
                            <pre cols="72">Vlad Paiu
OpenSIPS Developer
<a moz-do-not-send="true" href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a> </pre>
                            <br>
                          </div>
                          <div>
                            <div> On 03/29/2012 11:53 PM, Ali Pey wrote:
                              <blockquote type="cite">Is it possible to
                                use the load balancer module on one
                                direction- from carriers to media
                                gateways and the DR module on the other
                                direction- from media gateways to
                                carriers.
                                <div><br>
                                </div>
                                <div>Regards,<br>
                                  <div>Ali</div>
                                  <div> <br>
                                  </div>
                                </div>
                              </blockquote>
                            </div>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                  </div>
                  <br>
                </blockquote>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users"
              target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>