Primera versión instalada en producción
This commit is contained in:
parent
789e50271f
commit
2cd108ea3a
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Configuration file. Be careful to respect the PHP syntax.
|
||||
*
|
||||
* Do not modify this file! Instead, copy it to config.my.php and make
|
||||
* your changes there.
|
||||
*
|
||||
* Also, you can use a different config file depending on the virtual host. To
|
||||
* do it, you have to create another configuration file and rename it to
|
||||
* config.[subdomain].php. If no configutation file is found for a certain
|
||||
* domain, the main file will be used. Ej:
|
||||
*
|
||||
* - http://www.mydomain.org -> config.www.php
|
||||
* - http://test.mydomain.org -> config.test.php
|
||||
**/
|
||||
return [
|
||||
|
||||
/**
|
||||
* Database parameters.
|
||||
**/
|
||||
'db' => [
|
||||
'host' => 'localhost'
|
||||
,'port' => 3306
|
||||
,'schema' => 'pbx'
|
||||
,'user' => 'pbx'
|
||||
,'pass' => ''
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
?>
|
|
@ -8,7 +8,7 @@ $app = new Vn\Lib\App ('vn-asterisk');
|
|||
$app->init ();
|
||||
$db = $app->getSysConn ();
|
||||
|
||||
//Agi::init ();
|
||||
Agi::init ();
|
||||
|
||||
// Formats the caller phone number
|
||||
|
||||
|
@ -35,7 +35,7 @@ $sundayFestive = $db->getValue ('SELECT sunday_festive FROM config');
|
|||
if (date ('N') == 6 && $sundayFestive)
|
||||
{
|
||||
Agi::exec ('SET VARIABLE MACRO playback');
|
||||
Agi::exec ('SET VARIABLE ARG1 festive');
|
||||
Agi::exec ('SET VARIABLE ARG1 out-of-ours');
|
||||
exit ();
|
||||
}
|
||||
|
||||
|
@ -48,9 +48,9 @@ if ($customer)
|
|||
// Gets the customer salesperson extension
|
||||
|
||||
$extension = $db->getValue (
|
||||
'SELECT a.extension
|
||||
FROM vn2008.Trabajadores t
|
||||
JOIN pbx.sip a ON t.user_id = a.user_id
|
||||
'SELECT s.extension
|
||||
FROM sip s
|
||||
JOIN vn2008.Trabajadores t ON t.user_id = s.user_id
|
||||
WHERE t.id_trabajador = vn2008.Averiguar_ComercialCliente_Id(#, CURDATE())'
|
||||
,[$customer]
|
||||
);
|
||||
|
@ -63,7 +63,7 @@ if ($customer)
|
|||
else
|
||||
{
|
||||
Agi::exec ('SET VARIABLE MACRO playback');
|
||||
Agi::exec ('SET VARIABLE ARG1 heavy');
|
||||
Agi::exec ('SET VARIABLE ARG1 busy');
|
||||
}
|
||||
|
||||
exit ();
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* Default configuration file. Be careful to respect the PHP syntax.
|
||||
*
|
||||
* Do not modify this file! Instead, copy it to config.my.php and make
|
||||
* your changes there.
|
||||
**/
|
||||
return [
|
||||
|
||||
/**
|
||||
* Database parameters.
|
||||
**/
|
||||
'db' => [
|
||||
'host' => 'localhost'
|
||||
,'port' => 3306
|
||||
,'schema' => 'pbx'
|
||||
,'user' => 'pbx'
|
||||
,'pass' => ''
|
||||
]
|
||||
|
||||
];
|
||||
|
||||
?>
|
|
@ -1,4 +1,4 @@
|
|||
vn-asterisk (1.001-deb7) stable; urgency=low
|
||||
vn-asterisk (1.004-deb7) stable; urgency=low
|
||||
|
||||
* Initial Release.
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ Vcs-Git: git://www.verdnatura.es/var/git/vn-asterisk
|
|||
|
||||
Package: vn-asterisk
|
||||
Architecture: all
|
||||
Depends: asterisk, php
|
||||
Depends: asterisk, php-vn-lib
|
||||
Section: net
|
||||
Priority: optional
|
||||
Description: Additional files of Verdnatura for Asterisk
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
config.php etc/vn-asterisk
|
||||
agi-bin/* usr/share/asterisk/agi-bin
|
||||
sounds/* usr/share/asterisk/sounds
|
||||
sounds/* usr/share/asterisk/sounds/custom
|
||||
moh/* usr/share/asterisk/moh
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
etc/hedera-web/apache.conf etc/apache2/conf-available/hedera-web.conf
|
|
@ -1,4 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#chown asterisk:asterisk /etc/asterisk/extensions.conf
|
||||
/etc/init.d/asterisk reload
|
||||
|
||||
|
|
|
@ -7,16 +7,16 @@ writeprotect=no
|
|||
|
||||
exten => s,1,Hangup
|
||||
|
||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Llamadas salientes
|
||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Outgoing calls
|
||||
|
||||
[outgoing]
|
||||
|
||||
;-------------- Llamadas urgencia
|
||||
;-------------- Urgent calls
|
||||
|
||||
exten => _091,1,Macro(external,pri,${EXTEN})
|
||||
exten => _112,1,Macro(external,pri,${EXTEN})
|
||||
|
||||
;-------------- Extensiones internas
|
||||
;-------------- Internal extensions
|
||||
|
||||
exten => _1006,1,Dial(SIP/${EXTEN},14,tT)
|
||||
same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?redirect)
|
||||
|
@ -38,7 +38,7 @@ exten => _XXXX,1,Dial(SIP/${EXTEN},,tT)
|
|||
same => n,Followme(${EXTEN})
|
||||
same => n,Hangup
|
||||
|
||||
;-------------- Números externos
|
||||
;-------------- External numbers
|
||||
|
||||
exten => _[98][1-9]XXXXXXX,1,Macro(external,pri,${EXTEN})
|
||||
exten => _[67]XXXXXXXX,1,Macro(external,pri,${EXTEN})
|
||||
|
@ -52,7 +52,7 @@ exten => _00X.,1,Macro(external,wcd,${EXTEN})
|
|||
exten => _0XXXX,1,Macro(authenticate,pri,${EXTEN:1:4})
|
||||
exten => _X.,1,Macro(authenticate,pri,${EXTEN})
|
||||
|
||||
;-------------- Números invalidos
|
||||
;-------------- Invalid numbers
|
||||
|
||||
exten => i,1,Playback(invalid)
|
||||
same => n,Hangup
|
||||
|
@ -72,12 +72,12 @@ exten => s,1,Authenticate(7070)
|
|||
exten => s,1,Dial(SIP/${ARG1}/${ARG2},,T)
|
||||
same => n,Hangup
|
||||
|
||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Llamadas entrantes
|
||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Incomings calls
|
||||
|
||||
[incoming]
|
||||
|
||||
exten => s,1,AGI(incoming.php)
|
||||
same => GotoIf($["${MACRO}" != ""]?macro:ivr)
|
||||
exten => _X.,1,AGI(incoming.php)
|
||||
same => n,GotoIf($["${MACRO}" != ""]?macro:ivr)
|
||||
same => n(macro),Macro(${MACRO},${ARG1})
|
||||
same => n,Hangup
|
||||
same => n(ivr),Goto(ivr,s,1)
|
||||
|
|
Loading…
Reference in New Issue