Howto:Dynamic MOH: Difference between revisions

From innovaphone wiki
Jump to navigation Jump to search
(New page: <!-- Keywords: dynamic moh, moh per user, moh per group --> ==Applies To== This information applies to V12r2 and later ==More Information== ===Problem Details=== Sometimes it is desired t...)
(No difference)

Revision as of 11:07, 11 March 2019

Applies To

This information applies to

V12r2 and later

More Information

Problem Details

Sometimes it is desired to be able to play a different MOH per user, group or special selection.

We can store a custom logic, and then redirect to the MOH to use with an HTTP redirect.

System Requirements

A Linux Application Platform or a Webserver with PHP or something similar.

Installation

Use the following URL as Music On Hold URL in your PBX.

https://tld.com/dynamic_moh/moh.php?codec=$coder&coder=g722,g711a,g711u,g729,g723&user=%h

Create a PHP script on your LinuxAP with the following content

<?php

// $_GET['codec'] contains the selected codec // $_GET['user'] contains the H.323 name of the user who initiated the consultation


// SOAP lookup to the PBX (group membership, pbx selection, etc.) // CURL lookup to a different system // or whatever you need

// use decision criteria of your choice if ($_GET['user'] == 'alice') {

   header("Location: https://tld.com/webdav/announcements/special_moh_for_alice.".$_GET['codec']);

} else {

   header("Location: https://tld.com/webdav/announcements/default_moh.".$_GET['codec']);

}

?>

Known Problems