Getting Gnophone to work

Gnophone (http://www.gnophone.com) is a linux based soft phone. If you run linux it is one of the best ways to play with Asterisk.

Some important starting points

  • Gnophone is a IAX client, not a sip client. Please do not waste your time changing the port to 5060 and fighting sip!
  • Gnophone behaves more like an Asterisk server than a sip phone. Keep this in mind when you are trying to figure out the lingo.
  • There are help files for gnophone, but the rpms as installed on RH9 do not pull them up.
  • Gnophone does work and is worth slogging your way through.
  • You should try to connect to IAXtel first to test your microphone and speakers. There are some automated number on there for testing.





Configuration with Asterisk:

iax.conf

[gnophone] ;This is the name of the user, and the reference in extensions.conf.
type=friend ;Asterisk send calls to a "peer", receives calls from a "user", and does both with a "friend".
secret=gnophonesecret ;The is the secret in gnophone.
auth=plaintext ;Asterisk to Asterisk can use "md5" and "rsa", I do not if gnophone can.
host=dynamic ;This allows the host to come from different IPs. It must also register before calls can be answered.
context=sip ;What "context" to jump to in the extensions.conf file. I use "sip" for sip phones.
; Can be several context separated by commas.
mailbox=101 ;Which mailbox to use.
callerid="Zot" <503-111-1111> ;Caller ID to show when the call is incoming from gnophone
permit=0.0.0.0/0.0.0.0 ;Which IP's can be incoming.


In gnophone, click on Prefences->Telephone, enter the following;

Server: asterisk.domain.com (The address of the asterisk box)
Port: 5036 (Leave this alone.)
Context: sip (the context you want gnophone to jump into in extensions.conf, must be in context in iax.conf)
Username: gnophone (Same as [username] from iax.conf)
password: password (This is used to call you from astreisk)
Peer: gnophone (This is the same as username, remember we connect to a peer!)
Secret: gnophonesecret (from iax.conf, secret)

~/.gnophone/telco.cfg Is your config file. It shoud look like this:

  1. Automatically generated by gnophone
mode=2
iaxserver=asterisk.domain.com
iaxcontext=sip
iaxusername=gnophone
iaxpassword=password
iaxpeer=gnophone
iaxsecret=gnophonesecret
iaxprefix=
iaxport=5036
nbrcomplete=611
nbrcomplete=411
nbrcomplete=0-NXX-NXX-XXXX
nbrcomplete=1-NXX-NXX-XXXX
nbrcomplete=NXX-XXXX


Now we can call from Gnophone to asterisk. If we have an extension in extensions.conf:

[sip]
exten => 1,1,Answer
exten => 1,2,Playback(tt-monkeys)

Then when you call extension 1 (just hit 1 on the keypad and then click call), it will answer and then scream monkeys at you.

More useful:
[sip]
exten => 1,1,Answer
exten => 1,2,Playback(tt-monkeys)
exten => 2,1,Wait(2) ; Call 2 to Record new Sound Files
exten => 2,2,Playback(vm-intro)
exten => 2,3,Record(/tmp/asterisk-recording:gsm|2)
exten => 2,4,Wait(2)
exten => 2,5,Playback(/tmp/asterisk-recording)
exten => 2,6,Playback(vm-msgsaved)
exten => 2,7,wait(2)
exten => 2,8,Hangup

Now dial extension 2, and it will record your voice and play it back to you.

Great we can dial from gnophone, but how do we dial to gnophone? We need an extension:

exten => 3,1,Dial(IAX/gnophone,30,tr)
exten => 3,2,Playback(vm-isonphone)
exten => 3,102,Playback(vm-isunavail)

The 3,2 extension will play back messages if you press hangup on gnophone. I would have expected to use IAX/gnophone:password, but perhaps since I am registered I do not need it.

The 3,102 extension will play back messages if the extension cannot be found, or you do not answer.

Now get two computers, and call each other!

Please edit this page as I am sure it has errors, that is what Wiki's are all about!




Gnophone (http://www.gnophone.com) is a linux based soft phone. If you run linux it is one of the best ways to play with Asterisk.

Some important starting points

  • Gnophone is a IAX client, not a sip client. Please do not waste your time changing the port to 5060 and fighting sip!
  • Gnophone behaves more like an Asterisk server than a sip phone. Keep this in mind when you are trying to figure out the lingo.
  • There are help files for gnophone, but the rpms as installed on RH9 do not pull them up.
  • Gnophone does work and is worth slogging your way through.
  • You should try to connect to IAXtel first to test your microphone and speakers. There are some automated number on there for testing.





Configuration with Asterisk:

iax.conf

[gnophone] ;This is the name of the user, and the reference in extensions.conf.
type=friend ;Asterisk send calls to a "peer", receives calls from a "user", and does both with a "friend".
secret=gnophonesecret ;The is the secret in gnophone.
auth=plaintext ;Asterisk to Asterisk can use "md5" and "rsa", I do not if gnophone can.
host=dynamic ;This allows the host to come from different IPs. It must also register before calls can be answered.
context=sip ;What "context" to jump to in the extensions.conf file. I use "sip" for sip phones.
; Can be several context separated by commas.
mailbox=101 ;Which mailbox to use.
callerid="Zot" <503-111-1111> ;Caller ID to show when the call is incoming from gnophone
permit=0.0.0.0/0.0.0.0 ;Which IP's can be incoming.


In gnophone, click on Prefences->Telephone, enter the following;

Server: asterisk.domain.com (The address of the asterisk box)
Port: 5036 (Leave this alone.)
Context: sip (the context you want gnophone to jump into in extensions.conf, must be in context in iax.conf)
Username: gnophone (Same as [username] from iax.conf)
password: password (This is used to call you from astreisk)
Peer: gnophone (This is the same as username, remember we connect to a peer!)
Secret: gnophonesecret (from iax.conf, secret)

~/.gnophone/telco.cfg Is your config file. It shoud look like this:

  1. Automatically generated by gnophone
mode=2
iaxserver=asterisk.domain.com
iaxcontext=sip
iaxusername=gnophone
iaxpassword=password
iaxpeer=gnophone
iaxsecret=gnophonesecret
iaxprefix=
iaxport=5036
nbrcomplete=611
nbrcomplete=411
nbrcomplete=0-NXX-NXX-XXXX
nbrcomplete=1-NXX-NXX-XXXX
nbrcomplete=NXX-XXXX


Now we can call from Gnophone to asterisk. If we have an extension in extensions.conf:

[sip]
exten => 1,1,Answer
exten => 1,2,Playback(tt-monkeys)

Then when you call extension 1 (just hit 1 on the keypad and then click call), it will answer and then scream monkeys at you.

More useful:
[sip]
exten => 1,1,Answer
exten => 1,2,Playback(tt-monkeys)
exten => 2,1,Wait(2) ; Call 2 to Record new Sound Files
exten => 2,2,Playback(vm-intro)
exten => 2,3,Record(/tmp/asterisk-recording:gsm|2)
exten => 2,4,Wait(2)
exten => 2,5,Playback(/tmp/asterisk-recording)
exten => 2,6,Playback(vm-msgsaved)
exten => 2,7,wait(2)
exten => 2,8,Hangup

Now dial extension 2, and it will record your voice and play it back to you.

Great we can dial from gnophone, but how do we dial to gnophone? We need an extension:

exten => 3,1,Dial(IAX/gnophone,30,tr)
exten => 3,2,Playback(vm-isonphone)
exten => 3,102,Playback(vm-isunavail)

The 3,2 extension will play back messages if you press hangup on gnophone. I would have expected to use IAX/gnophone:password, but perhaps since I am registered I do not need it.

The 3,102 extension will play back messages if the extension cannot be found, or you do not answer.

Now get two computers, and call each other!

Please edit this page as I am sure it has errors, that is what Wiki's are all about!




Created by: zot, Last modification: Sun 08 of Feb, 2004 (19:42 UTC) by flavour
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+