Asterisk 1.0.9 with 2 PCs linked with a UTP crossover cable


#1

I’m trying to use Asterisk, but I’ve some problem making experiments with 2 computers: in the first I’ve installed xten-xlite softphone as a client and the IP is 10.0.0.2. In the second I’ve installed Asterisk 1.0.9 (the lastest stable version) as a server, and xten-xlite as a clinet. The second PC has IP 10.0.0.1. These two PCs are linked with a UTP crossover cable. My configuration is like in this schema:

[xten-xlite (Ip:10.0.0.2)]------------------[xten-xlite & asterisk (Ip:10.0.0.1)]

Pc with IP 10.0.0.2 has the configuration of xten-xlite > menu > System Setting > Sip Proxy > [Default]: 10.0.0.2:
Enabled: Yes
Display Name: 1234
Username: softphone2
Authorization User: softphone2
password: pwd_soft2
Domain/Realm: 10.0.0.2
Sip proxy: 10.0.0.1
Out Bound Proxy: 10.0.0.1
Use Outbound Proxy: Default
Register: Default

Pc with IP 10.0.0.1 has the configuration of xten-xlite > menu > System Setting > Sip Proxy > [Default]: 127.0.0.1:
Enabled: Yes
Display Name: 4321
Username: softphone1
Authorization User: softphone1
password: pwd_soft1
Domain/Realm: localhost
Sip proxy: localhost
Out Bound Proxy: localhost
Use Outbound Proxy: Default
Register: Default

and I’ve read some howto’s and I’m adopting the following configuration
file /etc/asterisk/sip.config

=================== file /etc/asterisk/sip.conf starts hereunder
[softphone1]
type=friend
username=softphone1
secret=pwd_soft1
host=dynamic
context=tutorial
[softphone2]
type=friend
username=softphone2
secret=pwd_soft2
host=dynamic
context=tutorial
=================== file /etc/asterisk/sip.conf ends above

and in /etc/asterisk/extensions.config

=========== file /etc/asterisk/extensions.conf starts hereunder
[softphone1_iax]
type=friend
username=softphone1_iax
secret=softphone1
host=dynamic
context=tutorial
[softphone2_iax]
type=friend
username=softphone2_iax
secret=softphone2
host=dynamic
context=tutorial
=========== file /etc/asterisk/extensions.conf ends above

According to some tutorial, I added the following file
/etc/asterisk/iax.config

=========== file /etc/asterisk/iax.conf starts hereunder
extern => 1234,1,Dial(SIP/softphone1)
extern => 4321,1,Dial(SIP/softphone2)
extern => 1111,1,Dial(IAX2/softphone1_iax@softphone1_iax)
extern => 2222,1,Dial(IAX2/softphone2_iax@softphone2_iax)
=========== file /etc/asterisk/iax.config ends above

Is it important this file?
Launcing asterisk with the command “asterisk -c” and then both the softphones, I see an error on the two displays, of this kind (I only give you the one for softphone1:

==================== xten-xlite softphone output starts hereunder
Login failed! Contact Network Adm
Your number is: softphone1
Call Timer: 0:00:00
==================== xten-xlite softphone output ends above

The Asterisk server, instead, reports these errors:

================================= Asterisk output starts hereunder
[ Booting…Nov 7 16:46:52 WARNING[2296]:
chan_skinny.c:2587 reload_config: Unable to get our IP address, Skinny
disabled
.Nov 7 16:46:52 WARNING[2296]: chan_oss.c:458 soundcard_init: Unable to
open /dev/dsp: No such device
…Nov 7 16:46:52 WARNING[2296]: pbx.c:2982 ast_context_create: Tried to
register context ‘default’, already in use

]
Asterisk Ready.
*CLI> Nov 7 16:47:19 NOTICE[2301]: res_musiconhold.c:309 monmp3thread:
Request to schedule in the past?!?!
Nov 7 16:47:25 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘1234 sip:arnaldo@10.0.0.2’ failed for '10.0.0.2’
Nov 7 16:47:27 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:47:27 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘4321 sip:softphone1@localhost’ failed for '127.0.0.1’
Nov 7 16:47:45 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘1234 sip:arnaldo@10.0.0.2’ failed for '10.0.0.2’
Nov 7 16:47:47 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:47:47 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘4321 sip:softphone1@localhost’ failed for '127.0.0.1’
Nov 7 16:48:25 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘1234 sip:arnaldo@10.0.0.2’ failed for '10.0.0.2’
Nov 7 16:48:25 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:48:27 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:48:27 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘4321 sip:softphone1@localhost’ failed for '127.0.0.1’
Nov 7 16:48:38 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:48:44 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:48:58 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:49:13 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:49:19 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:49:25 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘1234 sip:arnaldo@10.0.0.2’ failed for '10.0.0.2’
Nov 7 16:49:27 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:49:27 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘4321 sip:softphone1@localhost’ failed for '127.0.0.1’
Nov 7 16:50:25 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘1234 sip:arnaldo@10.0.0.2’ failed for '10.0.0.2’
Nov 7 16:50:27 WARNING[2304]: acl.c:371 ast_ouraddrfor: Yikes! No
default route?!!
Nov 7 16:50:27 NOTICE[2304]: chan_sip.c:7733 handle_request: Registration
from ‘4321 sip:softphone1@localhost’ failed for ‘127.0.0.1’
================================= Asterisk output ends above

I would like to ask you if there is some error in my configuration files? Is it possible to have such a connection (one PC with both an Asterisk server and a xten-xlite client and the second with a xten-xlite client) or am I trying to realize an impossible architecture?
Finally, how should I configure the xten-xlite softphones themselves.

Thank you very much for your help.


#2

You’ve posted so much stuff there i haven’t got time to read it all. But two things occur to me:

  1. For heaven’s sake configure a default route! :wink:

  2. You’re going to run into problems having a softphone and Asterisk running on the same machine. This is because they will both try to listen on the same port - and they can’t! It can be done, but i don’t know if you can do it with the Xlite, as i don’t know anything about it. You will probably have to configure Asterisk to listen on a different port to the standard port - and then configure the phone to connect to that port. Or, possibly, vice versa.