Pipeast [was: How To Repeat Pri Show Span And Zap Show Channel Commands]

Home » Asterisk Users » Pipeast [was: How To Repeat Pri Show Span And Zap Show Channel Commands]
Asterisk Users 1 Comment

Hi,

Long ago, [snip]

It has lately come to my attention that this method is broken (and has been, for quite some time. Sure enough. It does not use any published inteerface) and that there is actually some demand for using it.

A version of pipeast that seems to work now is:

#!/bin/sh while read line; do
echo “$line” | tr ‘\n’ ‘\0’
sleep 0.001
done | nc -U /var/run/asterisk/asterisk.ctl

Notes:
1. nc, or at least openbsd-netcat, can use unix domain sockets (-U).
No need for socat.

2. that /var/run is slowly converting to /run , though the
compatibility link /var/run will likely stay for quite some time.

3. If this script breaks in the future, you get to keep both pieces.
But this is only guaranteed if it breaks to exactly two pieces.

One thought on - Pipeast [was: How To Repeat Pri Show Span And Zap Show Channel Commands]