Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] CURL directory issue


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
jim.page at redmatter.com
Guest





PostPosted: Thu Aug 06, 2009 10:56 am    Post subject: [Freeswitch-users] CURL directory issue Reply with quote

Afternoon All

I wonder if someone (perhaps even the illustrious intralanman) could help me out with a problem I am experiencing with a CURL directory.

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's scripts.

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

<document type="freeswitch/xml">
<section name="directory">
<domain name="pbx.redmatter.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>

<variables>
<variable name="record_stereo" value="true"/>
<variable name="default_gateway" value="$${default_provider}"/>
<variable name="default_areacode" value="$${default_areacode}"/>
<variable name="transfer_fallback_extension" value="operator"/>
</variables>

<groups>
<group name="default">
<users> <user id="1009" cidr="172.30.99.0/24">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="1009"/>
<param name="vm-email-all-messages" value="true"/>
<param name="vm-attach-file" value="true"/>
<param name="vm-mailto" value="1009@redmatter.com"/>
<param name="vm-keep-local-after-email" value="true"/>
<param name="vm_message_ext" value="mp3"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="1009"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 1009"/>
<variable name="effective_caller_id_number" value="1009"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user> </users>
</group>
</groups>
</domain>
</section>
</document>

I return this kind of message in all cases except the (sip_auth_method=="REGISTER") request message where I return

<document type="freeswitch/xml">
<section name="directory">
<domain name="pbx.redmatter.com">
<user id="1007">
<params>
<param name="password" value="1234"/>
</params>
</user>
</domain>
</section>
</document>

Also it's probably worth mentioning that I have removed all trace of xml from conf/directory and I don't believe there is a conflict happening there.

The phones register correctly. The trouble is they don't operate on the correct dialplan context (I fixed that by hardcoding the internal gateway to dialplan default), but the 'toll_allow' variable is now not working so that outbound calls fail, which is what made me think that the user variables are being ignored.

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.

Any ideas gratefully and humbly received.

All the best
Jim

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
kevin at johnnyvoip.com
Guest





PostPosted: Thu Aug 06, 2009 11:13 am    Post subject: [Freeswitch-users] CURL directory issue Reply with quote

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't being read and cached.
Regards,
   Kevin Green

On Thu, Aug 6, 2009 at 7:24 AM, Jim Page <jim.page@redmatter.com (jim.page@redmatter.com)> wrote:
Quote:
Afternoon All

I wonder if someone (perhaps even the illustrious intralanman) could help me out with a problem I am experiencing with a CURL directory.

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's scripts.

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

<document type="freeswitch/xml">
 <section name="directory">
  <domain name="pbx.redmatter.com">
   <params>
     <param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
   </params>

   <variables>
     <variable name="record_stereo" value="true"/>
     <variable name="default_gateway" value="$${default_provider}"/>
     <variable name="default_areacode" value="$${default_areacode}"/>
     <variable name="transfer_fallback_extension" value="operator"/>
   </variables>

   <groups>
     <group name="default">
       <users>            <user id="1009" cidr="172.30.99.0/24">
              <params>
                <param name="password" value="$${default_password}"/>
                <param name="vm-password" value="1009"/>
                <param name="vm-email-all-messages" value="true"/>
                <param name="vm-attach-file" value="true"/>
                <param name="vm-mailto" value="1009@redmatter.com (1009@redmatter.com)"/>
                <param name="vm-keep-local-after-email" value="true"/>
                <param name="vm_message_ext" value="mp3"/>
              </params>
              <variables>
                <variable name="toll_allow" value="domestic,international,local"/>
                <variable name="accountcode" value="1009"/>
                <variable name="user_context" value="default"/>
                <variable name="effective_caller_id_name" value="Extension 1009"/>
                <variable name="effective_caller_id_number" value="1009"/>
                <variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
                <variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
                <variable name="callgroup" value="techsupport"/>
              </variables>
            </user>        </users>
     </group>
   </groups>
  </domain>
 </section>
</document>

I return this kind of message in all cases except the (sip_auth_method=="REGISTER") request message where I return

<document type="freeswitch/xml">
 <section name="directory">
   <domain name="pbx.redmatter.com">
     <user id="1007">
       <params>
         <param name="password" value="1234"/>
       </params>
     </user>
   </domain>
 </section>
</document>

Also it's probably worth mentioning that I have removed all trace of xml from conf/directory and I don't believe there is a conflict happening there.

The phones register correctly. The trouble is they don't operate on the correct dialplan context (I fixed that by hardcoding the internal gateway to dialplan default), but the 'toll_allow' variable is now not working so that outbound calls fail, which is what made me think that the user variables are being ignored.

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.

Any ideas gratefully and humbly received.

All the best
Jim

_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
jim.page at redmatter.com
Guest





PostPosted: Thu Aug 06, 2009 5:08 pm    Post subject: [Freeswitch-users] CURL directory issue Reply with quote

Spot on. Many thanks!
Jim

Sent from my iPhone

On 6 Aug 2009, at 18:02, "Kevin Green" <kevin@johnnyvoip.com (kevin@johnnyvoip.com)> wrote:



Quote:
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't being read and cached.
Regards,
Kevin Green

On Thu, Aug 6, 2009 at 7:24 AM, Jim Page <[url=mailto:jim.page@redmatter.com]jim.page@redmatter.com (jim.page@redmatter.com)[/url]> wrote:
Quote:
Afternoon All

I wonder if someone (perhaps even the illustrious intralanman) could help me out with a problem I am experiencing with a CURL directory.

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's scripts.

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

<document type="freeswitch/xml">
<section name="directory">
<domain name="pbx.redmatter.com">
<params>
<param name="dial-string" value="{presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
</params>

<variables>
<variable name="record_stereo" value="true"/>
<variable name="default_gateway" value="$${default_provider}"/>
<variable name="default_areacode" value="$${default_areacode}"/>
<variable name="transfer_fallback_extension" value="operator"/>
</variables>

<groups>
<group name="default">
<users> <user id="1009" cidr="172.30.99.0/24">
<params>
<param name="password" value="$${default_password}"/>
<param name="vm-password" value="1009"/>
<param name="vm-email-all-messages" value="true"/>
<param name="vm-attach-file" value="true"/>
<param name="vm-mailto" value="[url=mailto:1009@redmatter.com]1009@redmatter.com (1009@redmatter.com)[/url]"/>
<param name="vm-keep-local-after-email" value="true"/>
<param name="vm_message_ext" value="mp3"/>
</params>
<variables>
<variable name="toll_allow" value="domestic,international,local"/>
<variable name="accountcode" value="1009"/>
<variable name="user_context" value="default"/>
<variable name="effective_caller_id_name" value="Extension 1009"/>
<variable name="effective_caller_id_number" value="1009"/>
<variable name="outbound_caller_id_name" value="$${outbound_caller_name}"/>
<variable name="outbound_caller_id_number" value="$${outbound_caller_id}"/>
<variable name="callgroup" value="techsupport"/>
</variables>
</user> </users>
</group>
</groups>
</domain>
</section>
</document>

I return this kind of message in all cases except the (sip_auth_method=="REGISTER") request message where I return

<document type="freeswitch/xml">
<section name="directory">
<domain name="pbx.redmatter.com">
<user id="1007">
<params>
<param name="password" value="1234"/>
</params>
</user>
</domain>
</section>
</document>

Also it's probably worth mentioning that I have removed all trace of xml from conf/directory and I don't believe there is a conflict happening there.

The phones register correctly. The trouble is they don't operate on the correct dialplan context (I fixed that by hardcoding the internal gateway to dialplan default), but the 'toll_allow' variable is now not working so that outbound calls fail, which is what made me think that the user variables are being ignored.

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.

Any ideas gratefully and humbly received.

All the best
Jim

_______________________________________________
FreeSWITCH-users mailing list
[url=mailto:FreeSWITCH-users@lists.freeswitch.org]FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)[/url]
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org



_______________________________________________
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org (FreeSWITCH-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services