X-lite can not make PC-to-PC call

Hi All,
I am a newbie in Asterisk + X-lite.
I have installed Asterisk an X-lite on 2 windows computers. This is my sip.conf

[general]
context=default
srvlookup=yes

[tom]
type=friend
secret=tom
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=default ; the internal context controls what we can do

[david]
type=friend
secret=david
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=default ; the internal context controls what we can do

On clients, I believe I can configure to register

*CLI> – Unregistered SIP ‘tom’
– Registered SIP ‘tom’ at 192.0.7.247 port 15034 expires 3600
– Unregistered SIP ‘david’
– Registered SIP ‘david’ at 192.0.7.47 port 25360 expires 3600

But I can not call david from 192.0.7.247 or as this message appeared:

Call failed: Not found

On the speaker, I heard this saying: " The person you are calling is unavailable, please try again"

My Dial plan as default is: #1\a\a.T;match=1;prestrip=2;

Anybody know, please tell me the reason

Any one who has experience about this, pls give me a hand!
Best regards

Dear All,
I got this message from asterisk console

=============
*CLI>
– Registered SIP ‘5555’ at 192.0.7.247 port 64352 expires 3600
– Registered SIP ‘6666’ at 192.0.7.47 port 57016 expires 3600

*CLI> sip show registry
Host Username Refresh State
*CLI>

Does it mean I still have not registered successfully?
This is my sip.conf

==========
[general]
context=default
srvlookup=yes

[5555]
type=friend
secret=5555
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=default ; the internal context controls what we can do

[6666]
type=friend
secret=6666
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=default ; the internal context controls what we can do

All helps are warmly welcomed!
Best regards

sip show peers
will show You registered phones
Post Your extensions.conf [default] context

-FD

Thank you for your quick reply!!

[color=blue][quote=“fdragowski”]> sip show peers
will show You registered phones
Post Your extensions.conf [default] context[/color]

*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
usr3/test (Unspecified) D N 0 Unmonitored
6666/6666 192.0.7.47 D 3270 Unmonitored
5555/5555 192.0.7.247 D 12852 Unmonitored
3 sip peers [3 online , 0 offline]
*CLI>

My extensions.conf [default] is here

[default]
;
; By default we include the demo. In a production system, you
; probably don’t want to have the demo there.
;
include => demo

My sip.conf is here

[general]
context=default
srvlookup=yes

[5555]
type=friend
username=5555
secret=5555
callerid=David<5555>
host=dynamic
allow=all
;context=from-internal

[6666]
type=friend
username=6666
secret=6666
callerid=Tom<6666>
host=dynamic
allow=all
;context=from-internal

[color=blue]-FD[/quote][/color]

Um. What is the demo configuration?

Try this: in extensions.conf

[5555]
exten => 6666,1,Answer
exten => 6666,2,Dial(SIP/6666)
exten => 6666,3,Hangup

[6666]
exten => 5555,1,Answer
exten => 5555,2,Dial(SIP/5555)
exten => 5555,3,Hangup

Be sure to change the contexts in sip.conf so that 5555 is in context 5555 and 6666 is in context 6666

Or, if you want to leave them in default, just put those exten lines (without the [5555] or [6666] lines) in the [default] context.

Hope this helps. :smile:

Undrhil

[quote=“Undrhil”]Um. What is the demo configuration?

Try this: in extensions.conf

[5555]
exten => 6666,1,Answer
exten => 6666,2,Dial(SIP/6666)
exten => 6666,3,Hangup

[6666]
exten => 5555,1,Answer
exten => 5555,2,Dial(SIP/5555)
exten => 5555,3,Hangup

Be sure to change the contexts in sip.conf so that 5555 is in context 5555 and 6666 is in context 6666

Or, if you want to leave them in default, just put those exten lines (without the [5555] or [6666] lines) in the [default] context.

Hope this helps. :smile:

Undrhil[/quote]

Dear Undrhill,
I have tried put

[5555]
exten => 6666,1,Answer
exten => 6666,2,Dial(SIP/6666)
exten => 6666,3,Hangup

[6666]
exten => 5555,1,Answer
exten => 5555,2,Dial(SIP/5555)
exten => 5555,3,Hangup

into extensions.conf but still got the same message: "The person you are calling is unavailable, pls try again.

When I tried to have a blank extensions.conf, then add the above lines into it, I have this message at console

*CLI>
– Registered SIP ‘5555’ at 192.0.7.247 port 34886 expires 3600
Jun 9 15:28:49 NOTICE[7023]: pbx.c:1741 pbx_extension_helper: Cannot find extension context ‘default’

and the result when I make a call from 5555 to 6666 just the same.
May you please provide example of workable conf files for sip.conf, extensions.conf… I need to try a workable files first :smile:

Best regards,
Tom

Try this

in sip conf:
[5555]

context=default
qualify=yes

[6666]

context=default
qualify=yes

in extensions.conf

[default]

exten => 5555,1,Dial(SIP/55555)
exten => 5555,2,hangup
exten => 6666,1,Dial(SIP/6666)
exten => 6666,2,hangup

asterisk -rx “reload”

try to dial 5555 from phone 6666 and 6666 from 5555
if this still doesn’t work post here result of CLI>
sip show peers
and
show dialplan default

-FD

[quote=“fdragowski”]Try this
in sip conf:
[5555]

context=default
qualify=yes

in extensions.conf
[default]

exten => 5555,1,Dial(SIP/55555)
exten => 5555,2,hangup
exten => 6666,1,Dial(SIP/6666)
exten => 6666,2,hangup

-FD[/quote]

Dear Fdragowski,
Thank you very much, it can work now.
Is the problem come from dialplan? I will investigate it!
Yes, the forum is very useful. And I highly appreciate help from Undrhil and Fdragowski. In the future, if I have problems, pls give me a hand.
Best regards,
Tom

if X-lite does not work,use Idefisk