Thank for you your effort to help me out,

In Voicmail IVR there are options, all options works fine,
Example press 4 to send Voicemail to Email.
7 to Delete the recording, 2 to save the recording
Press 8 to forward the message to another user.

Everything works, Press 4 and VM get forwarded to email. Only things that does not work is 8, forward to another user. Its the Voicemail Application, that forgets the domainname after pressing 8.

Here is my Dial plan for Voicemail.

    <extension name="Voicemail_check">
          <condition field="caller_id_number" expression="^(${destination_number})$">
            <action application="set" data="voicemail_domain=${domain_name}"/>
            <action application="answer"/>
            <action application="voicemail" data="check  default ${domain_name} $1"/>
          </condition>
    </extension>

Here is Directory

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="freeswitch/xml">
    <section name="directory">
            <domain name="domain.companyname.com">
                    <user id="142" cidr="" number-alias="">
                    <params>
                            <param name="password" value="notopentopublic"/>
                            <param name="vm-enabled" value="true"/>
                            <param name="vm-password" value="142"/>
                            <param name="vm-email-all-messages" value="true"/>
                            <param name="vm-attach-file" value="true"/>
                            <param name="vm-keep-local-after-email" value="true"/>
                            <param name="vm-mailto" value="email@gmail.com"/>
                            <param name="MWI-Account" value="142@domain.companyname.com"/>
                            <param name="timezone" value="America/Los_Angeles"/>
                            <param name="dial-string" value="{sip_invite_domain=domain.companyname.com,presence_id=142@domain.companyname.com}${sofia_contact(142@domain.companyname.com)}"/>
                    </params>
                    <variables>
                            <variable name="domain_uuid" value=""/>
                            <variable name="domain_name" value="domain.companyname.com"/>
                            <variable name="caller_id_name" value=""/>
                            <variable name="caller_id_number" value=""/>
                            <variable name="call_group" value="sales"/>
                            <variable name="accountcode" value="55555555"/>
                            <variable name="user_context" value=""/>
                            <variable name="effective_caller_id_name" value="Jai"/>
                            <variable name="outbound_caller_id_name" value="somename"/>
                            <variable name="outbound_caller_id_name" value="somename"/>
                            <variable name="outbound_caller_id_number" value="000000000"/>
                            <variable name="directory_full_name" value="Name"/>
                            <variable name="recording" value="off"/>
                            <variable name="callscreening" value="off"/>
                            <variable name="limit_max" value="2"/>
                            <variable name="record_stereo" value="true"/>
                            <variable name="transfer_fallback_extension" value="operator"/>
                            <variable name="export_vars" value="domain_name"/>
                    </variables>
                    </user>
            </domain>
    </section>
</document>

In Voicmail IVR there are options, all options works fine,
Example press 4 to send Voicemail to Email.
7 to Delete the recording
Press 8 to forward the message to another user.

Everything works, Press 4 and VM get forwarded to email. Only things that does not work is 8, forward to another user. Its the Voicemail Application, that forgets the domainname after pressing 8.
 
What else I can collect and share to get any help/suggestion.

Best,

On Thu, Feb 9, 2017 at 8:58 AM, Michael Jerris <mike@jerris.com> wrote:
Then your lua script is not returning what it should for that domain lookup.  If you add some debug to your lua script you should see the lookup request.

On Feb 8, 2017, at 5:32 PM, Jai Rangi <jprangi@gmail.com> wrote:

Problem is that I am using lua xml-hanlder-binding for directory and all the user credentials are generated by lua script dynamically. If I add the domain manually in directory/default.xml, it still does not find the user.



On Wed, Feb 8, 2017 at 12:57 PM, Michael Jerris <mike@jerris.com> wrote:
your directory has no domain that matches that one.  More info on how to configure the directory is here:


On Feb 8, 2017, at 3:37 PM, Jai Rangi <jprangi@gmail.com> wrote:

Surprising, no one else is having this issue and no fix?  Not sure if this is a bug, I can open a bug report if some one can confirm.



On Wed, Feb 1, 2017 at 8:46 AM, Jai Rangi <jprangi@gmail.com> wrote:
May be there is a setting, where FS will know all the domains it should listen to. But everything else works great except VM forwarding.

On Wed, Feb 1, 2017 at 8:41 AM, Jai Rangi <jprangi@didforsale.com> wrote:
Yes I can see that, but why it wont recognize the domain. I can leave voicemail for this this.

Jai Rangi
Cebod Technologies LLC dba DIDforSale/Cebod Telecom






On Wed, Feb 1, 2017 at 7:39 AM, Michael Jerris <mike@jerris.com> wrote:
2017-01-31 21:23:37.116117 [WARNING] mod_voicemail.c:3268 Cannot locate domain company.phonesystemdomain.com

that's the issue

On Tue, Jan 31, 2017 at 11:42 PM Jai Rangi <jprangi@gmail.com> wrote:
We are using Freeswitch for a multidomain setup and experiencing problem in forwarding voice mail message to another extension in the same domain.

This is what I see in the logs

2017-01-31 21:23:37.116117 [WARNING] mod_voicemail.c:3268 Cannot locate domain company.phonesystemdomain.com
30a4bcaa-cd5a-4be8-88bf-94e888f98a16 2017-01-31 21:23:37.116117 [ERR] mod_voicemail.c:1768 Failed to forward message to 130
30a4bcaa-cd5a-4be8-88bf-94e888f98a16 2017-01-31 21:23:37.116117 [DEBUG] switch_ivr_play_say.c:70 No language specified - Using [en]
30a4bcaa-cd5a-4be8-88bf-94e888f98a16 2017-01-31 21:23:37.136121 [DEBUG] switch_ivr_play_say.c:250 Handle play-file:[voicemail/vm-that_was_an_invalid_ext.wav] (en:en)

Anyone else experiencing this, any fix? Not sure if this is a bug. I have experienced this in 1.4, 1.6.6, 1.6.9 and latest stable 1.6.13. 

Thank you,
Jai

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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



_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com

Official FreeSWITCH Sites
http://www.freeswitch.org
http://confluence.freeswitch.org
http://www.cluecon.com

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