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 ();
|
$app->init ();
|
||||||
$db = $app->getSysConn ();
|
$db = $app->getSysConn ();
|
||||||
|
|
||||||
//Agi::init ();
|
Agi::init ();
|
||||||
|
|
||||||
// Formats the caller phone number
|
// Formats the caller phone number
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ $sundayFestive = $db->getValue ('SELECT sunday_festive FROM config');
|
||||||
if (date ('N') == 6 && $sundayFestive)
|
if (date ('N') == 6 && $sundayFestive)
|
||||||
{
|
{
|
||||||
Agi::exec ('SET VARIABLE MACRO playback');
|
Agi::exec ('SET VARIABLE MACRO playback');
|
||||||
Agi::exec ('SET VARIABLE ARG1 festive');
|
Agi::exec ('SET VARIABLE ARG1 out-of-ours');
|
||||||
exit ();
|
exit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,9 +48,9 @@ if ($customer)
|
||||||
// Gets the customer salesperson extension
|
// Gets the customer salesperson extension
|
||||||
|
|
||||||
$extension = $db->getValue (
|
$extension = $db->getValue (
|
||||||
'SELECT a.extension
|
'SELECT s.extension
|
||||||
FROM vn2008.Trabajadores t
|
FROM sip s
|
||||||
JOIN pbx.sip a ON t.user_id = a.user_id
|
JOIN vn2008.Trabajadores t ON t.user_id = s.user_id
|
||||||
WHERE t.id_trabajador = vn2008.Averiguar_ComercialCliente_Id(#, CURDATE())'
|
WHERE t.id_trabajador = vn2008.Averiguar_ComercialCliente_Id(#, CURDATE())'
|
||||||
,[$customer]
|
,[$customer]
|
||||||
);
|
);
|
||||||
|
@ -63,7 +63,7 @@ if ($customer)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Agi::exec ('SET VARIABLE MACRO playback');
|
Agi::exec ('SET VARIABLE MACRO playback');
|
||||||
Agi::exec ('SET VARIABLE ARG1 heavy');
|
Agi::exec ('SET VARIABLE ARG1 busy');
|
||||||
}
|
}
|
||||||
|
|
||||||
exit ();
|
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.
|
* Initial Release.
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ Vcs-Git: git://www.verdnatura.es/var/git/vn-asterisk
|
||||||
|
|
||||||
Package: vn-asterisk
|
Package: vn-asterisk
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Depends: asterisk, php
|
Depends: asterisk, php-vn-lib
|
||||||
Section: net
|
Section: net
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Description: Additional files of Verdnatura for Asterisk
|
Description: Additional files of Verdnatura for Asterisk
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
config.php etc/vn-asterisk
|
||||||
agi-bin/* usr/share/asterisk/agi-bin
|
agi-bin/* usr/share/asterisk/agi-bin
|
||||||
sounds/* usr/share/asterisk/sounds
|
sounds/* usr/share/asterisk/sounds/custom
|
||||||
moh/* usr/share/asterisk/moh
|
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
|
#!/bin/bash
|
||||||
|
|
||||||
|
#chown asterisk:asterisk /etc/asterisk/extensions.conf
|
||||||
/etc/init.d/asterisk reload
|
/etc/init.d/asterisk reload
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,16 @@ writeprotect=no
|
||||||
|
|
||||||
exten => s,1,Hangup
|
exten => s,1,Hangup
|
||||||
|
|
||||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Llamadas salientes
|
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Outgoing calls
|
||||||
|
|
||||||
[outgoing]
|
[outgoing]
|
||||||
|
|
||||||
;-------------- Llamadas urgencia
|
;-------------- Urgent calls
|
||||||
|
|
||||||
exten => _091,1,Macro(external,pri,${EXTEN})
|
exten => _091,1,Macro(external,pri,${EXTEN})
|
||||||
exten => _112,1,Macro(external,pri,${EXTEN})
|
exten => _112,1,Macro(external,pri,${EXTEN})
|
||||||
|
|
||||||
;-------------- Extensiones internas
|
;-------------- Internal extensions
|
||||||
|
|
||||||
exten => _1006,1,Dial(SIP/${EXTEN},14,tT)
|
exten => _1006,1,Dial(SIP/${EXTEN},14,tT)
|
||||||
same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?redirect)
|
same => n,GotoIf($["${DIALSTATUS}" != "ANSWER"]?redirect)
|
||||||
|
@ -38,7 +38,7 @@ exten => _XXXX,1,Dial(SIP/${EXTEN},,tT)
|
||||||
same => n,Followme(${EXTEN})
|
same => n,Followme(${EXTEN})
|
||||||
same => n,Hangup
|
same => n,Hangup
|
||||||
|
|
||||||
;-------------- Números externos
|
;-------------- External numbers
|
||||||
|
|
||||||
exten => _[98][1-9]XXXXXXX,1,Macro(external,pri,${EXTEN})
|
exten => _[98][1-9]XXXXXXX,1,Macro(external,pri,${EXTEN})
|
||||||
exten => _[67]XXXXXXXX,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 => _0XXXX,1,Macro(authenticate,pri,${EXTEN:1:4})
|
||||||
exten => _X.,1,Macro(authenticate,pri,${EXTEN})
|
exten => _X.,1,Macro(authenticate,pri,${EXTEN})
|
||||||
|
|
||||||
;-------------- Números invalidos
|
;-------------- Invalid numbers
|
||||||
|
|
||||||
exten => i,1,Playback(invalid)
|
exten => i,1,Playback(invalid)
|
||||||
same => n,Hangup
|
same => n,Hangup
|
||||||
|
@ -72,12 +72,12 @@ exten => s,1,Authenticate(7070)
|
||||||
exten => s,1,Dial(SIP/${ARG1}/${ARG2},,T)
|
exten => s,1,Dial(SIP/${ARG1}/${ARG2},,T)
|
||||||
same => n,Hangup
|
same => n,Hangup
|
||||||
|
|
||||||
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Llamadas entrantes
|
;+++++++++++++++++++++++++++++++++++++++++++++++++++++++ Incomings calls
|
||||||
|
|
||||||
[incoming]
|
[incoming]
|
||||||
|
|
||||||
exten => s,1,AGI(incoming.php)
|
exten => _X.,1,AGI(incoming.php)
|
||||||
same => GotoIf($["${MACRO}" != ""]?macro:ivr)
|
same => n,GotoIf($["${MACRO}" != ""]?macro:ivr)
|
||||||
same => n(macro),Macro(${MACRO},${ARG1})
|
same => n(macro),Macro(${MACRO},${ARG1})
|
||||||
same => n,Hangup
|
same => n,Hangup
|
||||||
same => n(ivr),Goto(ivr,s,1)
|
same => n(ivr),Goto(ivr,s,1)
|
||||||
|
|
Loading…
Reference in New Issue