<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Abaci</p>
    <p>Thanks for the help.  I have found the problem and it all works
      fine from the lua generated user xml snippet now.</p>
    <p>My lua script was indeed an invalid xml snippet so it didn't
      parse properly.  Fixing the typo and its sending emails properly
      now.</p>
    <p>I must visit the optician soon!<br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 25/10/2019 15:14, Abaci B wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFmZFiP9NWjxXWCqHwf99vdyq1nF6wX2o7Sdujg+291CDrcTJA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Can you do a diff on your static xml to the xml
        generated by lua to see if there are any differences?<br>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, Oct 25, 2019 at 4:33
          AM Paul Smith <<a href="mailto:paulsmith@voxbit.net"
            moz-do-not-send="true">paulsmith@voxbit.net</a>> wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div bgcolor="#FFFFFF">
            <p>Hi,</p>
            <p>I'm new to freeswitch but have been playing with configs
              and reading confluence and the Packt book for a few weeks.</p>
            <p>Is there a difference between setting up a user as static
              XML and getting the user XML snippet from a lua script?  I
              can't seem to get voicemail to email to work if the user
              XML snippet is generated by lua, but it works fine if I
              have the static xml in a file.</p>
            <p>The following fs_cli command to post the email works
              fine. So the mail server, templates etc are OK. <br>
            </p>
            <p>   vm_fsdb_msg_email default 123 1039
              f8df8b69-21d7-4339-836e-777dbec87db3
              customer1@mytestdomain</p>
            <p>I suspect that loading the XML at startup as opposed to
              generating snippet from lua is significant? </p>
            <p><br>
            </p>
            <p>This static user directory/123/1039.xml works:</p>
            <blockquote>
              <p><include><br>
                  <user id="1039"><br>
                    <params><br>
                      <param name="password"
                value="$${default_password}"/><br>
                      <param name="vm-password" value="1000"/><br>
                <br>
                      <param name="vm-mailto" value=<a
                  href="mailto:testing@mydomain-ni.com" target="_blank"
                  moz-do-not-send="true">"testing@mydomain-ni.com"</a>
                /><br>
                      <param name="vm-mailfrom" value=<a
                  href="mailto:paul@mydomain-ni.com" target="_blank"
                  moz-do-not-send="true">"paul@mydomain-ni.com"</a>
                /><br>
                      <param name="vm-email-all-messages"
                value="true" /><br>
                    </params><br>
                    <variables><br>
                      <variable name="toll_allow"
                value="domestic,international,local"/><br>
                      <variable name="accountcode" value="1000"/><br>
                      <variable name="user_context"
                value="default"/><br>
                      <variable name="effective_caller_id_name"
                value="Extension 1000"/><br>
                      <variable name="effective_caller_id_number"
                value="1039"/><br>
                      <variable name="outbound_caller_id_name"
                value="$${outbound_caller_name}"/><br>
                      <variable name="outbound_caller_id_number"
                value="$${outbound_caller_id}"/><br>
                      <variable name="callgroup"
                value="techsupport"/><br>
                    </variables><br>
                  </user><br>
                </include></p>
            </blockquote>
            <p>Email is sent and log shows:</p>
            <p><b>2019-10-24 09:38:21.955085 [DEBUG]
                mod_voicemail.c:1952 Update MWI: Message Account
                1039@123<br>
                2019-10-24 09:38:21.955085 [DEBUG] mod_voicemail.c:1953
                Update MWI: Voice Message 28/1<br>
                2019-10-24 09:38:22.875122 [DEBUG] switch_utils.c:1300
                Emailed data to [<a
                  href="mailto:testing@mydomain-ni.com" target="_blank"
                  moz-do-not-send="true">testing@mydomain-ni.com</a>]<br>
                2019-10-24 09:38:22.875122 [DEBUG] mod_voicemail.c:3042
                Sending message to <a
                  href="mailto:testing@mydomain-ni.com" target="_blank"
                  moz-do-not-send="true">testing@mydomain-ni.com</a><br>
                e5e12f00-e39b-4eda-8e27-a22adc14ddb3 2019-10-24
                09:38:22.875122 [DEBUG] switch_ivr_play_say.c:70 No
                language specified - Using [en]<br>
              </b><br>
            </p>
            <p><br>
            </p>
            <p>But generating a very similar XML from LUA... the
              voicemail is saved, and MWI activated. But no email is
              sent.</p>
            <p>2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1925
              Update MWI: Processing for 1039@123 in inbox<br>
              2019-10-24 10:03:18.271420 [NOTICE] switch_cpp.cpp:1443
              Debug directory xml snippet:<br>
              <?xml version="1.0" encoding="UTF-8"
              standalone="no"?><br>
              <document type="freeswitch/xml"><br>
                <section name="directory"><br>
                  <domain name="123"><br>
                    <user id="1039"><br>
                      <params><br>
                        <param name="password"
              value="sjkdfsjhdf4895sdkjh8934tsdvsjdkgsf"/><br>
                        <param name="vm-password" value="0000"/><br>
                        <param name="vm-mailto" value=<a
                href="mailto:checkto@mydomain-ni.com" target="_blank"
                moz-do-not-send="true">"checkto@mydomain-ni.com"</a>/><br>
                        <param name="vm-mailfrom" value=<a
                href="mailto:voicemail@vociemail.co.uk" target="_blank"
                moz-do-not-send="true">"voicemail@vociemail.co.uk"</a>/><br>
                        <param name="vm-email-all-messages
              value="true"/><br>
                        <!-- param name="vm-attach-file"
              value="true"/ --><br>
                        <!-- param name="vm-keep-local-after-email"
              value="true"/ --><br>
                      </params><br>
                      <variables><br>
                        <variable name="toll_allow"
              value="domestic,international,local"/><br>
                        <variable name="user_context"
              value="default"/><br>
                        <variable name="accountcode"
              value="1000"/><br>
                        <variable name="user_context"
              value="default"/><br>
                        <variable name="effective_caller_id_name"
              value="Extension 1000"/><br>
                        <variable name="effective_caller_id_number"
              value="1039"/><br>
                        <variable name="outbound_caller_id_name"
              value="Frank"/><br>
                        <variable name="outbound_caller_id_number"
              value="10390"/><br>
                        <variable name="callgroup"
              value="techsupport"/><br>
              <br>
                      </variables><br>
                    </user><br>
                  </domain><br>
                </section><br>
              </document><br>
              2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1950
              Update MWI: Messages Waiting yes<br>
              2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1951
              Update MWI: Update Reason NEW<br>
              2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1952
              Update MWI: Message Account 1039@123<br>
              <b>2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1953
                Update MWI: Voice Message 29/1</b><br>
              <b>2019-10-24 10:03:18.271420 [DEBUG]
                switch_ivr_play_say.c:70 No language specified - Using
                [en]</b><br>
              2019-10-24 10:03:18.291420 [DEBUG]
              switch_ivr_play_say.c:250 Handle
              play-file:[voicemail/vm-goodbye.wav] (en:en)<br>
              2019-10-24 10:03:18.291420 [DEBUG]
              switch_ivr_play_say.c:1492 Codec Activated L16@8000hz 1
              channels 20ms<br>
              <br>
            </p>
            <p><br>
            </p>
            <p><br>
            </p>
          </div>
_________________________________________________________________________<br>
          <br>
          The FreeSWITCH project is sponsored by SignalWire <a
            href="https://signalwire.com" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://signalwire.com</a><br>
          Enhance your FreeSWITCH install with disruptive priced SMS and
          PSTN services.<br>
          Build your next product on our scalable cloud platform.<br>
          <br>
          Join our online community to chat in real time <a
            href="https://signalwire.community" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://signalwire.community</a><br>
          <br>
          Professional FreeSWITCH Services<br>
          <a href="mailto:sales@freeswitch.com" target="_blank"
            moz-do-not-send="true">sales@freeswitch.com</a><br>
          <a href="https://freeswitch.com" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://freeswitch.com</a><br>
          <br>
          Official FreeSWITCH Sites<br>
          <a href="https://freeswitch.com/oss" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://freeswitch.com/oss</a><br>
          <a href="https://freeswitch.org/confluence" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://freeswitch.org/confluence</a><br>
          <a href="https://cluecon.com" rel="noreferrer" target="_blank"
            moz-do-not-send="true">https://cluecon.com</a><br>
          <br>
          FreeSWITCH-users mailing list<br>
          <a href="mailto:FreeSWITCH-users@lists.freeswitch.org"
            target="_blank" moz-do-not-send="true">FreeSWITCH-users@lists.freeswitch.org</a><br>
          <a
            href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
          UNSUBSCRIBE:<a
            href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
          <a href="https://freeswitch.com" rel="noreferrer"
            target="_blank" moz-do-not-send="true">https://freeswitch.com</a></blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire <a class="moz-txt-link-freetext" href="https://signalwire.com">https://signalwire.com</a>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time <a class="moz-txt-link-freetext" href="https://signalwire.community">https://signalwire.community</a>

Professional FreeSWITCH Services
<a class="moz-txt-link-abbreviated" href="mailto:sales@freeswitch.com">sales@freeswitch.com</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.com">https://freeswitch.com</a>

Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="https://freeswitch.com/oss">https://freeswitch.com/oss</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.org/confluence">https://freeswitch.org/confluence</a>
<a class="moz-txt-link-freetext" href="https://cluecon.com">https://cluecon.com</a>

FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="https://freeswitch.com">https://freeswitch.com</a></pre>
    </blockquote>
  </body>
</html>