asterisk

Asterisk - executing agi script if call is not answerd?

為{幸葍}努か 提交于 2019-12-10 17:11:27
问题 Here is context CH1 which i want to call from .call file [CH1] exten=>9367,1,Playback(welcome); same => n,Agi(agi://localhost/openlock.agi) same => n,Background(CH1_WAVE1) same => n,Hangup() my .call file look like this Channel: DAHDI/1/somemumber CallerID:xyz MaxRetries: 3 RetryTime: 40 WaitTime: 25 Context:CH1 Extension: 9367 Priority: 1 So my problem is this if one does not answer the call, my AGI script will not get execute, so is there any way to execute my AGI script if the call is not

Asterisk : originate call doesn't set the CALLERID in the dialplan

独自空忆成欢 提交于 2019-12-10 14:54:13
问题 I am using Asterisk PBX to call a softphone, i use thise command : "originate SIP/100 extension 4004" , in the dialplan, I have to get the CALLERID variable, but in this case, it's always empty! P.S : if i call the extension (4004), from the softphone(100), the CALLERID is set, and I can get it with : ${CALLERID(num)} . How to get the caller id in the originate case? 回答1: When you're originating a call, you set the Caller ID yourself. There are two ways of doing this - either in the originate

Recorded files lost when user hangs up in Asterisk

≯℡__Kan透↙ 提交于 2019-12-10 11:49:55
问题 I have one voice application in which I want to save a recorded sound file. My code is: $record_file= $dir_path . "recordfile_".$file_count; $this->obj_agi->exec("Record","$record_file.wav,5,$maxsecs"); Whenever I hang up during recording, the recording application can not execute and hangup the call. Does anyone have any idea how to manage this record function while hanging up? 回答1: The record application process the record normally even when you hangup. However, inside AGI, the best way to

Asterisk Dialplan (extensions.conf) Applications

南楼画角 提交于 2019-12-10 10:44:56
问题 i am developing an application that shall allow users to access their mail boxes using their phones. I developped an IVR menu of which users will make use to retrieve their mails. More specifically I write an AGI in perl to retrieve the mails. The issue is that the AGI execution takes quite a long time.To this end, I need to make my users hear some music played back in the background while the agi being executed. That is, i need to make the "AGI" and "MusicOnHold" applications in my dialplan

What is the difference between the .wav and .gsm file format

牧云@^-^@ 提交于 2019-12-10 10:25:12
问题 I am learning asterisk.In this I have worked with voicemail application. When I was trying to play the voicemail,I have seen the files in the following format. .wav .WAV .gsm What is the difference between the above file formats. 回答1: There is info on Asterisk wiki: gsm: raw gsm encoding, good for VoIP wav: MS wav format, 16 bit linear WAV: MS wav format, gsm encoded (wav49) You can read about those file formats on Wikipedia: Audio_file_format Remember that .wav files can be created with

getting the group name to the according pri port in asterisk

馋奶兔 提交于 2019-12-10 02:54:21
问题 I am using sagoma 8 port card My chan_dahdi.conf to configure the ports are ;autogenerated by /usr/sbin/wancfg_dahdi do not hand edit ;autogenrated on 2015-06-12 ;Dahdi Channels Configurations ;For detailed Dahdi options, view /etc/asterisk/chan_dahdi.conf.bak [trunkgroups] [channels] context=default usecallerid=yes hidecallerid=no callwaiting=yes usecallingpres=yes callwaitingcallerid=yes threewaycalling=yes transfer=yes canpark=yes cancallforward=yes callreturn=yes echocancel=yes

How to Set Timeout for FastAGI in Asterisk

天大地大妈咪最大 提交于 2019-12-08 14:25:52
问题 I have a server that sends FastAGI requests over TCP to another server in the Internet. The problem is that the default timeout for FastAGI is very short and the error below is raised. How can I set FastAGI timeout in my dialplan? FastAGI connection to 'agi://Myserver/agi' timed out after MAX_AGI_CONNECT (2000) milliseconds. 回答1: 2sec timeout is not "very short". I can't imagine situation when application can't answer in 2 sec. Very likly you have issue with other side. However if you are

Forwarding X Headers in Asterisk

耗尽温柔 提交于 2019-12-08 08:38:42
问题 We have a soft phone that's dialing out, on a SIP trunk, through our Asterisk server. The soft phone is sending X Headers that we want to send on to the destination. We see the headers coming into Asterisk, but not going out. Is there something we can do to forward the headers along to the destination? 回答1: Asterisk is no SIP proxy but a B2BUA. This actually means, that it is not forwarding the original request. The call from your softphone gets terminated on Asterisk. Asterisk starts a

AMI Asterisk Manager Interface Originate Action

人走茶凉 提交于 2019-12-08 07:08:54
问题 I am currently constructing a C#.NET wrapper for the Asterisk Interface Manager. I can do simple things like transfers and hangups. I am now in the process of building conference calling. I can set up an n-user conference, but I have to do so in terms of "Action: redirect" on existing active channels. What I'd like to do is route as now non-existent calls (i.e. there is no channel in "core show channels") to my context/extension that puts people in conference rooms. But I cannot get "Action:

ODBC connection error:No such command “odbc show” ODBC connection fail in asterisk*CLI

限于喜欢 提交于 2019-12-08 05:19:00
问题 Problems: I am using AsteriskNow which running asterisk 2.0 server in VirtualBox. And i want to connect Asterisk with MySQL databases using ODBC modules. But it fails. When i started with asterisk*CLI> odbc show The command prompt shows that "No such command ODBC SHOW" My Objectives: configure ODBC in asterisk to access MySQL from Asterisk's dialplan directly and dynamically. What i did: I installed my AsteriskNow in VirtualBox. The version of asterisk is 2.0, the CentOS version 5.8 final. I