<div dir="ltr">After i added create_dialog();   on top of the file then it allowed me to set variable,<div><br></div><div>Just wondering what it does?  is it going to harm if i am using it? because i never use before and everything seems working so what is the advantage of having create_dialog();</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 12:22 PM, Satish Patel <span dir="ltr">&lt;<a href="mailto:satish.txt@gmail.com" target="_blank">satish.txt@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">ignore last email, it was my variable issue. I got it work now :) <div><br></div><div>Thanks you very much! </div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 12:15 PM, Satish Patel <span dir="ltr">&lt;<a href="mailto:satish.txt@gmail.com" target="_blank">satish.txt@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">I am not seeing my custom variable in MI output also i got this error in logs<span><div><br></div><div>ERROR:core:do_assign: setting PV failed<br></div></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 12:04 PM, Liviu Chircu <span dir="ltr">&lt;<a href="mailto:liviu@opensips.org" target="_blank">liviu@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>Yes. You should see that value in the dlg_list_ctx MI command.</tt><div><div><br>
    <br>
    <div>On 05.03.2015 18:56, Satish Patel
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">You means say i just need to add following in in
        top of config?
        <div><br>
        </div>
        <div>
          <div>route { </div>
          <div><br>
          </div>
          <div>          ...</div>
          <div>          ...</div>
          <div>          create_dialog();</div>
          <div>          $dlg_val(customer_name) = $var(name);</div>
        </div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Thu, Mar 5, 2015 at 11:46 AM, Liviu
          Chircu <span dir="ltr">&lt;<a href="mailto:liviu@opensips.org" target="_blank">liviu@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>The dialog must
                be created, otherwise setting your $dlg_val will fail
                (check for &quot;ERROR:core:do_assign: setting PV failed&quot;)<br>
                <br>
                The code you posted is for sequential request handling.
                Normally, the dialog should have been created by the
                time this block is reached.</tt>
              <div>
                <div><br>
                  <br>
                  <div>On 05.03.2015 18:39, Satish Patel wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Thanks Liviu,
                      <div><br>
                      </div>
                      <div>Where should i put this variable in script? I
                        have following code, should i before it create
                        dialog? </div>
                      <div><br>
                      </div>
                      <div><br>
                      </div>
                      <div>
                        <div> if (has_totag()) {</div>
                        <div>                # sequential request
                          withing a dialog should</div>
                        <div>                # take the path determined
                          by record-routing</div>
                        <div>                if (loose_route() ||
                          match_dialog())  {</div>
                        <div>                        if
                          ($DLG_status!=NULL &amp;&amp;
                          !validate_dialog() ) {</div>
                        <div>                                #xlog(&quot;
                          in-dialog bogus request \n&quot;);</div>
                        <div>                               
                          fix_route_dialog();</div>
                        <div>                         } else {</div>
                        <div>                                 #xlog(&quot;
                          in-dialog valid request - $DLG_dir !\n&quot;);</div>
                        <div>                               
                           fix_route_dialog();</div>
                        <div>                        }</div>
                        <div><br>
                        </div>
                      </div>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Thu, Mar 5, 2015 at
                        11:32 AM, Liviu Chircu <span dir="ltr">&lt;<a href="mailto:liviu@opensips.org" target="_blank">liviu@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>Hello
                              Satish,<br>
                              <br>
                              You can use dialog-persistent variables
                              [1]. For example,<br>
                              $dlg_var(customer_name) = $var(name);<br>
                              <br>
                              [1] : <a href="http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id297182" target="_blank">http://www.opensips.org/html/docs/modules/2.1.x/dialog.html#id297182</a><br>
                              <br>
                              Best regards,<br>
                            </tt>
                            <pre cols="72">Liviu Chircu
OpenSIPS Developer
<a href="http://www.opensips-solutions.com" target="_blank">http://www.opensips-solutions.com</a></pre>
                            <div>
                              <div>
                                <div>On 05.03.2015 18:27, Satish Patel
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">Hello,
                                    <div><br>
                                    </div>
                                    <div>How do i add customer info
                                      in opensipsctl fifo dlg_list_ctx
                                      output? </div>
                                    <div><br>
                                    </div>
                                    <div>I want to add custom field (
                                      customer name) in dlg_list_ctx
                                      output </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                          <br>
_______________________________________________<br>
                          Users mailing list<br>
                          <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                          <a 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>
                    <br>
                    <fieldset></fieldset>
                    <br>
                    <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Users mailing list<br>
            <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
            <a 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>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a 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>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>