Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.




4671 posts

Uber Geek

Trusted

# 255931 7-Sep-2019 09:04
Send private message

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

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


Create new topic
7199 posts

Uber Geek

Trusted
Subscriber

  # 2312098 7-Sep-2019 09:29
Send private message

Hi, not too sure but can you ssh into it and run a bash script and sweep that?

 

Cyril




4671 posts

Uber Geek

Trusted

  # 2312119 7-Sep-2019 09:58
Send private message

cyril7:

Hi, not too sure but can you ssh into it and run a bash script and sweep that?


Cyril



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?




Previously known as psycik

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


 
 
 
 


221 posts

Master Geek


  # 2312121 7-Sep-2019 10:02
Send private message

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'




4671 posts

Uber Geek

Trusted

  # 2312125 7-Sep-2019 10:18
Send private message

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

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


221 posts

Master Geek


  # 2312140 7-Sep-2019 10:41
Send private message

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

 

 




4671 posts

Uber Geek

Trusted

  # 2314047 10-Sep-2019 10:14
Send private message

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

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


4324 posts

Uber Geek


  # 2314068 10-Sep-2019 10:27
Send private message

Late to the party... but yea Asterisk Manager will give the status you want.


 
 
 
 




4671 posts

Uber Geek

Trusted

  # 2314069 10-Sep-2019 10:28
Send private message

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

OpenHAB: Gigabyte AMD A8 BrixOpenHAB with Aeotech ZWave Controller, Raspberry PI, Wemos D1 Mini, Zwave, Xiaomi Humidity and Temperature sensors and Bluetooth LE Sensors
Media:Chromecast v2, ATV4, Roku3, HDHomeRun Dual
Windows 10
Host (Plex Server/Crashplan): 2x2TB, 2x3TB, 1x4TB using DriveBender, Samsung 850 evo 512 GB SSD, Hyper-V Server with 1xW10, 1xW2k8, 2xUbuntu 16.04 LTS, Crashplan, NextPVR channel for Plex,NextPVR Metadata Agent and Scanner for Plex


Create new topic



Twitter and LinkedIn »



Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:





News »

Netflix releases 21 Studio Ghibli works
Posted 22-Jan-2020 11:42


Vodafone integrates eSIM into device and wearable roadmap
Posted 17-Jan-2020 09:45


Do you need this camera app? Group investigates privacy implications
Posted 16-Jan-2020 03:30


JBL launches headphones range designed for gaming
Posted 13-Jan-2020 09:59


Withings introduces ScanWatch wearable combining ECG and sleep apnea detection
Posted 9-Jan-2020 18:34


NZ Police releases public app
Posted 8-Jan-2020 11:43


Suunto 7 combine sports and smart features on new smartwatch generation
Posted 7-Jan-2020 16:06


Intel brings innovation with technology spanning the cloud, network, edge and PC
Posted 7-Jan-2020 15:54


AMD announces high performance desktop and ultrathin laptop processors
Posted 7-Jan-2020 15:42


AMD unveils four new desktop and mobile GPUs including AMD Radeon RX 5600
Posted 7-Jan-2020 15:32


Consolidation in video streaming market with Spark selling Lightbox to Sky
Posted 19-Dec-2019 09:09


Intel introduces cryogenic control chip to enable quantum computers
Posted 10-Dec-2019 21:32


Vodafone 5G service live in four cities
Posted 10-Dec-2019 08:30


Samsung Galaxy Fold now available in New Zealand
Posted 6-Dec-2019 00:01


NZ company oDocs awarded US$ 100,000 Dubai World Expo grant
Posted 5-Dec-2019 16:00



Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.


Support Geekzone »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.

Alternatively, you can receive a daily email with Geekzone updates.