asteriskami

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

How to get all dialer events from Asterisk REST API (ARI)?

隐身守侯 提交于 2019-12-07 09:33:32
问题 I'm making a web application which should be able to monitor calls on my Asterisk server. I can connect to ARI with Javascript WebSocket on URL ws://(host):8088/ari/events?app=dialer and it works. The problem is that I only get events from calls that are made over ARI. Calls made from other clients like Zoiper are not registered. On the other hand, Asterisk has AJAM which uses long polling on http://(host):8088/rawman?action=waitevent and it registers calls from all the clients, (ARI, Zoiper

How to get all dialer events from Asterisk REST API (ARI)?

烂漫一生 提交于 2019-12-05 12:28:39
I'm making a web application which should be able to monitor calls on my Asterisk server. I can connect to ARI with Javascript WebSocket on URL ws://(host):8088/ari/events?app=dialer and it works. The problem is that I only get events from calls that are made over ARI. Calls made from other clients like Zoiper are not registered. On the other hand, Asterisk has AJAM which uses long polling on http://(host):8088/rawman?action=waitevent and it registers calls from all the clients, (ARI, Zoiper and others) but there's only information who is calling (caller), not whom (callee). So, my question is

Asterisk: create user with template via AMI

别来无恙 提交于 2019-12-05 02:06:30
问题 I need to modify sip.conf with AMI, adding a new user to it. Everything works fine, and I can create a user like this without problems: [1000] secret=pass12 But I have to create user with template like [1000](mytemp) secret=pass12 and I don't know how to do this. Neither Google, nor Digium forum can't help me. P.S. I use JavaScript asterisk-manager to interact with Asterisk, and here is my code, which adds extension: var amiAction = { action: 'UpdateConfig', reload: 'yes', srcfilename: 'sip

Asterisk: create user with template via AMI

旧街凉风 提交于 2019-12-03 21:34:06
I need to modify sip.conf with AMI, adding a new user to it. Everything works fine, and I can create a user like this without problems: [1000] secret=pass12 But I have to create user with template like [1000](mytemp) secret=pass12 and I don't know how to do this. Neither Google, nor Digium forum can't help me. P.S. I use JavaScript asterisk-manager to interact with Asterisk, and here is my code, which adds extension: var amiAction = { action: 'UpdateConfig', reload: 'yes', srcfilename: 'sip.conf', dstfilename: 'sip.conf', 'action-000000': 'newcat', 'cat-000000': '1000', 'action-000001':

ConfBridge: end up conference when admin user exit

扶醉桌前 提交于 2019-12-02 04:51:33
I am doing something about ConfBridge these days. I used "confbridge kick all" to end the conferences when admin user exit, but the others in the conference will hear "you have been kick out from this conference.". it is not a good way to end a conference. Is there any configure or command which can set that conference will end up when the admin user exit the conference? Just set endmarked=yes on the user profile you're using (found in confbridge.conf). The docs say: ;end_marked=yes ; This option will kick every user with this option set in their ; user profile after the last Marked user

Asterisk AMI - pickup call

我的梦境 提交于 2019-11-29 11:54:29
I want to pickup call in Asterisk using AMI. I can originate call, but totally don't know, how to answer the phone... Script for calling: #login sock = socket.socket(af, socktype, proto) sock.connect(sockaddr) sock.send('Action: login\r\n') sock.send('Events: off\r\n') sock.send('Username: '+str(ast_server.login)+'\r\n') sock.send('Secret: '+str(ast_server.password)+'\r\n\r\n') #originate call sock.send('Action: originate\r\n') sock.send('Channel: ' + str(user.asterisk_chan_type) + '/' + str(user.internal_number)+'\r\n') sock.send('Timeout: '+str(ast_server.wait_time*1000)+'\r\n') sock.send(

Asternet AMI Send Command c# [closed]

大兔子大兔子 提交于 2019-11-27 08:40:50
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . Please tell me how to send commands (e.g.: sip show peers) via asternet (c#). Any help or link will be highly appreciated. Like: AsterNET.Manager.Response.ManagerResponse response = SendAction("sip show peers"); 回答1: "sip show peers" is COMMAND. You have send action COMMAND. https