<div>Try returning the full information on the register. It may be that the variables are read onto the user profile upon registration and since you are only supplying a dumbed down version for registration the variables aren&#39;t being read and cached.</div>

<br clear="all">Regards,<br>    Kevin Green<br><br><div class="gmail_quote">On Thu, Aug 6, 2009 at 7:24 AM, Jim Page <span dir="ltr">&lt;<a href="mailto:jim.page@redmatter.com">jim.page@redmatter.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Afternoon All<br>
<br>
I wonder if someone (perhaps even the illustrious intralanman) could help me out with a problem I am experiencing with a CURL directory.<br>
<br>
In the interests of understanding how the mechanism works, I am using a super-braindead php script to return info about a specific set of users. I plan to move to something more sophisticated once the proof of concept is complete, possibly based on intralanman&#39;s scripts.<br>


<br>
The basic problem is that all works fine (boot, register, voicemail etc), except that user&#39;s &lt;variables&gt; seem not to be being read correctly, eg &#39;toll_allow&#39; and &#39;user_context&#39;. Here&#39;s a typical user XML message I am returning:<br>


<br>
&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>
  &lt;section name=&quot;directory&quot;&gt;<br>
   &lt;domain name=&quot;<a href="http://pbx.redmatter.com" target="_blank">pbx.redmatter.com</a>&quot;&gt;<br>
    &lt;params&gt;<br>
      &lt;param name=&quot;dial-string&quot; value=&quot;{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}&quot;/&gt;<br>
    &lt;/params&gt;<br>
<br>
    &lt;variables&gt;<br>
      &lt;variable name=&quot;record_stereo&quot; value=&quot;true&quot;/&gt;<br>
      &lt;variable name=&quot;default_gateway&quot; value=&quot;$${default_provider}&quot;/&gt;<br>
      &lt;variable name=&quot;default_areacode&quot; value=&quot;$${default_areacode}&quot;/&gt;<br>
      &lt;variable name=&quot;transfer_fallback_extension&quot; value=&quot;operator&quot;/&gt;<br>
    &lt;/variables&gt;<br>
<br>
    &lt;groups&gt;<br>
      &lt;group name=&quot;default&quot;&gt;<br>
        &lt;users&gt;            &lt;user id=&quot;1009&quot; cidr=&quot;<a href="http://172.30.99.0/24" target="_blank">172.30.99.0/24</a>&quot;&gt;<br>
               &lt;params&gt;<br>
                 &lt;param name=&quot;password&quot; value=&quot;$${default_password}&quot;/&gt;<br>
                 &lt;param name=&quot;vm-password&quot; value=&quot;1009&quot;/&gt;<br>
                 &lt;param name=&quot;vm-email-all-messages&quot; value=&quot;true&quot;/&gt;<br>
                 &lt;param name=&quot;vm-attach-file&quot; value=&quot;true&quot;/&gt;<br>
                 &lt;param name=&quot;vm-mailto&quot; value=&quot;<a href="mailto:1009@redmatter.com">1009@redmatter.com</a>&quot;/&gt;<br>
                 &lt;param name=&quot;vm-keep-local-after-email&quot; value=&quot;true&quot;/&gt;<br>
                 &lt;param name=&quot;vm_message_ext&quot; value=&quot;mp3&quot;/&gt;<br>
               &lt;/params&gt;<br>
               &lt;variables&gt;<br>
                 &lt;variable name=&quot;toll_allow&quot; value=&quot;domestic,international,local&quot;/&gt;<br>
                 &lt;variable name=&quot;accountcode&quot; value=&quot;1009&quot;/&gt;<br>
                 &lt;variable name=&quot;user_context&quot; value=&quot;default&quot;/&gt;<br>
                 &lt;variable name=&quot;effective_caller_id_name&quot; value=&quot;Extension 1009&quot;/&gt;<br>
                 &lt;variable name=&quot;effective_caller_id_number&quot; value=&quot;1009&quot;/&gt;<br>
                 &lt;variable name=&quot;outbound_caller_id_name&quot; value=&quot;$${outbound_caller_name}&quot;/&gt;<br>
                 &lt;variable name=&quot;outbound_caller_id_number&quot; value=&quot;$${outbound_caller_id}&quot;/&gt;<br>
                 &lt;variable name=&quot;callgroup&quot; value=&quot;techsupport&quot;/&gt;<br>
               &lt;/variables&gt;<br>
             &lt;/user&gt;        &lt;/users&gt;<br>
      &lt;/group&gt;<br>
    &lt;/groups&gt;<br>
   &lt;/domain&gt;<br>
 &lt;/section&gt;<br>
&lt;/document&gt;<br>
<br>
I return this kind of message in all cases except the (sip_auth_method==&quot;REGISTER&quot;) request message where I return<br>
<br>
&lt;document type=&quot;freeswitch/xml&quot;&gt;<br>
  &lt;section name=&quot;directory&quot;&gt;<br>
    &lt;domain name=&quot;<a href="http://pbx.redmatter.com" target="_blank">pbx.redmatter.com</a>&quot;&gt;<br>
      &lt;user id=&quot;1007&quot;&gt;<br>
        &lt;params&gt;<br>
          &lt;param name=&quot;password&quot; value=&quot;1234&quot;/&gt;<br>
        &lt;/params&gt;<br>
      &lt;/user&gt;<br>
    &lt;/domain&gt;<br>
  &lt;/section&gt;<br>
&lt;/document&gt;<br>
<br>
Also it&#39;s probably worth mentioning that I have removed all trace of xml from conf/directory and I don&#39;t believe there is a conflict happening there.<br>
<br>
The phones register correctly. The trouble is they don&#39;t operate on the correct dialplan context (I fixed that by hardcoding the internal gateway to dialplan default), but the &#39;toll_allow&#39; variable is now not working so that outbound calls fail, which is what made me think that the user variables are being ignored.<br>


<br>
Freeswitch version is 1.0.4, built by me and running on a dell 1950 running Centos 5.3 x86_64. HTTP application is running on standard Centos 5.3 apache/php.<br>
<br>
Any ideas gratefully and humbly received.<br>
<br>
All the best<br>
Jim<br>
<br>
_______________________________________________<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
</blockquote></div><br>