Asterisk PHP Script to determine status of DAHDI Channels
$10-30 USD
Paid on delivery
I need a simple script that uses PHPAGI that can be called by asterisk dialplan to run the command system command “lsdahdi | grep INACTIVE” or “lsdahdi | grep ACTIVE” or and will return a list of channels number that are INACTIVE, ACTIVE and INACTIVE IN ALARM:
Running from Linux command line lsdahdi | grep INACTIVE returns for example:
[#]$ lsdahdi | grep INACTIVE
15 FXO FXSKS (In use) (EC: MG2 - INACTIVE)
16 FXO FXSKS (In use) (EC: MG2 - INACTIVE)
21 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
22 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
23 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
24 FXO FXSKS (In use) (EC: MG2 - INACTIVE) RED
As you can see it returns 6 channels that are INACTIVE. Four are in RED Alarm.
I would like to be able to call the AGI Script to list channel status
(1) INACTIVE
(2) INACTIVE with Alarm
(3) ACTIVE
I need your script to return to asterisk dial plan a string something like this:
exten => _X.,1,Set(ALARM=RED)
exten => _X.,n,Set(STATE=INACTIVE)
exten => _X.,n,AGI([login to view URL],${STATE},${ALARM})
exten => _X.,n,Verbose(${RESULTS})
(${RESULTS} = 21,22,23,24
exten => _X.,1,Set(ALARM=)
exten => _X.,n,Set(STATE=INACTIVE)
exten => _X.,n,AGI([login to view URL],${STATE},${ALARM})
exten => _X.,n,Verbose(${RESULTS})
(${RESULTS} = 15,16
exten => _X.,1,Set(ALARM=)
exten => _X.,n,Set(STATE=ACTIVE)
exten => _X.,n,AGI([login to view URL],${STATE},${ALARM})
exten => _X.,n,Verbose(${RESULTS})
(${RESULTS} = 1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,18,19,20
Please include in your bid "I AM NOT A ROBOT"
Thanks, Bart
Project ID: #12333225
About the project
Awarded to:
I AM NOT A ROBOT I can do such script, but its not efficient to call like this way. The better way move part of the logic to agi completly.
9 freelancers are bidding on average $39 for this job
HI "I AM NOT A ROBOT" I'm an Asterisk expert as well PHP MYSQL developer, this is an easy task for me let me help you with your project Brad.
Dear sir, please contact me. We will discuss about your requirements. After I understand all your requirements I'll do it for you.
Hello, I'm Telecommunication Engineer with +5 years experience with Design and implementation of IP Telephony Solutions based on Free Software: SBC, IP PBX Systems, WebRTC, Voice Recording Systems, IVR Applications, More
Dear Client, Greeting of the day ahead !!! Thanks for providing us opportunity to place bid over the project and communicate with you. I am a serious bidder here and i have already worked on a similar project befor More
This is a simple action to get information about channels state in your asterisk voip system. We can develop this item for you in one day I AM NOT A ROBOT