User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:devel:asterisk [2016/04/28 17:15]
joebordes
en:devel:asterisk [2021/01/31 19:45] (current)
joebordes [Design]
Line 5: Line 5:
 {{:​en:​devel:​corebosasterisk.svg|}} {{:​en:​devel:​corebosasterisk.svg|}}
  
-===== FAQ =====+===== How to simulate a call =====
  
-??? Since the extension is pollingIs there a way to reduce ​the number ​of events detected.+Activate PBX for the user you want to test with. In this example I set extension ​14 for admin user (userid=1):​ 
 + 
 +<code SQL> 
 +UPDATE `vtiger_asteriskextensions` SET `asterisk_extension`='​14',​ `use_asterisk` = '​1'​ 
 + WHERE `vtiger_asteriskextensions`.`userid` = 1; 
 +</​code>​ 
 + 
 +Since we are making the change directly in the database, the user file is not updatedso go to the users' preferences and click on the "​Recalculate"​ action. 
 + 
 +Once you do that, reload the coreBOS page and open the inspector network tab. You will see that asterisk.js has been loaded and that the polling has started. 
 + 
 +Now we insert a call directly in the DB: 
 + 
 +<code SQL> 
 +INSERT INTO `vtiger_asteriskincomingcalls` 
 + ​(`from_number`,​ `from_name`,​ `to_number`,​ `callertype`,​ `flag`, `timer`, `refuid`) 
 + ​VALUES 
 + ​('​03-3608-5660',​ '​joeb',​ '​14',​ '​SIP',​ '​0',​ UNIX_TIMESTAMP(),​ '​any_unique_id'​);​ 
 +</​code>​ 
 + 
 +the important ​number ​here is the "​14"​ which must match the extension we set in the update above. 
 + 
 +Now you should see the asterisk popup notification in the application. 
 + 
 +===== Other Things ===== 
 + 
 +[[:​en:​devel:​corebospbx:​llamadaentrantecola|Vtiger + popup + llamada entrante + cola]] 
 + 
 +===== FAQ =====
  
-!!! Solo es poner en el manager.conf (en freepbx seria manager_custom.conf ) los filtros de eventos (partir de asterisk 1.8 es posible) para nuestro caso:+??? Since the extension is polling, is there way to reduce the number of events detected?
  
 +!!! Configure your asterisk server with the next settings to filter events by putting them in manager.conf (in freepbx it would be manager_custom.conf) (asterisk >= 1.8):
 +<​code>​
 read = all read = all
 write = all write = all
Line 23: Line 53:
 eventfilter=!Event:​ PeerStatus eventfilter=!Event:​ PeerStatus
 eventfilter=!Event:​ Registry eventfilter=!Event:​ Registry
 +</​code>​
  
-Hasta ahora, al disminuir considerablemente el numero de eventos a escuchar y procesar, el asteriskclient ​esta muchísimo mas estable, tengo que leer el código para saber exactamente que requiere escuchar y luego te cuento.+Since we applied this change the asteriskclient ​is much more stable.