I have a stationary ip phone, and a router for ubuntu-server distributing Internet. The problem is that the phone gives its local un (192.168.0.6) sip to the server, and therefore it will not be possible to get through the phone. Port forwarding here will not help either.
The first thing that came to mind was to start an Asterisk PBX (software PBX), but this solution seems redundant for a home with one phone, one SIP provider and no FXO interface. Quite by chance I found a small utility that implements just what you need:
siproxd . This program is in the debian repository and ubunt.
Configuring siproxd.conf:
# Interface on which sip phones and clients hang (yes, siproxd can proxy many clients)
if_inbound = eth0
# Interface to which the Internet is connected (it is important that the interface has a real ip address,
# because It will be calls to him). In my case, this is the PPPoE interface, to which
# server is connected via adsl
if_outbound = ppp0
# Subnets from which sip clients can connect (comma-separated, no spaces)
hosts_allow_reg = 192.168.0.0/24
# Subnets from which SIP traffic is allowed, i.e. calling to the phone.
#hosts_allow_sip = 123.45.0.0/16,123.46.0.0/16
# Subnets from which SIP traffic is prohibited.
#hosts_deny_sip = 10.0.0.0/8,11.0.0.0/8
The remaining options do not need to change. You can also set up speed dialing:
')
# Turn on the necessary plugin
pi_shortdial_enable = 1
# Set the interval for speed dial numbers (* 00 - from * 01 to * 99)
pi_shortdial_akey = * 00
#number for recording is selected in the order of addition in the configuration file.
# i.e. for the interval from * 01 to * 99 the first record will be * 01,
pi_shortdial_entry = 11111@test.com
# and the second * 02
pi_shortdial_entry = 22222@test.com
What does the setup look like on a Cisco 7912g phone (settings for other phones will most likely be similar)
- OutBoundProxy: server address with siproxd
- Proxy: provider sip address
- UID: Your UID at sip provider
- PWD: Your password
If you write the address of the server with siproxd in Proxy, you can call between the phones connected to this server. Pretty handy thing.
What are the advantages of this approach:
- No need to run and configure a full PBX
- Pretty easy to set up
- The proxy supports authorization, respectively, you can make a small proxy server within the organization with the possibility of calls between phones to a short number.
- You can use hardware sip phones for NAT (software basically works fine anyway, thanks to STUN and other technologies)
cross post from my
blog