
SIP-Pi: SIP Answering Machine on Raspberry Pi - rendx
https://github.com/fabianhu/SIP-Pi
======
pjc50
SIP is an interesting technology; very much replicates the traditional phone
architecture of separated control/data planes, call setup and so on. But
there's so many _pieces_ to it that it ends up rather inaccessible to people
looking to get started with it.

~~~
abalashov
I don't know that it can be said to replicate traditional phone architecture
at all, for two reasons:

1) Unlike H.323 and friends, SIP is the product of rather purely Internet-
orientated/IETF thinking, not ITU. It was initially designed to set up
multimedia "sessions" of various kinds (few prescriptions as to what kind)
over the Internet in a rather generic sense.

Aspects of "traditional phone architecture" have been painstakingly grafted
onto SIP, with mixed results. Certain things that have been taken for granted
for decades are extraordinarily complex to do with SIP, such as bridged/shared
line appearances on office PBX systems, because ...

2) ... SIP decentralises a lot of intelligence and state, taking it out of the
phone switch (or PBX) and putting it in the endpoint/handset itself.

A traditional PBX system or Class 5 subscriber switch is very all-knowing, in
the way that SCCP-based Call Manager is all-knowing. SIP puts a lot more
responsibility on the endpoints, leading to distributed systems challenges.

~~~
joshaidan
Shared line appearance is a big feature missing from SIP based systems that I
find frustrates a lot of users, particularly medical clinics. Nurses are used
to the putting a call on hold on line 1, then telling the doctor or whoever to
answer the call on line 1.

~~~
disiplus
with shared line appearance and aors this is possible. [https://www.rfc-
editor.org/info/rfc7463](https://www.rfc-editor.org/info/rfc7463)

~~~
joshaidan
Interesting! Are there any implementations of this?

------
josh_carterPDX
Why have a SIP answering machine when you can create a SIP Server using
Raspberry Pi?
[https://myvoipapp.com/docs/mss_services/raspberry_pi/index.h...](https://myvoipapp.com/docs/mss_services/raspberry_pi/index.html)

Just a question, not trying to degrade what you've done here which is really
cool by the way.

~~~
joshaidan
I implemented a very simple SIP and RTP stack using Ruby. At first it ran
terribly, but with some tweaking, and I think running a newer version of Ruby,
I got it so that the sound quality was very legible. Not perfect, but good
enough. Ruby certainly isn't the best language for it, but it was a good
learning experiencing in understanding how the protocol works. For example, I
quickly learned what the "tag" parameter does.

~~~
josh_carterPDX
What audio codec were you using?

~~~
joshaidan
Just PCM g711u, and I sent the audio/RTP packets to a phone plugged into an
ATA.

~~~
josh_carterPDX
Interesting. Sounds like you were going for quality over bandwidth efficiency.
Maybe a feature request, but it'd be awesome to be able to chose G.711 or
G.729 based on bandwidth requirements. :)

------
finnn
So this actually has nothing to do with the Raspberry Pi platform, and is just
a SIP tool that should work on just about any Linux machine.

~~~
ptero
This demonstrates a setup that runs easily on rpi -- not a huge surprise as
rpi is pretty powerful nowadays, but still a useful data point.

~~~
joshaidan
I run RasPBX (Asterisk + FreePBX) on my Raspberry Pi and it works quite well.
The distro itself is also pretty easy to manage and update. I mainly use it to
record my phone calls and works well for that purpose.

See [http://www.raspberry-asterisk.org/](http://www.raspberry-asterisk.org/)

------
emsy
Reminds me of DoorPI, which uses SIP software to build a programmable Doorbell
that calls to your phone:
[https://github.com/motom001/DoorPi](https://github.com/motom001/DoorPi)

