I’m new to IPBX, and Asteridex, but wanted the Asteridex web page to be functional as a company wide contact list for any user. The problem was the “Extension” field on the page seems non-functional. I don’t know the history is - if it is a feature under construction or a regression that no longer works for some reason.
In any event I have reworked the page a little and assumed it should be the extension Asteridex attempts to connect a call to. Any user can enter their extension, click a contact and have the call connected.
Hopefully my implementation won’t give @wardmundy nightmares.
The files should replace the existing index.php and callboth.php in the Asteridex4 www folder. Back up the stock files first!
Disclaimer:
I never touched PHP or the Asterisk Manager before yesterday. Excuse anything that may be bad form. More experienced folks may well wonder why the heck I did things a certain way. Simple answer – I used the first method I found that seemed to worked and moved on. I welcome any critiques or suggestions.
Assumptions:
All entries in the Asteridex database are public to all PBX users.
The environment is such that a user sending a call to another extension (accidentally or intentionally) is not a major concern.
Changes:
Replaces existing index.php and callboth.php.
index.php: Removed the "save" button. The entered extension is automatically stored in a browser cookie.
index.php: Removed the dialing status pop-up window - call status displays in the main Asteridex page.
index.php: Removed the mouseover window.status events - non-functional in most modern browsers.
index.php: Added some very crude extension validity checks - must be a one to 5 digit integer.
callboth.php: Ignores default extension and database "in" column. An extension is required from the main Asteridex page.
callboth.php: Queries ExtensionState to determine if extension is SIP/PJSIP/IAX2/etc.
callboth.php: Avoids placing call and returns error message to Asteridex if extension is not found.
callboth.php: Returns error message to Asteridex if Manager connection errors out.
callboth.php: Returns error message to Asteridex if Manager connection times out.
The new index.php can be used with the stock callboth.php if the new callboth.php causes issues.
Edit the SEQ value and make it unique to your environment. SEQ must be the same in index.php and callboth.php.
In any event I have reworked the page a little and assumed it should be the extension Asteridex attempts to connect a call to. Any user can enter their extension, click a contact and have the call connected.
Hopefully my implementation won’t give @wardmundy nightmares.
The files should replace the existing index.php and callboth.php in the Asteridex4 www folder. Back up the stock files first!
Disclaimer:
I never touched PHP or the Asterisk Manager before yesterday. Excuse anything that may be bad form. More experienced folks may well wonder why the heck I did things a certain way. Simple answer – I used the first method I found that seemed to worked and moved on. I welcome any critiques or suggestions.
Assumptions:
All entries in the Asteridex database are public to all PBX users.
The environment is such that a user sending a call to another extension (accidentally or intentionally) is not a major concern.
Changes:
Replaces existing index.php and callboth.php.
index.php: Removed the "save" button. The entered extension is automatically stored in a browser cookie.
index.php: Removed the dialing status pop-up window - call status displays in the main Asteridex page.
index.php: Removed the mouseover window.status events - non-functional in most modern browsers.
index.php: Added some very crude extension validity checks - must be a one to 5 digit integer.
callboth.php: Ignores default extension and database "in" column. An extension is required from the main Asteridex page.
callboth.php: Queries ExtensionState to determine if extension is SIP/PJSIP/IAX2/etc.
callboth.php: Avoids placing call and returns error message to Asteridex if extension is not found.
callboth.php: Returns error message to Asteridex if Manager connection errors out.
callboth.php: Returns error message to Asteridex if Manager connection times out.
The new index.php can be used with the stock callboth.php if the new callboth.php causes issues.
Edit the SEQ value and make it unique to your environment. SEQ must be the same in index.php and callboth.php.
Attachments
Last edited: