<div dir="ltr"><div><div><div>Thank you Daniel for the explanation.<br><br></div>I managed to achieve the goal by "profiles_with_value" parameter and passed "$rU" but each user might have multiple numbers so I had to  get_profile_size for each number.<br><br></div>However, adding support for variables would be a great help.<br><br></div>I will give a try to the KSA module later.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 11 Jan 2021 at 14:56, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div>
    <p>Hello,</p>
    <p>I haven't checked the code, but I think that the function was
      designed with static parameter to be able to lookup the profile
      structure at startup and keep the pointer to it in order to be
      faster at runtime.</p>
    <p>Adding support for variables is possible of course, it would
      require a bit of c development.</p>
    <p>At this moment you can use embedded scripting (e.g., Lua, Python,
      JavaScript, ... see app_lua, ...) and execute functions via KSR
      module, i.e.,:</p>
    <p>  -
<a href="http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#ksrdialogset_dlg_profile" target="_blank">http://kamailio.org/docs/tutorials/devel/kamailio-kemi-framework/modules/#ksrdialogset_dlg_profile</a></p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <div>On 08.01.21 07:44, Muhammad Sohaib
      wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div>Is it possible to insert the current dialog into the
          profile by using the following way?</div>
        <div><br>
        </div>
        <div>modparam("dialog", "profiles_no_value", "mytest;xyz")</div>
        <div><br>
        </div>
        <div>$var(profilename)="xyz";<br>
          set_dlg_profile("
          $var(profilename)
          ");</div>
        <div><br>
        </div>
        <div>Currently it is giving errors and not allowing to use
          variable instead of static profile name. <br>
        </div>
        <div><br>
        </div>
        <div>Or is there any alternative to pass profile name as
          variable?<br>
        </div>
        <div>
          <div><br>
            ---<br>
            <div dir="ltr">
              <div dir="ltr">Thanks,</div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Funding: <a href="https://www.paypal.me/dcmierla" target="_blank">https://www.paypal.me/dcmierla</a></pre>
  </div>

</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Thanks,</div></div>