asterisk

PHPAGI: Exec format error

隐身守侯 提交于 2019-12-12 09:53:10
问题 Encountering a problem when running phpagi: -- Executing [123@DLPN_C:1] AGI("SIP/1000-00000001", "hello_world.php") in new stack -- Launched AGI Script /var/lib/asterisk/agi-bin/hello_world.php hello_world.php: Failed to execute '/var/lib/asterisk/agi-bin/hello_world.php': Exec format error -- Auto fallthrough, channel 'SIP/1000-00000001' status is 'UNKNOWN' Scheduling destruction of SIP dialog '343930130' in 32000 ms (Method: INVITE) From command line: root@asterisk-test:/var/lib/asterisk

Why would originate call fail when using the Asterisk API with the Context set to “default”?

时间秒杀一切 提交于 2019-12-12 05:24:39
问题 When I originate a call to an outside line, setting the context to "default" causes a voice to say "good bye" and then the call is immediately terminated. If I call an extension, it works perfectly with or without the context property. If I remove the context property entirely, then I can call both inside and outside lines. So what's going on? 回答1: You need setup context default corectly. Or use other context to do dialplan. see this links extensions.conf dialout 来源: https://stackoverflow.com

How can we handle outgoing fax calls?

南笙酒味 提交于 2019-12-12 04:23:51
问题 We have a server "Elastix". Is there a way to make something like this? If someone calls on fax machine, write this behavior in database and hangup immediately. I heard about AMD application and read a lot of information, but still don't quite understand, how to make it do what I need. Can you help me with solution, please? Thank you in advance! 来源: https://stackoverflow.com/questions/38570123/how-can-we-handle-outgoing-fax-calls

Asterisk 11.7 Matching on Caller ID

与世无争的帅哥 提交于 2019-12-12 04:02:41
问题 I've an asterisk pbx that manages some sip providers (a ISDN Patton) and some Voip providers. I'm trying to use matching of CID in my dialplan as described here. This is the relevant part of my dialplan, please note that this part of dialplan is included my extension.conf: [patton];Calls from Patton exten => 0219999999/_0031X.,1,Answer(0) exten => 0219999999/_0031X.,n,Hangout() exten => 0219999999,1,Answer(0) exten => 0219999999,n,Goto(in_4,${EXTEN},1) [in_4] exten => 0219999999,1,Noop(Exten:

How to get the phone number(callerID) in asterisk

允我心安 提交于 2019-12-12 03:24:48
问题 We've been using VICIDIAL for the past 4 years and we're updating our asterisk now. Can you please assist me on the below query? Once the call has been reached to our IVR, we need to pass the Mobile number to our script whether it exists in our database or not. If it exists it will go one campaign, else it will go to another campaign. We've created the php script and it's working fine but I'm not sure how to transfer my phone number from asterisk to the php script ? I've pasted the sample

Correct way to revert back to originating server?

点点圈 提交于 2019-12-12 02:42:02
问题 I have two servers on the same network. SIP is setup with canreinvite=yes I call Server 2 from server 1 with DIAL() cmd What is the correct way to revert back to server 1 after I am complete with the call on server 2 without dropping the channel? (I still want the channel active to offer the user specific options back on server 1). 回答1: Please use "g" option of Dial command like this: exten => _X.,n,Dial(SIP/mytrunk/${EXTEN},,g) After Dial command it will continue to run next Dialplan command

Not getting events with PAMI

早过忘川 提交于 2019-12-12 02:35:31
问题 class VoipEventStart implements IEventListener { public function handle(EventMessage $event) { $a = $event->getKeys(); if( ($a['event'] == "Hangup" || $a['event'] == "HangupRequest") && strpos($a['channel'], 'SIP/') !== FALSE) { return true; } return false; } } With above code ,I get peer status events, dont get the call events. Can any one help me what will be the reason? 回答1: Check your asterisk manager.conf. Each AMI account has a list of read/write permissions. Ensure that your account

Playback a file to both sites of a call by DTMF request

这一生的挚爱 提交于 2019-12-12 01:44:49
问题 I want to play a sound file to both call legs whenever the caller clicks a DTMF, I used asterisk features so if the caller clicks the dtmf 6 a sound file will be played to both call legs, The problem is asterisk features only allow the feature to run on one side of the call: self OR peer, I tried configuring 2 features with the same DTMF like that: features.conf: [applicationmap] PlaySound6p => 6,peer/peer,Playback,tt-monkeys PlaySound6s => 6,self/peer,Playback,tt-monkeys but the playback of

Asterisk AMI: DTMF not received on SIP channel

此生再无相见时 提交于 2019-12-12 01:37:07
问题 I'm sending DTMF to Asterisk using python and pyst. The code is: def playDTMF(self, channel, digit): print "DTMF: Sending %s to %s" % (digit, channel) response = self.manager.send_action({ "Action" : "PlayDTMF", "Channel" : channel, "Digit" : digit }) print "DTMF: %s - %s" % (response['Response'], response['Message']) Output of the script is good: DTMF: Sending 1 to SIP/S3bc9c3c-00000081 DTMF: Success - DTMF successfully queued But Asterisk reacts to it like that: [Jul 2 17:48:53] DEBUG[6967]

Asterisk get_variable, in Perl AGI

一笑奈何 提交于 2019-12-12 01:26:12
问题 I am little new to Asterisk AGI. I am using perl with asterisk agi. I need to design an IVR solution using Perl asterisk agi. I have write a little code and it is executing fine. Perl Code:- #!/usr/bin/perl -w use strict; use warnings; use Asterisk::AGI; my $agi = new Asterisk::AGI; my $option1 = ""; my $option2 = ""; $agi->exec("Read","option1,recording-201503252343,1,,,"); $option2 = $agi->get_variable("$option1"); $agi->exec("NoOp","$option1"); if($option2 == 1) { $agi->exec("Playback",