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.




4570 posts

Uber Geek

Trusted

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

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
7058 posts

Uber Geek

Trusted
Subscriber

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

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

 

Cyril




4570 posts

Uber Geek

Trusted

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

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


 
 
 
 


219 posts

Master Geek


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

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'




4570 posts

Uber Geek

Trusted

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

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


219 posts

Master Geek


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

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

 

 




4570 posts

Uber Geek

Trusted

  # 2314047 10-Sep-2019 10:14
Send private message quote this post

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


4244 posts

Uber Geek


  # 2314068 10-Sep-2019 10:27
Send private message quote this post

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


 
 
 
 




4570 posts

Uber Geek

Trusted

  # 2314069 10-Sep-2019 10:28
Send private message quote this post

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 »

Chorus to launch Hyperfibre service
Posted 18-Nov-2019 15:00


Microsoft launches first Experience Center worldwide for Asia Pacific in Singapore
Posted 13-Nov-2019 13:08


Disney+ comes to LG Smart TVs
Posted 13-Nov-2019 12:55


Spark launches new wireless broadband "Unplan Metro"
Posted 11-Nov-2019 08:19


Malwarebytes overhauls flagship product with new UI, faster engine and lighter footprint
Posted 6-Nov-2019 11:48


CarbonClick launches into Digital Marketplaces
Posted 6-Nov-2019 11:42


Kordia offers Microsoft Azure Peering Service
Posted 6-Nov-2019 11:41


Spark 5G live on Auckland Harbour for Emirates Team New Zealand
Posted 4-Nov-2019 17:30


BNZ and Vodafone partner to boost NZ Tech for SME
Posted 31-Oct-2019 17:14


Nokia 7.2 available in New Zealand
Posted 31-Oct-2019 16:24


2talk launches Microsoft Teams Direct Routing product
Posted 29-Oct-2019 10:35


New Breast Cancer Foundation app puts power in Kiwi women's hands
Posted 25-Oct-2019 16:13


OPPO Reno2 Series lands, alongside hybrid noise-cancelling Wireless Headphones
Posted 24-Oct-2019 15:32


Waikato Data Scientists awarded $13 million from the Government
Posted 24-Oct-2019 15:27


D-Link launches Wave 2 Unified Access Points
Posted 24-Oct-2019 15:07



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.