Apple iPhone /iPod Touch and SIP : SIPHON
Created by: marronnier,Last modification on Sat 25 of Oct, 2008 [10:27 UTC] by ayourk
Touchmods team has released a new thirdparty software for iPhone that enables SIP calls through WIFI.
The first release was only working on iPod Touch due to a microphone problem.
The new version is working quiet properly on both platforms but is linked to one SIP provider (Free.Fr). You need to have Free.fr DSL account.
To make this software work with my asterisk box, I have made a little trick.
1) install SIPHON on your iPhone / iPod via the installer or scp
2) Modify /etc/hosts on iPhone to bypass dns resolution for freephonie.net (Free.fr pbx) and link this entry to your pbx.
/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
212.217.156.112 freephonie.net (This is a fake IP!!!)
2) Preconfigure your sip account on the iPhone / iPod
/Applications/Siphone.app/accounts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>nat</key>
<string>yes</string>
<key>password</key>
<string>bar</string>
<key>server</key>
<string>freephonie.net</string>
<key>stundomain</key>
<string></string>
<key>stunserver</key>
<string></string>
<key>timeout</key>
<string>1800</string>
<key>username</key>
<string>foo</string>
</dict>
</plist>
3) Create the asterisk SIP account
[8003]
disallow=all
allow=ulaw
type=friend
username=foo
Secret=bar
callerid=Blah <7003>
host=dynamic
canreinvite=no
qualify=yes
context=internet
dtmf=inband
mailbox=7003
nat=yes
4) Call
Asterisk logs:
Connected to Asterisk 1.4.11-BRIstuffed-0.4.0-test4 currently running on ipbx (pid = 10895)
[Feb 8 09:29:30] NOTICE[10913]: chan_sip.c:12331 handle_response_peerpoke: Peer '8003' is now Reachable. (992ms / 2000ms)
ipbx*CLI> sip show peer 8003
* Name : 8003
Secret : <Set>
MD5Secret : <Not set>
Context : internet
Subscr.Cont. : <Not set>
Language : fr
AMA flags : Unknown
Transfer mode: open
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
Mailbox : 7003
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 0
Dynamic : Yes
Callerid : "blablabla SoftP" <7003>
MaxCallBR : 384 kbps
Expire : 1780
Insecure : no
Nat : Always
ACL : No
T38 pt UDPTL : No
CanReinvite : No
PromiscRedir : No
User=Phone : No
Video Support: No
Trust RPID : No
Send RPID : No
Subscriptions: Yes
Overlap dial : Yes
DTMFmode : auto
LastMsg : 0
ToHost :
Addr->IP : IP.IP.IP.IP Port 5060
Defaddr->IP : 0.0.0.0 Port 5060
Def. Username: 8003
SIP Options : (none)
Codecs : 0x4 (ulaw)
Codec Order : (ulaw:20)
Auto-Framing: No
Status : OK (992 ms)
Useragent :
Reg. Contact : sip:8003@freephonie.net
ipbx*CLI>
The first release was only working on iPod Touch due to a microphone problem.
The new version is working quiet properly on both platforms but is linked to one SIP provider (Free.Fr). You need to have Free.fr DSL account.
To make this software work with my asterisk box, I have made a little trick.
1) install SIPHON on your iPhone / iPod via the installer or scp
2) Modify /etc/hosts on iPhone to bypass dns resolution for freephonie.net (Free.fr pbx) and link this entry to your pbx.
/etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
212.217.156.112 freephonie.net (This is a fake IP!!!)
2) Preconfigure your sip account on the iPhone / iPod
/Applications/Siphone.app/accounts.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>nat</key>
<string>yes</string>
<key>password</key>
<string>bar</string>
<key>server</key>
<string>freephonie.net</string>
<key>stundomain</key>
<string></string>
<key>stunserver</key>
<string></string>
<key>timeout</key>
<string>1800</string>
<key>username</key>
<string>foo</string>
</dict>
</plist>
3) Create the asterisk SIP account
[8003]
disallow=all
allow=ulaw
type=friend
username=foo
Secret=bar
callerid=Blah <7003>
host=dynamic
canreinvite=no
qualify=yes
context=internet
dtmf=inband
mailbox=7003
nat=yes
4) Call
Asterisk logs:
Connected to Asterisk 1.4.11-BRIstuffed-0.4.0-test4 currently running on ipbx (pid = 10895)
[Feb 8 09:29:30] NOTICE[10913]: chan_sip.c:12331 handle_response_peerpoke: Peer '8003' is now Reachable. (992ms / 2000ms)
ipbx*CLI> sip show peer 8003
* Name : 8003
Secret : <Set>
MD5Secret : <Not set>
Context : internet
Subscr.Cont. : <Not set>
Language : fr
AMA flags : Unknown
Transfer mode: open
CallingPres : Presentation Allowed, Not Screened
Callgroup :
Pickupgroup :
Mailbox : 7003
VM Extension : asterisk
LastMsgsSent : 0/0
Call limit : 0
Dynamic : Yes
Callerid : "blablabla SoftP" <7003>
MaxCallBR : 384 kbps
Expire : 1780
Insecure : no
Nat : Always
ACL : No
T38 pt UDPTL : No
CanReinvite : No
PromiscRedir : No
User=Phone : No
Video Support: No
Trust RPID : No
Send RPID : No
Subscriptions: Yes
Overlap dial : Yes
DTMFmode : auto
LastMsg : 0
ToHost :
Addr->IP : IP.IP.IP.IP Port 5060
Defaddr->IP : 0.0.0.0 Port 5060
Def. Username: 8003
SIP Options : (none)
Codecs : 0x4 (ulaw)
Codec Order : (ulaw:20)
Auto-Framing: No
Status : OK (992 ms)
Useragent :
Reg. Contact : sip:8003@freephonie.net
ipbx*CLI>

Comments
333No sound at all or one way sound issue
For voipbuster you'll have to enter 'stun.voipbuster.org' in the stun settings in account.xml
333hosts+sip string
Do i have to change the sip Server string in the account.xml too? And the the new assotiation in the hosts File has to be an ip adress? Is a Domain also possible? (i dunno the ip of my sip provider...)
Regards, 00000
333I got the same problem ,everything is ok
thanks a lot
333Re: Don´t understand
I'm having the same problem: I can't hear anything in my iphone.
333Re: Don´t understand
Also there is a very big delay (around 500 ms)
333Re : Re: one way voice or no voice at all
/etc/hosts and /Applications/Siphon.app/account.xml are located on your iPhone. It has to be jailbroken for you can install sshd to modify them.
Changes have been done via vi but you can use any text editor.
Point 3 is dedicated to people using their own asterisk PBX. I you don't, you just need an SIP account on any SIP provider.
Point 4 is only logs on my asterisk box :-) you don't need to do anything with it.
333Re: one way voice or no voice at all
How exactly did you do perform the changes? I don't quite understand this guide.
333one way voice or no voice at all
does anyone here got the same scenario of mine?
one way voice or no voice at all
after all the required changes were done...
Weizzz
333Don´t understand
I don't quite understand this guide. On point 3, should I write this information into the Siphone.app/account.xml? Or how do I create the asterisk SIP account?