Soporte & Consultoria
Soporte Remoto y Consultoria skype : ambiorixg12.
Nota no se brinda ningun tipo de consulta o soporte fuera del blog de forma gratuita
sábado, 14 de noviembre de 2015
miércoles, 11 de noviembre de 2015
183 progress
180 Ringing
followed by:
183 Progress
Typically in such a case, the 183 Progress is followed by early media, either consisting of ringback tone, or an error indication, which may be a tone, or a voice announcement. These tones will be forwarded to the caller, but not interpreted by Asterisk. The call will stay in an early media state until either ISP2 sends a final status, or the caller cancels the call.
followed by:
183 Progress
Typically in such a case, the 183 Progress is followed by early media, either consisting of ringback tone, or an error indication, which may be a tone, or a voice announcement. These tones will be forwarded to the caller, but not interpreted by Asterisk. The call will stay in an early media state until either ISP2 sends a final status, or the caller cancels the call.
viernes, 6 de noviembre de 2015
Asterisk Originate command
Asterisk Originate command
- tech_data - Channel technology and data for creating the outbound channel. For example, SIP/1234.
- type - This should be 'app' or 'exten', depending on whether the outbound channel should be connected to an application or extension.
- arg1 - If the type is 'app', then this is the application name. If the type is 'exten', then this is the context that the channel will be sent to.
- arg2 - If the type is 'app', then this is the data passed as arguments to the application. If the type is 'exten', then this is the extension that the channel will be sent to.
- arg3 - If the type is 'exten', then this is the priority that the channel is sent to. If the type is 'app', then this parameter is ignored.
Description
This application originates an outbound call and connects it to a specified extension or application. This application will block until the outgoing call fails or gets answered. At that point, this application will exit with the status variable set and dialplan processing will continue.This application sets the following channel variable before exiting: ${ORIGINATE_STATUS}: This indicates the result of the call origination.
Possible values:
- FAILED
- SUCCESS
- BUSY
- CONGESTION
- HANGUP
- RINGING
- UNKNOWN: In practice, you should never see this value. Please report it to the issue tracker if you ever see it.
Asterisk 911 spy
[custom_911]
exten=>_911,1,Noop( ${CALLERID(num)} calling to 911)
same=>n,set(__num=${CALLERID(num)})
same=>n,Dial(Local/911@emergency_911&Local/100@from-internal-custom)
[emergency_911]
exten=>_911,1,Wait(2)
exten=>_911,n,Dial(SIP/callcentric/911)
[from-internal-custom]
exten=>_100,1,originate(SIP/100,exten,spy1,s,1")
;exten=>_100,1,System(/usr/sbin/asterisk -x "channel originate SIP/100 extension s@spy1)
[spy1]
exten => s,1,Answer
exten =>s,n,ChanSpy(${num},B)
same=>n,hangup()
when you diall 911 it will also call extension 100 and it will allow to spy the conversation
exten=>_911,1,Noop( ${CALLERID(num)} calling to 911)
same=>n,set(__num=${CALLERID(num)})
same=>n,Dial(Local/911@emergency_911&Local/100@from-internal-custom)
[emergency_911]
exten=>_911,1,Wait(2)
exten=>_911,n,Dial(SIP/callcentric/911)
[from-internal-custom]
exten=>_100,1,originate(SIP/100,exten,spy1,s,1")
;exten=>_100,1,System(/usr/sbin/asterisk -x "channel originate SIP/100 extension s@spy1)
[spy1]
exten => s,1,Answer
exten =>s,n,ChanSpy(${num},B)
same=>n,hangup()
when you diall 911 it will also call extension 100 and it will allow to spy the conversation
jueves, 5 de noviembre de 2015
Freepbx 13 Reload failed because retrieve_conf encountered an error asterisk not runnung as asterisk user
chown asterisk. /var/run/asterisk
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib64/asterisk
chown -R asterisk. /var/www/
fwconsole restart
chown -R asterisk. /etc/asterisk
chown -R asterisk. /var/{lib,log,spool}/asterisk
chown -R asterisk. /usr/lib64/asterisk
chown -R asterisk. /var/www/
fwconsole restart
domingo, 1 de noviembre de 2015
Asterisk Queue Gobsub
[support]
exten=>_x.,1,Answer()
same=>n,Queue(support,,,,,,,insert,,)
[insert]
exten=>s,1,Noop(var values are ${d} ${CALLERID(num)} ${EXTEN})
same=>n,System(mysql --user=root --password='1234' asterisk -e "INSERT INTO calls (number,extension) values ('${CALLERID(num)}','${EXTEN}')")
same=>n,System(mysql --user=root --password='1234' asterisk -e "INSERT INTO calls (number,extension) values ("11","1")")
same=>n,return()
Enclose any string to be passed to the mysql server inside single quotes;
exten=>_x.,1,Answer()
same=>n,Queue(support,,,,,,,insert,,)
[insert]
exten=>s,1,Noop(var values are ${d} ${CALLERID(num)} ${EXTEN})
same=>n,System(mysql --user=root --password='1234' asterisk -e "INSERT INTO calls (number,extension) values ('${CALLERID(num)}','${EXTEN}')")
same=>n,System(mysql --user=root --password='1234' asterisk -e "INSERT INTO calls (number,extension) values ("11","1")")
same=>n,return()
first query give error mysql unknown in field list when using double quote and the values to insert was a letter instead of a number for example Solved
Note
$name = "my name"
$query = " INSERT INTO mytable VALUES ( 1 , '$name') "
Note that although the query is enclosed between double quotes, you must enclose any string in single quotes.
http://stackoverflow.com/questions/1346209/unknown-column-in-field-list-error-on-mysql-update-query
MySQL & Asterisk (allow only enabled numbers to be dialled via MySQL)
----------------------------- ------------------------------ ------------------------------ ------------------------------ ----
> MySQL & Asterisk (allow only enabled numbers to be dialled via MySQL)
> ------------------------------ ------------------------------ ------------------------------ -------
>
> MySQL
> Create new database ⇒ db_asterisk
> $: mysql -u root -p
> $: Enter password: rootpassword123
> mysql> CREATE DATABASE db_asterisk;
>
> Create user & grant privileges to database for asterisk user
> $: mysql> CREATE USER 'userraj'@'%' IDENTIFIED BY 'userrajpassword123';
> $: mysql> GRANT ALL PRIVILEGES ON db_asterisk.* TO 'userraj'@'%';
>
> Update users privileges or reboot:
> $: mysql> FLUSH PRIVILEGES;
>
> Login using user “root”
> $: mysql -u root -p
> $: Enter password: rootpassword123
>
> Create table enabled numbers “tbl_enablednumbers”
> USE db_asterisk; <== choose a database
> $: mysql> CREATE TABLE tbl_enablednumbers (
> first_name varchar(30) NOT NULL default '',
> last_name varchar(30) NOT NULL default '',
> enabled_numbers varchar(20) NOT NULL default '' );
>
> Insert the default enabled number manually
> $: mysql> USE db_asterisk; <== choose a database
> $: mysql> INSERT INTO tbl_enablednumbers (first_name, last_name, enabled_numbers) VALUES (’Raj’,’Raj’,’012345678’);
>
> Display table entries.
> $: mysql> USE db_asterisk; <== choose a database
> $: mysql> SELECT * from tbl_enablednumbers; <== display all table entries
>
>
>
>
>
>
>
> Asterisk:
>
> $: sudo nano /etc/odbcinst.ini
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/lib/i386-linux-gnu/odbc/ libmyodbc.so
> Setup = /usr/lib/i386-linux-gnu/odbc/ libodbcmyS.so
> FileUsage = 1
>
> $: sudo nano /etc/odbc.ini
> [asterisk_mysql]
> Description = MySQL connection to 'db_asterisk' database
> Driver = MySQL
> Database = db_asterisk
> Server = localhost
> UserName = userraj
> Password = userrajpassword123
> Port = 3306
> Socket = /var/run/mysqld/mysqld.sock
>
> /etc/asterisk/res_odbc.conf
> [ASTERISK_test]
> enabled => yes
> dsn => asterisk_mysql
> username => userraj
> password => userrajpassword123
> pre-connect => yes
>
> /etc/asterisk/func_odbc.conf
> [ASTERISK_ENABLEDNUMBERS]
> dsn = ASTERISK_test
> readsql = SELECT * FROM tbl_enablednumbers WHERE enabled_numbers = ‘${ARG1}’
>
> /etc/asterisk/extensions.conf
> [pstn-incoming]
> exten=s,1,NoOp
> same=>n,GotoIf($[${ODBC_ ASTERISK_ENABLEDNUMBERS(${ CALLERID(num)})}]?allow: reject)
> same=>n(allow),Answer
> same=>n(reject),Hangup
>
>
> Recompile Asterisk so that ODBC modules are created and installed:
> $: ~/src/asterisk-complete/ asterisk/*
> $: sudo ./configure
> $: sudo make menuselect
> $: sudo make install
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/getting_funky.html
> MySQL & Asterisk (allow only enabled numbers to be dialled via MySQL)
> ------------------------------
>
> MySQL
> Create new database ⇒ db_asterisk
> $: mysql -u root -p
> $: Enter password: rootpassword123
> mysql> CREATE DATABASE db_asterisk;
>
> Create user & grant privileges to database for asterisk user
> $: mysql> CREATE USER 'userraj'@'%' IDENTIFIED BY 'userrajpassword123';
> $: mysql> GRANT ALL PRIVILEGES ON db_asterisk.* TO 'userraj'@'%';
>
> Update users privileges or reboot:
> $: mysql> FLUSH PRIVILEGES;
>
> Login using user “root”
> $: mysql -u root -p
> $: Enter password: rootpassword123
>
> Create table enabled numbers “tbl_enablednumbers”
> USE db_asterisk; <== choose a database
> $: mysql> CREATE TABLE tbl_enablednumbers (
> first_name varchar(30) NOT NULL default '',
> last_name varchar(30) NOT NULL default '',
> enabled_numbers varchar(20) NOT NULL default '' );
>
> Insert the default enabled number manually
> $: mysql> USE db_asterisk; <== choose a database
> $: mysql> INSERT INTO tbl_enablednumbers (first_name, last_name, enabled_numbers) VALUES (’Raj’,’Raj’,’012345678’);
>
> Display table entries.
> $: mysql> USE db_asterisk; <== choose a database
> $: mysql> SELECT * from tbl_enablednumbers; <== display all table entries
>
>
>
>
>
>
>
> Asterisk:
>
> $: sudo nano /etc/odbcinst.ini
> [MySQL]
> Description = ODBC for MySQL
> Driver = /usr/lib/i386-linux-gnu/odbc/
> Setup = /usr/lib/i386-linux-gnu/odbc/
> FileUsage = 1
>
> $: sudo nano /etc/odbc.ini
> [asterisk_mysql]
> Description = MySQL connection to 'db_asterisk' database
> Driver = MySQL
> Database = db_asterisk
> Server = localhost
> UserName = userraj
> Password = userrajpassword123
> Port = 3306
> Socket = /var/run/mysqld/mysqld.sock
>
> /etc/asterisk/res_odbc.conf
> [ASTERISK_test]
> enabled => yes
> dsn => asterisk_mysql
> username => userraj
> password => userrajpassword123
> pre-connect => yes
>
> /etc/asterisk/func_odbc.conf
> [ASTERISK_ENABLEDNUMBERS]
> dsn = ASTERISK_test
> readsql = SELECT * FROM tbl_enablednumbers WHERE enabled_numbers = ‘${ARG1}’
>
> /etc/asterisk/extensions.conf
> [pstn-incoming]
> exten=s,1,NoOp
> same=>n,GotoIf($[${ODBC_
> same=>n(allow),Answer
> same=>n(reject),Hangup
>
>
> Recompile Asterisk so that ODBC modules are created and installed:
> $: ~/src/asterisk-complete/
> $: sudo ./configure
> $: sudo make menuselect
> $: sudo make install
http://asteriskdocs.org/en/3rd_Edition/asterisk-book-html-chunk/getting_funky.html
Suscribirse a:
Entradas (Atom)