asterisk

Reliably identifying and tracking Asterisk calls using C# and Aster.NET

泪湿孤枕 提交于 2020-01-14 09:03:03
问题 I have been building a WinForms desktop application using C# that interfaces with Asterisk using Aster.NET (formerly/forked from Asterisk.NET). We're having real trouble reliably identifying and tracking calls that are related to an individual extension/user. The problem we're having is due to the unpredictable/fuzzy nature of the events fired/triggered by Asterisk, with them being massively variable depending on how the call is routed before it hits an extension. For example, the event

Asterisk playback sound file into ConfBridge?

混江龙づ霸主 提交于 2020-01-13 17:59:06
问题 I'm trying to make a conference and play a sound file in the background of the conference. How can I make this possible? this obviously wouldn't work because the sound file will be played before entering the conference. exten => s,1,playback(some/soundfile) same => n,confbridge(1) Thanks in advance! 回答1: Wanted to add my solution here in case anyone ever needs it. first make a context for the conf bridge in extensions.conf: [conf-msg] exten => s,1,ConfBridge(01) where 01 is the bridge number

Call disconnect for asterisk

自闭症网瘾萝莉.ら 提交于 2020-01-07 05:04:19
问题 How to capture call disconnect for asterisk using PHPAGI ? For e.g. if user disconnects the call which event is invoked ? How to capture it ? 回答1: You can check the Return Results of your PHP-AGI API calls, for example stream_file returns -1 on hangup. You could also invoke another AGI Script on the h Extension in the Dialplan. If you have to clean up something, you could also register a Shutdown function. Another Approach is to register a Signal Handler which edmund long described in his

Connecting from .NET to Asterisk

被刻印的时光 ゝ 提交于 2020-01-06 08:26:32
问题 I am trying to connect from a .NET application to the Asterisk server, but the connection is not established. I am using the following code to connect to Asterisk: Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse("192.168.0.35"), 5038); clientSocket.Connect(serverEndPoint); and I get the following error: A connection attempt failed because the connected party did not properly respond

Connecting from .NET to Asterisk

放肆的年华 提交于 2020-01-06 08:26:10
问题 I am trying to connect from a .NET application to the Asterisk server, but the connection is not established. I am using the following code to connect to Asterisk: Socket clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPEndPoint serverEndPoint = new IPEndPoint(IPAddress.Parse("192.168.0.35"), 5038); clientSocket.Connect(serverEndPoint); and I get the following error: A connection attempt failed because the connected party did not properly respond

Java Errors for simple program stop compiling process, please help

别说谁变了你拦得住时间么 提交于 2020-01-06 06:11:01
问题 I am a beginner here, but I have been dealing with this unknown issue for a while now. Please view this simple program that I have coded and explain why it will not compile for me. The thing is that I have copied this code from a teacher and it works fine on his machine. Then when I tried to run the example on my machine I get 13 errors! Here is the first class: import java.awt.*; import java.awt.event.*; import javax.swing.*; class radio extends JFrame{ private JTextField tf; private Font pf

Java Errors for simple program stop compiling process, please help

▼魔方 西西 提交于 2020-01-06 06:10:27
问题 I am a beginner here, but I have been dealing with this unknown issue for a while now. Please view this simple program that I have coded and explain why it will not compile for me. The thing is that I have copied this code from a teacher and it works fine on his machine. Then when I tried to run the example on my machine I get 13 errors! Here is the first class: import java.awt.*; import java.awt.event.*; import javax.swing.*; class radio extends JFrame{ private JTextField tf; private Font pf

Make phone ring through webserver using Asterisk

◇◆丶佛笑我妖孽 提交于 2020-01-02 08:21:31
问题 What is the easiest way? And how can it be implemented? I thought to something like: I request a page to the webserver Php sends to asterisk a number to dial (php and asterisk are running in the same machine) Asterisk calls the phone or A php sip client registers to remote asterisk server Php sip client sends to asterik the number to dial Phone rings i don't care if i can hear something, it's enough that it rings 回答1: Call File The easiest way is to generate a Call File. Asterisk has the

How to call a context and return to the main context in asterisk?

混江龙づ霸主 提交于 2020-01-02 05:33:05
问题 Here is my dial plan in asterisk: [main-context] exten => s,1,Gosub(subcontext,s,1) exten => s,n,NoOp(End Main) [subcontext] exten => s,1,NoOp(Start subcontext) exten => s,1,NoOp(End subcontext) The problem is that when subcontext finishes, execution doesn't return to main-context and exten => s,n,NoOp(End Main) doesn't execute. How can I solve this? 回答1: As Karadous posted above: a GoSub routine must have a matching Return() application call. [main-context] exten => s,1,Gosub(subcontext,s,1)

Join two conferences in asterisk

情到浓时终转凉″ 提交于 2020-01-01 19:49:48
问题 I want to join two conferences (confbridge). Suppose there is a conference room c1 and then there is another conf room c2, now i want that participant of c1 can also join participants of c2 but the condition is that c1 participant don't have to leave their room. How can I implement this using confbridge and asterisk? 回答1: you have an implementation here: Connecting two conferences on initial join 回答2: considering you have two conferences rooms named 1 and 2 then add to your extensions.conf: