(old notes, might be outdated)

SIP and NAT

On the phone (n900 maemo):

  • username: foo@home.example.org (where example.org is my domain at home)
  • use whatever option for keep-alive
  • use “discover public IP”

On the Asterisk server, sip.conf :

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
[general]
 ...
externhost=home.example.org
localnet=192.168.1.0/255.255.255.0

[foo]
type=friend
username=foo
secret=mypassword
regexten=1234
callerid=("John Doe" <1234>)
qualify=yes ; force keep-alives
host=dynamic
nat6=yes
canreinvite=no ; do not allow bridging of connections
disallow=all
allow=ulaw
allow=gsm

On the firewall:

  • allow incoming traffic on port 5060 (SIP) as well as 10000 to 20000 (RTP).

If you can connect the call, but you do not have audio, it is likely an RTP issue.

Debugging:

  • sip set debug on
  • rtp set debug on

Codecs

Codec Bit rate Description
G.711 64 kbps 1970s POTS standard, including u-law (North America + Japan) and a-law (Europe)
G.729 8 kbps similar to G.711, slightly lower quality, uses less bandwidth, but requires more CPU to compress, so some phones cannot support more than one call at the time
G.722 48/56/64Kbps HD Audio, more recent

Reference: voip-info.org: Asterisk codecs