Asterisk Phone Registration
I had tried a number of times to get a softphone working in Asterisk. Softphones are just software versions of VoIP phones. I was finally able to get kphone registered and working. Twinkle still isn't working for me.
The first problem I had was getting the phones to talk to Asterisk at all. I just wasn't seeing any output on the Asterisk console. If I set qualify=yes or to some positive number, I got the errors below. If this occurred, I had to stop Asterisk to start Twinkle. It was complaining about the port already being in use.
*CLI> Apr 11 14:10:50 WARNING: chan_sip.c:1066 __sip_xmit:
sip_xmit of 0x81ba740 (len 473) to 192.168.2.102:5060 returned -1: Bad
It turned out that either the softphones or Asterisk didn't like the fact that my machine didn't have a fully qualified domain name. Either it was that or it was because I was using an IP. The next problem I had was that the phone still refused to register. A little more research and I found out you have to set host=dynamic. I had it set to the IP or domain name. I'm still not sure what the problem is. Perhaps it was somehow trying to find an external IP.
My sip.conf that finally worked with kphone is below. You can also uncomment username and secret. Kphone will ask you for this information.
 ;username=555 ;authname=555 ;secret=pass type=friend nat=no host=dynamic ;reinvite=no ;canreinvite=no qualify=yes callerid="Todd" <555> ;disallow=all allow=gsm context=TAG