Coder Social home page Coder Social logo

astpp_vmailer's Introduction

ASTPP Voicemail to Email

As described at the following link

https://freeswitch.org/confluence/display/FREESWITCH/PHP+email

Requirements

  • Requires PHP v7.x
  • Tested on FreeSWITCH v1.10 but should work on older versions.

Install and Configure

Copy the files into /var/www/html/fs/lib and make sure the webserver has read permissions (ie. chmod 644 for example).

Configure ASTPP SMTP settings

Enable and configure SMTP in ASTPP GUI Configuration > Settings > Notifications > Email as per ASTPP requirements.

For example, gmail host configuration should be in the form ssl://smtp.googlemail.com

Configure FreeSWITCH

Edit /etc/freeswitch/autoload_configs/switch.config.xml as follows

<param name="mailer-app" value="/usr/bin/php /var/www/html/fs/lib/vmailer.php"/>
<param name="mailer-app-args" value=""/>

FreeSWITCH will now send voicemail-to-email according to ASTPP SMTP settings.

Simulation

Basic

To send a basic test email, run the following from a cli. Replace the To: email with your email address.

echo -e '\n Content-Type: text/plain; boundary=x\nTo: [email protected]\nSubject: some subject\n\n--xContent-Type: multipart/alternative;\nboundary="z"\n\n --zContent-Type: text/html;\n\nsome text' | runuser -u www-data -- /usr/bin/php /var/www/html/fs/lib/vmailer.php

Full

To do a full simulation, including voicemail attachment, use the test.txt file, replacing To: inside the file with your email address. The test.txt file is an actual email output captured from FreeSWITCH.

printf '%b\n' "$(cat test.txt)"| runuser -u www-data -- /usr/bin/php /var/www/html/fs/lib/vmailer.php

Log

The last output is logged at /tmp/vmailer.log.

astpp_vmailer's People

Contributors

powerpbx avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.