User Tools


This is an old revision of the document!


Asterisk

Design

How to simulate a call

Activate PBX for the user you want to test with. In this example I set extension 14 for admin user (userid=1):

UPDATE `vtiger_asteriskextensions` SET `asterisk_extension`='14', `use_asterisk` = '1'
 WHERE `vtiger_asteriskextensions`.`userid` = 1;

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:

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');

FAQ

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):

read = all
write = all
writetimeout = 2000
eventfilter=!Event: DMTF
eventfilter=!Event: RTCPSent
eventfilter=!Event: RTCPReceived
eventfilter=!Event: VarSet
eventfilter=!Event: Cdr
eventfilter=!Event: ExtensionStatus
eventfilter=!Event: ChannelUpdate
eventfilter=!Event: PeerStatus
eventfilter=!Event: Registry

Since we applied this change the asteriskclient is much more stable.


coreBOS Documentación