asterisk interview questions
Top asterisk frequently asked interview questions
I have created a linux service that runs as a deamon (and gets started from /etc/init.d/X). I need to set some environment variables that can be accessed by the application.
Here's the scenario. The application is a bunch of Perl AGI scripts that depend on (and therefore need to run as) asterisk user but asterisk doesn't have a shell. Ideally I'd just set this in /home/asterisk/.bashrc but that doesn't exist for asterisk.
How can I set environment variables for my app in the asterisk user's running environment so that my app can use them?
Source: (StackOverflow)
I am learning asterisk.
After I have installed asterisk I have tried to connect with it using asterisk -rvvvvc.
But it gave me an following error message.
Unable to connect to remote asterisk (does /var/run/asterisk.ctl exist?)
How can I solve this issue.Please help me.
Thanks in advance.
Source: (StackOverflow)
I need to setup a simple IVR system for a friend's company that will let the caller navigate through the menu by pressing phone keys. Its kind of like a bus schedule.
for today's schedule press '1', for tomorrow's schedule press '2' and
so on.
It is solely an information system, i.e. no navigation route will end up with a real person but only audio messages will be played.
Now, I've never setup anything like this before and did a little digging on Google. Seems like I will be able to achieve this using Asterisk.
- What else do I need hardware-wise?
- Is a simple Linux server and a VOIP account with a provider in Germany sufficient?
- Will a VPS handle the task?
- How about multiple concurrent incoming calls?
- Are those handled by Asterisk?
Source: (StackOverflow)
I am a bit confused about what version of Asterisk I am running on centos server.The documentation is different for different versions.How to know the version using putty command.
Source: (StackOverflow)
I have an Asterisk PBX under development, that I would like to link to a Skype account if possible. The idea is that people would call a particular Skype username, and be redirected to my SIP and through that to Asterisk. Is this doable? I have looked around and saw the Skype for Asterisk driver, but of course that has been discontinued. Are there any other options? I would prefer not to have to go through the regular PSTN telephone network but directly from Skype to Asterisk via SIP. If you have any tips on how to configure my sip.conf to get this working, this would also be highly appreciated.
Source: (StackOverflow)
I have one dialplan
in which what i want is,if user press any key then play file again but i can not understand how to get dtmf value in dialplan.
this is my dialplan:
[callme]
exten => s,1,Answer
exten => s,n,Playback(demo/${FILENAME1})
first how to get DTMF value and also if user press any key then playback should be executed 2 times.but i want to manage all this things using dialplan
.
Source: (StackOverflow)
I'm interested in learning more about Asterisk (open source PBX) so I thought I would try building a "hobby" system for my home. Just play around with getting a juiced up voicemail system going for my family. That is, until I found out that a TDM11B kit from Digium costs over $500(!) if I want to get an FXO/FXS card with echo cancellation.
My question(s) are: what's the best way to go about learning Asterisk? Moreover, if I just want to get a souped version of voicemail going at home is there way I can do it without having to buy an expensive card to hook into the PSTN?
thanks,
Source: (StackOverflow)
I'm using Switchvox, an Asterisk PBX and I'd like to host it on EC2.
Digium Switchvox provides an ISO which contains everything needed to host the pbx server: OS, software, etc. It's basically an image of the server.
How do I instantiate a new EC2 instance using the custom ISO they're providing?
Source: (StackOverflow)
After weeks of performing fantasically, our Asterisk went haywire the other day.
I looked at the logs of our server and it does, indeed, report losing the ability to communicate with Asterisk at some point (we're using the Java API):
org.asteriskjava.fastagi.AgiNetworkException: Unable to send command to Asterisk: Connection reset
In the var/logs/messages file of our Asterisk install, I see this huge string of "Autodestruct" errors, all of which look something similar to this:
[Sep 28 14:47:20] WARNING[25703] chan_sip.c: Autodestruct on dialog '973229537_87662997@66.7.123.144' with owner in place (Method: BYE)
[Sep 28 14:51:24] WARNING[25703] chan_sip.c: Autodestruct on dialog '2ad5325a16791b0c33ea74222848e3c0@10.30.0.232:5060' with owner in place (Method: BYE)
I've done a Google search, looked on these forums, looked on the Digium forums, and looked on voip-info.org but can't find any good information about what may have happened and how to avoid it.
Our setup is simple: we have a SIP provider and have eight channels with them. We process outgoing calls which remind patients of their dentist appointment and also incoming calls that allow offices to record a custom greeting to give to their patients.
Both calls trigger an AGI script where I present an IVR.
The error seem to have occurred on an incoming call.
Does anyone have any ideas what suddenly caused this?
Source: (StackOverflow)
Unit and integration testing is usually performed as part of a development process, of course. I'm looking for ways to use this methodology in configuration of an existing system, in this case the Asterisk soft PBX.
In the case of Asterisk, the configuration file is as much a programming language as anything else, complete with loops, jumps, conditionals, etc., and can get quite complex. Changes to the configuration often suffers from the same problems as changes to a complex software product - it can be hard to foresee all the effects without tests in place. It's made worse by the fact that the nature of the system is to communicate with external entities, i.e. make phone calls.
I have a few ideas about testing the system using call files (to create specific calls between extensions) while watching the manager interface for generated events. A test could then watch for an expected result, i.e. dialling *99# should result in the Voicemail application getting called.
The flaws are obvious - it doesn't test the actual result, only what the system thinks is the result, and it probably requires some modification of the system under test. It's also really hard to write these tests robustly enough to only trigger on the expected output, especially if the system is in use (i.e. there are other calls in progress).
Is what I want, a testing system for Asterisk, impossible? If not, do you have any ideas about ways to go about this in a reasonable manner? I'm willing to put a fair amount of development time into this and release the result under a friendly license, but I'm unsure about the best way to approach it.
Source: (StackOverflow)
As someone who is very new to the opensource PBX projects like Asterisk
and FreeSWITCH
, I am grappling with some information overload. Have read the basic FreeSWITCH docs on Wiki, but still have few questions. Since I am not very familiar with the terminology, I will try to use close approximations.
Trying to create a small/minimalistic build of FreeSWITCH, that needs to run on an rather old laptop (Celeron 1GHz, 512MB RAM, 20GB HDD, already running Debian "Wheezy"), and set it up as a 6-port GSM-SIP/Jabber gateway. So, by "small" and "minimalistic", I mean one which doesn't have modules/optional-software that is not absolutely necessary (e.g. no need for IVR announcements, or Skype integration) -- to keep memory footprint smallest, and occupy less hard-disk real-estate.
The rough idea is to have 6 GSM ports (via 'GSM-open module', similar to chan_dongle) towards public telephony network, and about 60 SIP extension, and support upto 6 calls involving GSM ports, and about 6 SIP-SIP calls (intra PBX), on this setup. I have read that the CPU overhead of GSMopen module is pretty low, so I am guessing this is possible.
- Can someone confirm this to be a realistic goal?
- What might be the minimum set of modules to select for minimalistic build?
- For modules not chosen during initial build, can those be added later? If so, would it require me to rebuild FreeSWITCH completely, only the modules, or that everything would be built, but only configuration changes would be required to ensure that modules are loaded, and configure?
- Is there any rough estimate of what might be the maximum call-rate that could be supported in such a configuration? For SIP-SIP calls? Given the underpowered processor, and little RAM (as per modern standards), I am guessing that both shall be bottlenecks, but adding RAM might still be possible (even if costly and difficult).
- I have read that "hooks" can be created using Lua/Python/Java etc.. However if someone share share few examples of what-all is possible using such hooks, it would make the concept clearer. Can one hope to write an application like "missed call log" or "redirect on no answer" using these hooks?
Source: (StackOverflow)
I am trying to compile asterisk from windows using netbeans c/c++ IDE. As i want to add some functionality into the existing code.
when i am running the configure file i got the following errors
cygwin warning:
MS-DOS style path detected: .\configure
Preferred POSIX equivalent is: ./configure
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
configure: error: cannot run /bin/sh ./config.sub
I am very new to cross platform development. Please help me to solve this
Source: (StackOverflow)
In the directories ~/temp/a/foo/
and ~/temp/b/foo foo/
I have some files named bar1
, bar2
, bar bar1
, bar bar2
, etc.
I am trying to write a line of Bash that copies all these files in a directory containing "foo" as last part of the name to the folder above the respective "foo" folder.
As long as there are no spaces in the file names, this is an easy task, but the two following commands fail when dealing with the foo foo
directory:
for dir in `find . -type d -name '*foo'` ; do cp $dir/* "$(echo $dir|sed 's_foo__g')" ; done
(The cp
command fails to see the last foo
of "foo foo"
as part of the same directory name.)
for dir in `find . -type d -name '*foo'` ; do cp "$dir/*" "$(echo $dir|sed 's_foo__g')" ; done
("$dir/*"
is not expanded.)
Attempts like replacing $dir/*
with "$(echo $dir/*)"
have been even less successful.
Is there an easy way to expand $dir/*
so that cp
understands?
Source: (StackOverflow)
I'm developing an application with PHP and a Asterisk Server. One of the features of the application is to check the call status (ringing, answered, hung...) of an specific caller ID, so I would like to know how to do this, because I'm trying with a socket and the command status but I think it has to be a better way to do it.
Thanks in advance.
Source: (StackOverflow)
I almost managed to init a 2 sided call (click to call): 1st to my office and the 2nd to my cell using Michal Niklas answer (thanks Michal) on
Asterisk click to call.
The major ISSUE is that the 2 call participants can not hear one each other, I used from-internal context for both of them. The system status web UI shows me 4 active channels and 2 external calls when the call is connected with both sides.
I configured the
Channel: local/MY OFFICE PHONE@from-internal
Extension: MY CELL PHONE
when I set the Channel to Sip/1 and check it with soft phone it works great!
Thanks for helping...
Source: (StackOverflow)