[Freeswitch-users] Voicemail to email with user XML from Lua
Paul Smith
paulsmith at voxbit.net
Wed Oct 30 10:24:47 UTC 2019
Hi Abaci
Thanks for the help. I have found the problem and it all works fine
from the lua generated user xml snippet now.
My lua script was indeed an invalid xml snippet so it didn't parse
properly. Fixing the typo and its sending emails properly now.
I must visit the optician soon!
On 25/10/2019 15:14, Abaci B wrote:
> Can you do a diff on your static xml to the xml generated by lua to
> see if there are any differences?
>
> On Fri, Oct 25, 2019 at 4:33 AM Paul Smith <paulsmith at voxbit.net
> <mailto:paulsmith at voxbit.net>> wrote:
>
> Hi,
>
> I'm new to freeswitch but have been playing with configs and
> reading confluence and the Packt book for a few weeks.
>
> 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.
>
> The following fs_cli command to post the email works fine. So the
> mail server, templates etc are OK.
>
> vm_fsdb_msg_email default 123 1039
> f8df8b69-21d7-4339-836e-777dbec87db3 customer1 at mytestdomain
>
> I suspect that loading the XML at startup as opposed to generating
> snippet from lua is significant?
>
>
> This static user directory/123/1039.xml works:
>
> <include>
> <user id="1039">
> <params>
> <param name="password" value="$${default_password}"/>
> <param name="vm-password" value="1000"/>
>
> <param name="vm-mailto" value="testing at mydomain-ni.com"
> <mailto:testing at mydomain-ni.com> />
> <param name="vm-mailfrom" value="paul at mydomain-ni.com"
> <mailto:paul at mydomain-ni.com> />
> <param name="vm-email-all-messages" value="true" />
> </params>
> <variables>
> <variable name="toll_allow"
> value="domestic,international,local"/>
> <variable name="accountcode" value="1000"/>
> <variable name="user_context" value="default"/>
> <variable name="effective_caller_id_name"
> value="Extension 1000"/>
> <variable name="effective_caller_id_number" value="1039"/>
> <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>
> </include>
>
> Email is sent and log shows:
>
> *2019-10-24 09:38:21.955085 [DEBUG] mod_voicemail.c:1952 Update
> MWI: Message Account 1039 at 123
> 2019-10-24 09:38:21.955085 [DEBUG] mod_voicemail.c:1953 Update
> MWI: Voice Message 28/1
> 2019-10-24 09:38:22.875122 [DEBUG] switch_utils.c:1300 Emailed
> data to [testing at mydomain-ni.com <mailto:testing at mydomain-ni.com>]
> 2019-10-24 09:38:22.875122 [DEBUG] mod_voicemail.c:3042 Sending
> message to testing at mydomain-ni.com <mailto:testing at mydomain-ni.com>
> e5e12f00-e39b-4eda-8e27-a22adc14ddb3 2019-10-24 09:38:22.875122
> [DEBUG] switch_ivr_play_say.c:70 No language specified - Using [en]
> *
>
>
> But generating a very similar XML from LUA... the voicemail is
> saved, and MWI activated. But no email is sent.
>
> 2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1925 Update
> MWI: Processing for 1039 at 123 in inbox
> 2019-10-24 10:03:18.271420 [NOTICE] switch_cpp.cpp:1443 Debug
> directory xml snippet:
> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
> <document type="freeswitch/xml">
> <section name="directory">
> <domain name="123">
> <user id="1039">
> <params>
> <param name="password"
> value="sjkdfsjhdf4895sdkjh8934tsdvsjdkgsf"/>
> <param name="vm-password" value="0000"/>
> <param name="vm-mailto" value="checkto at mydomain-ni.com"
> <mailto:checkto at mydomain-ni.com>/>
> <param name="vm-mailfrom"
> value="voicemail at vociemail.co.uk" <mailto:voicemail at vociemail.co.uk>/>
> <param name="vm-email-all-messages value="true"/>
> <!-- param name="vm-attach-file" value="true"/ -->
> <!-- param name="vm-keep-local-after-email"
> value="true"/ -->
> </params>
> <variables>
> <variable name="toll_allow"
> value="domestic,international,local"/>
> <variable name="user_context" value="default"/>
> <variable name="accountcode" value="1000"/>
> <variable name="user_context" value="default"/>
> <variable name="effective_caller_id_name"
> value="Extension 1000"/>
> <variable name="effective_caller_id_number" value="1039"/>
> <variable name="outbound_caller_id_name" value="Frank"/>
> <variable name="outbound_caller_id_number" value="10390"/>
> <variable name="callgroup" value="techsupport"/>
>
> </variables>
> </user>
> </domain>
> </section>
> </document>
> 2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1950 Update
> MWI: Messages Waiting yes
> 2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1951 Update
> MWI: Update Reason NEW
> 2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1952 Update
> MWI: Message Account 1039 at 123
> *2019-10-24 10:03:18.271420 [DEBUG] mod_voicemail.c:1953 Update
> MWI: Voice Message 29/1*
> *2019-10-24 10:03:18.271420 [DEBUG] switch_ivr_play_say.c:70 No
> language specified - Using [en]*
> 2019-10-24 10:03:18.291420 [DEBUG] switch_ivr_play_say.c:250
> Handle play-file:[voicemail/vm-goodbye.wav] (en:en)
> 2019-10-24 10:03:18.291420 [DEBUG] switch_ivr_play_say.c:1492
> Codec Activated L16 at 8000hz 1 channels 20ms
>
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire
> https://signalwire.com
> 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
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com <mailto:sales at freeswitch.com>
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> <mailto:FreeSWITCH-users at lists.freeswitch.org>
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
>
>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> 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 https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20191030/c035b2ad/attachment-0001.html>
More information about the FreeSWITCH-users
mailing list