Crmgo Blog

Asterisk

← Blog

Asterisk

Posts: 23

Bash script for call transfer

Bash script for call transfer

· Asterisk

#!/bin/bash context="from-internal" # set the context to which we will transfer the call exten=$1 # get the operator's number num=$2 # get the external or internal number to which the transfer will be made bridge=$(asterisk -rx 'core show channels concise' | grep SIP/$exten -…

Variables in Asterisk

Variables in Asterisk

· Asterisk

Asterisk can use global and channel variables in command arguments. To reference a variable in the dialplan (extensions.conf), use the following syntax: ${foo}, where foo is the variable name. The variable name can consist of any sequence of digits and letters, and must start with...

Asterisk, making calls via Huawei E173 modem

Asterisk, making calls via Huawei E173 modem

· Asterisk

There was a need to configure Asterisk for making calls via a 3G modem. After a bit of searching, I found a module called chan_dongle. We have Asterisk 11 running on Ubuntu. The modem is a Huawei E173 (Djuice). First, we need to enable voice functionality and unblock the modem from the operator's SIM cards. Done...

Asterisk, Callback

Asterisk, Callback

· Asterisk

Dials an external number -> PBX calls back -> dials the subscriber's internal number -> communicates via outgoing trunk to the PBX. What we need: A few lines of dialplan that will handle the incoming and outgoing connections. A script to generate the .call file.

Installing Asterisk 13 on CentOS 7

Installing Asterisk 13 on CentOS 7

· Asterisk

Install the dependencies required for Asterisk to function correctly. Start and enable MySQL (MariaDB) to start on boot. By default, after installation, we can connect to our database server as root without entering a password. Therefore, we will set a password and make a few more configuration changes by running...

Installing Asterisk and Asterisk GUI

Installing Asterisk and Asterisk GUI

· Asterisk

Let's get started... Download the source code from SVN and build it. You can copy the commands below into the console and lean back in your chair while waiting. svn co svn.digium.com/svn/asterisk/branches/1.6.0 asterisk cd asterisk ./configure && make && make install && make samples && make config cd…

Configuring GOIP with Asterisk

Configuring GOIP with Asterisk

· Asterisk

1. Configuring GOIP. It is assumed that the gateway has the factory configuration. Insert the SIM cards into the gateway. Power it on. Now, access the gateway's web interface. To do this, connect GOIP to the local network using an Ethernet cable. There are two ways: 1) Through the "PC" port. By default, it…

AEL in Asterisk

AEL in Asterisk

· Asterisk

in the standard format: ; And here’s how the same context would look in ael syntax: So, the differences are clear. For me, one of the main advantages of ael is the readability of the configuration file: even in this small abstract example, it’s evident that reading and understanding…

Asterisk tells the time.

Asterisk tells the time.

· Asterisk

exten => 1005,1,Answer() exten => 1005,n,SayUnixTime(,,QdhAR) exten => 1005,n,WaitMusicOnHold(10) exten => 1005,n,Goto(*1005,1)

Asterisk GotoIfTime()

Asterisk GotoIfTime()

· Asterisk

Description: GotoIfTime(<times>|<weekdays>|<mdays>|<months>?[context|]extension|]pri) If the current time matches the specified time interval, then the call is transferred to the specified extension. Each element for time specification can be set as the '*' character (always matches) or as an interval. If the current time does not match the specified…

Asterisk FreePBX

Asterisk FreePBX

· Asterisk

yum install bxml2 libxml2-devel libtiff libtiff-devel lame php4-pear php-mysql openssl openssl-devel kernel-devel linux-source perl perl-CPAN bison ncurses-devel audiofile-devel curl sox Package Arch Version Repository Size ===================================================================================================================================================================================================== Installing: audiofile-devel x86_64 1:0.2.6-11.1.el6 base 17 k bison x86_64 2.4.1-5.el6 base 637 k lame…

Asterisk, auto-attendant, file recording, voice menu

Asterisk, auto-attendant, file recording, voice menu

· Asterisk

Preparing the audio file Convert *.wav to *.gsm (mono, 8000) sox hi.wav -r 8000 -c 1 hi.gsm resample -ql Place the *.gsm file somewhere in voicemail; I put it in /var/spool/asterisk/voicemail/mgp Alternatively, you can record the file yourself using Asterisk: ; recording to /var/lib/asterisk/sounds/...mymessage.gsm exten => 150,1,Answer() ;…

Asterisk: Working with String and Mathematical Operations

Asterisk: Working with String and Mathematical Operations

· Asterisk

String manipulation functions The ${LEN(foo)} function returns the length of the string foo. For example, exten => 100,1,Set(Fruit=pear) exten => 100,2,NoOp(${LEN(Fruit)}) exten => 100,3,NoOp(${LEN(${Fruit})}) The first NoOp command should display the value 5 (the length of the string "pear"). The second NoOp command should display the value 4...

Asterisk Variables

Asterisk Variables

· Asterisk

Channel-Specific Predefined Variables Below is a list of channel-specific variables set by Asterisk itself, whose values you can use in dialplans. Unlike user-defined variables, variables defined by Asterisk are case-sensitive. ${ACCOUNTCODE}: Account code, if…

asterisk-gui

asterisk-gui

· Asterisk

yum install subversion gcc-c++ svn co http://svn.digium.com/svn/asterisk-gui/branches/2.0 asterisk-gui cd asterisk-gui ./configure make make install make checkconfig # cat /usr/local/etc/asterisk/http.conf [general] enabled=yes enablestatic=yes bindaddr= 192.168.0.x bindport=8088 prefix=asterisk To apply the changes, restart Asterisk: # asterisk -r server*CLI> reload…

Configuring Fax

Configuring Fax

· Asterisk

Configuring fax (reception) Ideally, I would like to set up both reception and sending through Asterisk's built-in fax module, but sending currently raises many organizational issues (such as how to specify the number, convert formats, etc.). Here, I will cover the configuration for receiving faxes. The company Digium…