<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <tt>Hi,<br>
      <br>
      The flows and agents must be defined via the DB, there is no way
      around this.<br>
      <br>
      Regards,<br>
    </tt>
    <pre class="moz-signature" cols="72">Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  <a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a>
OpenSIPS Summit 2018
  <a class="moz-txt-link-freetext" href="http://www.opensips.org/events/Summit-2018Amsterdam">http://www.opensips.org/events/Summit-2018Amsterdam</a>
</pre>
    <div class="moz-cite-prefix">On 06/29/2018 07:56 PM, SamyGo wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJUJwtj4i5-mEpEE0co8OLsfwuDtpPgC0010w6fP+YhR7RgFCA@mail.gmail.com">
      <div dir="ltr">Hi,
        <div><br>
          <div>Is it possible to have agents and flows created in
            realtime w/o them being pre-defined into the DB ?<br>
            I'm thinking that I login agents to a flow when they
            Register and handle calls in a flow w/o DB engaged. !</div>
          <div><br>
          </div>
          <div>something like:</div>
          <div><br>
          </div>
          <div><font face="monospace, monospace">loadmodule
              "call_center.so"</font></div>
          <div><font face="monospace, monospace">modparam("call_center",
              "db_mode", 0)<br>
            </font></div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>So, what happens next is, I can dynamically create flow
            and login agents into it. </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><font face="monospace, monospace">if(is_method("REGISTER")){<br>
                    $avp(flow_name) = $hdr(X-Queue-Name);<br>
                    cc_agent_login("$avp(flow_name)","1");<br>
              }</font><br>
            ...</div>
          <div>...<br>
            <font face="monospace, monospace">if( $si = "PROVIDER"
              && is_method("INVITE") && !has_totag()) {<br>
              <br>
                     # some FlowName finding via DB query or rest_post
              or anything here<br>
              <br>
            </font>
            <div><font face="monospace, monospace">       if
                (!cc_handle_call("$avp(flow_name")) {</font></div>
            <div><font face="monospace, monospace">         
                 send_reply("403","Cannot handle call");</font></div>
            <div><font face="monospace, monospace">           exit;</font></div>
            <div><font face="monospace, monospace">       }</font></div>
            <div><font face="monospace, monospace">}</font></div>
            <br>
          </div>
          <div><br>
          </div>
          <div>I most certainly don't want to do MI fifo reloading and
            scripting inside the opensips.cfg to make above happen but
            it is an option available for me right now. </div>
          <div><br>
          </div>
          <div>Awaiting positive feedback on this.</div>
          <div><br>
          </div>
          <div>Regards,</div>
          <div>Sammy</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
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>
    <br>
  </body>
</html>