[Freeswitch-users] voicemail_inject (Mod voicemail) problems

Dennis odermann at googlemail.com
Wed Jan 11 11:45:36 MSK 2012


hi anthony,

we fixed the problem and yes, the mentioned ip is a valid domain.

the error was because of a problem with the LUA User Directory
(http://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh#Lua_Script_2).

with the given example the voicebox did not work properly (beside
voicemail_inject everything else worked):

XML_STRING =
[[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
  <section name="directory">
    <domain name="]] .. u.domain .. [[">
      <user id="]] .. u.id .. [[" mailbox="]] .. u.mailbox .. [[" cidr="]]
           .. u.cidr .. [[" number-alias="]] .. u["number-alias"] .. [[">
        <params>
          <param name="password" value="]] .. u.password .. [["/>
          <param name="dial-string" value="]] .. u["dial-string"] .. [["/>
        </params>
        <variables>
          <variable name="user_context" value="]] .. u.user_context .. [["/>
        </variables>
      </user>
    </domain>
  </section>
</document>]]


we made some small changes to the script and it worked:

XML_STRING =
[[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
  <section name="directory">
  <domain name="]] .. u.domain .. [[">
    <params>
      <param name="dial-string"
value="{sip_invite_domain=${dialed_domain},presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/>
    </params>

    <groups>
      <group name="default">
                   <users>
                     <user id="]] .. u.username .. [[">
                            <params>
                              <param name="password" value="]] ..
u.password .. [["/>
                              <param name="vm-password" value="]] ..
u.username .. [["/>
                            </params>
                            <variables>
<variable name="user_context" value="]] .. u.user_context .. [["/>
                       </variables>
                     </user>
                   </users>
      </group>
    </groups>

  </domain>
    </section>
</document>]]


we do not know, if there is a problem with the LUA example or if we do
not understand how to use it.

kind regards
dennis


2012/1/9 Anthony Minessale <anthony.minessale at gmail.com>:
> is 192.168.2.2 a valid domain in your user directory?



Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list