Anyone know of a way of getting the sip status from one of these devices (in an automated way), some curl command I could go periodically to get my sip status (from say openhab which can just do a http call)
Anyone know of a way of getting the sip status from one of these devices (in an automated way), some curl command I could go periodically to get my sip status (from say openhab which can just do a http call)
Previously known as psycik
Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight
|
|
Hi, not too sure but can you ssh into it and run a bash script and sweep that?
Cyril
cyril7:Hi, not too sure but can you ssh into it and run a bash script and sweep that?
Cyril
Previously known as psycik
Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight
davidcole: Yes I can ssh to it (could set up key based). But any ideas what I’d look at for a status? A command. Or do you mean just scan the main log file?
I think they run Asterisk under the hood, so try this:
asterisk -rx 'sip show registry'
Hmm yes.
real ILBC_Frame_Size:240
Setting max files open to 2048
Host dnsmgr Username Refresh State Reg.Time
sip.2talk.co.nz:5060 N 12345567@si 105 Registered Sat, 07 Sep 2019 10:14:43
1 SIP registrations.
Does that mean there's an asterisk api underneath?
I see the following open ports:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:www 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:ssh 0.0.0.0:* LISTEN
netstat: /proc/net/tcp6: No such file or directory
udp 0 0 0.0.0.0:bootpc 0.0.0.0:*
udp 0 0 0.0.0.0:47944 0.0.0.0:*
udp 0 0 TA100.local:ntp 0.0.0.0:*
udp 0 0 TA100.com:ntp 0.0.0.0:*
udp 0 0 0.0.0.0:ntp 0.0.0.0:*
udp 0 0 0.0.0.0:sip 0.0.0.0:*
udp 0 0 0.0.0.0:5108 0.0.0.0:*
Previously known as psycik
Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight
davidcole:
Hmm yes.
<SNIP>
Does that mean there's an asterisk api underneath?
No idea sorry. I'm not aware of any api.
If you really need to use http, could you maybe scrape the information from the Yeastar's own webUI (eg using curl or wget on your OpenHab host)?
So using python, and a python library asterisk-ami, you can get the status.
And I've even added an mqtt publish do it, so I can get the status in openhab.
I'm actually thinking about making it run longer...and process incoming calls.
Previously known as psycik
Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight
Late to the party... but yea Asterisk Manager will give the status you want.
chevrolux:
Late to the party... but yea Asterisk Manager will give the status you want.
Is that software? or do you mean the asterisk manager ami call?
Previously known as psycik
Home Assistant: Gigabyte AMD A8 Brix, Home Assistant with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Shelly Humidity and Temperature sensors
Media:Chromecast v2, ATV4 4k, ATV4, HDHomeRun Dual
Server Host Plex Server 3x3TB, 4x4TB using MergerFS, Samsung 850 evo 512 GB SSD, Proxmox Server with 1xW10, 2xUbuntu 22.04 LTS, Backblaze Backups, usenetprime.com fastmail.com Sharesies Trakt.TV Sharesight
|
|