Avec la bonne version du patch

Désolé

Le 07/12/2015 15:53, Thomas Legay a écrit :
Bonjour,

Suite à mon post <http://www.dolibarr.fr/forum/527-bugs-sur-la-version-stable-courante/54398-clicktodial-le-contexe-n-est-pas-parametrable> sur le forum, vous trouverez un patch que j'ai fait.

L'objectif est de pouvoir paramétré certaine constante.

Merci de votre retour.




_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

diff -BNaur ancien_rep/dolibarr/htdocs/asterisk/wrapper.php nouveau_rep/dolibarr/htdocs/asterisk/wrapper.php
--- ancien_rep/dolibarr/htdocs/asterisk/wrapper.php	2015-12-07 15:44:31.365941000 +0100
+++ nouveau_rep/dolibarr/htdocs/asterisk/wrapper.php	2015-12-07 15:43:00.652147214 +0100
@@ -78,6 +78,11 @@
 if (! isset($conf->global->ASTERISK_TYPE))      $conf->global->ASTERISK_TYPE="SIP/";
 if (! isset($conf->global->ASTERISK_INDICATIF)) $conf->global->ASTERISK_INDICATIF="0";
 if (! isset($conf->global->ASTERISK_PORT))      $conf->global->ASTERISK_PORT=5038;
+if (! isset($conf->global->ASTERISK_CONTEXT))   $conf->global->ASTERISK_CONTEXT="from-internal";
+if (! isset($conf->global->ASTERISK_WAIT_TIME)) $conf->global->ASTERISK_WAIT_TIME="30";
+if (! isset($conf->global->ASTERISK_PRIORITY))  $conf->global->ASTERISK_PRIORITY="1";
+if (! isset($conf->global->ASTERISK_MAX_RETRY)) $conf->global->ASTERISK_MAX_RETRY="2";
+
 if ($conf->global->ASTERISK_INDICATIF=='NONE')  $conf->global->ASTERISK_INDICATIF='';
 
 
@@ -96,14 +101,13 @@
 // Port
 $port = $conf->global->ASTERISK_PORT;
 // Context ( generalement from-internal )
-$strContext = "from-internal";
-
+$strContext = $conf->global->ASTERISK_CONTEXT;
 // Delai d'attente avant de raccrocher
-$strWaitTime = "30";
+$strWaitTime = $conf->global->ASTERISK_WAIT_TIME;
 // Priority
-$strPriority = "1";
+$strPriority = $conf->global->ASTERISK_PRIORITY;
 // Nomber of try
-$strMaxRetry = "2";
+$strMaxRetry = $conf->global->ASTERISK_MAX_RETRY;
 
 
 /*
_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à