[asterisk-users] Issues with remote call setup

Vinod Parameswaran vinodp at infoscience.otago.ac.nz
Fri May 7 02:24:21 CDT 2010


Hello list,

I would like to seek your expert opinion on a setup I am trying as part of my research. I have not been able to successfully make a call so far.

In my setup, I use two laptops that are interconnected by means of a stand-alone IS1581 switch. Thus there is no LAN involved.
I have assigned static IPs to the two laptops, say 10.0.0.1 and 10.0.0.2. 
I have installed Asterisk 1.6.2.6 and Zoiper classic (free version)on 10.0.0.1.
On 10.0.0.2, I have installed Zoiper classic (free version). 

On 10.0.0.1, user1 has been configured on Zoiper. The domian for user1 has been set to 127.0.0.1. STUN has been disabled and SIP port is set to 5061.
On 10.0.0.2, user3 has been configured on Zoiper. The domain for user3 has been set to 10.0.0.1. In addition, use of outbound proxy has been enabled for user3, and the address of the outbound proxy has been set to 10.0.0.1. STUN has been disabled and SIP port is set to 5061.

As part of the asterisk configuration in 10.0.0.1, the following entries have been made in sip.conf:

[general]
context=default
udpbindaddr=0.0.0.0
bindport=5060
srvlookup=no
language=en
contactpermit=127.0.0.1/255.255.255.0
contactpermit=10.0.0.2/255.255.255.0
sipdebug=yes
allowsubscribe=no
localnet=10.0.0.1/255.255.255.0
localnet=10.0.0.2/255.255.255.0
nat=never
allowexternaldomains=no
domain=10.0.0.1
matchexterniplocally=yes
autodomain=yes
directmedia=yes
disallow=all
allow=gsm
allow=ulaw
allow=alaw

;entry for phones
[100]
type=friend
context=phones
host=dynamic

[102]
type=friend
context=phones
host=dynamic

;entry for users
[user1]
type=friend
context=on_this_system
secret=password
regcontext=on_this_system
regexten=100
usereqphone=no
host=dynamic
nat=no

[user3]
type=friend
context=on_that_system
secret=password
regcontext=on_that_system
regexten=102
usereqphone=no
host=dynamic
nat=no

And the following entries have been made in extensions.conf:

[general]
static=no
writeprotect=no
autofallthrough=no

[default]
[phones]
include=>internal
include=>remote

[internal]
exten => 100,1,Dial(SIP/user1, 25)
exten => 100,n,Playback(vm-isunavail.gsm)
exten => 100,n,Hangup()

[remote]
exten => 100,1,Dial(SIP/user3, 25)
exten => 100,n,Playback(vm-isunavail.gsm)
exten => 100,n,Hangup()

[on_this_system]
include=>internal

[on_that_system]
include=>remote

With the above configuration, I am able to successfully register both the users with the asterisk server running on 10.0.0.1.

However, when either user tries to call the other user's supposed extension, the call fails with the message "no route to destination" on Zoiper. But a loopback works successfully on both the laptops. Thus user1 can call itself, so can user3.

Upon examining the SIP message logs on Wireshark, I could see that when a user on one laptop (Zoiper) tries to call the user on the other or attempts a loopback (call itself) by means of an extesion, the INVITE message is sent to the AOR sip:<extension>@domain. 

Thus when user1 tries to call user3 by dialing extension 102 on Zoiper, an INVITE is constructed with the AOR sip:102 at 127.0.0.1. It would be useful to point out that 127.0.0.1 corresponds to 10.0.0.1, on which the asterisk server is running and with which user3 has been registered. This results in the asterisk server returning 404 Not Found response. In this case, I see the asterisk server is not able to map the dialed number to a registered user.

In contrast, when a user tries to call itself, the call is connected, becuase asterisk server is able to map the dialed number to the registered user, as evinced in the logs. For example, user3 can dial 102 and the call gets connected.

I have spent quite sometime debugging this without success. My inexperience is also a factor, as I am relatively new to Asterisk.

Based on the above information, I would really appreciate if the experts in the list could point to the root cause of the problem.

Thanks in advance.

best regards
Vin



More information about the asterisk-users mailing list