Help ! 2 X-Lite cannot talk: call failed: 404 not found

Dear All,

I installed an Asterisk on a linux PC, and X-Lite on two Windows

PCs, all in a LAN.

But, when I make phone call from one X-Lite to another, I always get

              Call Failed: 404 not found.


 Here is my sip.conf:

             [Phone1]
             type=friend
             host=dynamic
             ;defaultip=192.168.1.103
             dtmfmode=rfc2833
             context=SIP
             callerid = "Me" <2124>

             [Phone2]
             type=friend
             host=dynamic
             ;defaultip=192.168.1.101
             dtmfmode=rfc2833
             context=SIP
             callerid = "Mini Me" <2123>

        Following is my extensions.conf:
             exten => 2124,1,Dial(SIP/Phone1,20,tr)
             exten => 2123,1,Dial(SIP/Phone2,20,tr)

        Here is the Asterisk Sip debug info:

                         <-- SIP read from 192.168.2.103:5060:

INVITE sip:2123@192.168.2.120 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.103:5060;rport;branch=z9hG4bK5C01A7C11D6711DA92170800460D92CD
From: 1 sip:Phone1@192.168.2.120;tag=570805602
To: sip:2123@192.168.2.120
Contact: sip:Phone1@192.168.2.103:5060
Call-ID: 5C01A7C0-1D67-11DA-9217-0800460D92CD@192.168.2.103
CSeq: 24637 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103m
Content-Length: 297

v=0
o=Phone1 22215362 22215384 IN IP4 192.168.2.103
s=X-Lite
c=IN IP4 192.168.2.103
t=0 0
m=audio 8000 RTP/AVP 0 8 3 98 97 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:98 iLBC/8000
a=rtpmap:97 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

— (11 headers 13 lines)—
Using INVITE request as basis request -
5C01A7C0-1D67-11DA-9217-0800460D92CD@192.168.2.103
Sending to 192.168.2.103 : 5060 (non-NAT)
Found user 'Phone1’
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 3
Found RTP audio format 98
Found RTP audio format 97
Found RTP audio format 101
Peer audio RTP is at port 192.168.2.103:8000
Found description format pcmu
Found description format pcma
Found description format gsm
Found description format iLBC
Found description format speex
Found description format telephone-event
Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer - audio=0x60e
(gsm|ulaw|alaw|speex|ilbc)/video=0x0 (nothing), combined

  • 0xe (gsm|ulaw|alaw)
    Non-codec capabilities: us - 0x1 (telephone-event), peer - 0x1
    (telephone-event), combined - 0x1 (telephone-event)
    Looking for 2123 in SIP
    Sep 4 23:21:51 NOTICE[4337]: pbx.c:1680 pbx_extension_helper: Cannot
    find extension context 'SIP’
    Reliably Transmitting (no NAT) to 192.168.2.103:5060:
    SIP/2.0 404 Not Found
    Via: SIP/2.0/UDP
    192.168.2.103:5060;branch=z9hG4bK5C01A7C11D6711DA92170800460D92CD
    From: 1 sip:Phone1@192.168.2.120;tag=570805602
    To: sip:2123@192.168.2.120;tag=as26bf2947
    Call-ID: 5C01A7C0-1D67-11DA-9217-0800460D92CD@192.168.2.103
    CSeq: 24637 INVITE
    User-Agent: Asterisk PBX
    Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
    Contact: sip:2123@192.168.2.120
    Content-Length: 0

<-- SIP read from 192.168.2.103:5060:
ACK sip:2123@192.168.2.120 SIP/2.0
Via: SIP/2.0/UDP
192.168.2.103:5060;rport;branch=z9hG4bK5C01A7C11D6711DA92170800460D92CD
From: 1 sip:Phone1@192.168.2.120;tag=570805602
To: sip:2123@192.168.2.120;tag=as26bf2947
Contact: sip:Phone1@192.168.2.103:5060
Call-ID: 5C01A7C0-1D67-11DA-9217-0800460D92CD@192.168.2.103
CSeq: 24637 ACK
Max-Forwards: 70
Content-Length: 0

            Could you help to find out what's my problem?

            Thanks a lot!

Tance :cry:

Not if you post a great big chunk of debug output like that, no. Nobody’s going to read through that!

The console output with verbose set to 4 would be quite sufficient. But just posting stuff like that doesn’t make many people want to help you. You have to say what documentation you’ve read and what you’ve tried to do to get it to work, for a start.

Hello
I have the same error, my log es

I get the error

[color=green]SIP/2.0 404 Not Found[/color]

My number of softhphone is 1234 and the other is 4321.
In sip.conf I have:
[1234]
type = friend
host=dynamic
context=tutorial
nat=never
dtmf=rfc2833 or inband

on the other pc

[4321]
type = friend
host=dynamic
context=tutorial
nat=never
dtmf=rfc2833 or inband

In extension.conf I have

[tutorial]
extent => 1234,1,Dial(SIP,1234)
extent => 4321,1,Dial(SIP,4321)

I have a headache for it…

SEND TIME: 13864726
SEND >> 192.168.1.13:5060
INVITE sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bK08DA53C463AC4C03A354E08D49D883C4
From: jose sip:1234@192.168.1.13;tag=883344857
To: sip:4321@192.168.1.13
Contact: sip:1234@192.168.1.12:5060
Call-ID: 13E3F949-44A0-4BFE-BF14-3B3C03721C84@192.168.1.12
CSeq: 35854 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103m
Content-Length: 295

v=0
o=1234 13864285 13864716 IN IP4 192.168.1.12
s=X-Lite
c=IN IP4 192.168.1.12
t=0 0
m=audio 8000 RTP/AVP 0 8 3 97 110 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

RECEIVE TIME: 13864726
RECEIVE << 192.168.1.13:5060
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK08DA53C463AC4C03A354E08D49D883C4
From: jose sip:1234@192.168.1.13;tag=883344857
To: sip:4321@192.168.1.13;tag=as5106c548
Call-ID: 13E3F949-44A0-4BFE-BF14-3B3C03721C84@192.168.1.12
CSeq: 35854 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: sip:4321@192.168.1.13
Content-Length: 0

SEND TIME: 13864736
SEND >> 192.168.1.13:5060
ACK sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bK08DA53C463AC4C03A354E08D49D883C4
From: jose sip:1234@192.168.1.13;tag=883344857
To: sip:4321@192.168.1.13;tag=as5106c548
Contact: sip:1234@192.168.1.12:5060
Call-ID: 13E3F949-44A0-4BFE-BF14-3B3C03721C84@192.168.1.12
CSeq: 35854 ACK
Max-Forwards: 70
Content-Length: 0

SIP message 404 means that Asterisk doesn’t believe that the user exists.

In the above cases, I do not see any username= and secret= statements the SIP definitions.

You need to create a username and password to register X-Lite with the server.

Put the username (generally, but not necessarily, the extension) and password in the sip.conf definitions of each extension, and then use them to register your X-Lite software with the server.

You should then be able to place calls between the two X-Lite PC’s.

Hello:

I put the username and secret in sip.conf and I have the same error.
In sip.conf

[1234]
type = friend
regexten=1234
username=1234
secret=1234
host=dynamic
context=tutorial
nat=never
dtmf=rfc2833 or inband

on the other pc

[4321]
type = friend
regexten=4321
username=4321
secret=4321
host=dynamic
context=tutorial
nat=never
dtmf=rfc2833 or inband

In extension.conf I have

[tutorial]
extent => 1234,1,Dial(SIP,1234)
extent => 4321,1,Dial(SIP,4321)

In my asterisk server I look that my softphone is registered

CLI> Registered SIP ‘1234’ at 192.168.1.12 port 5060 expires 1800

SEND TIME: 58795503
SEND >> 192.168.1.13:5060
INVITE sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bKD7E39BB0EB644D63BCF0A2F1BF93B060
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13
Contact: sip:1234@192.168.1.12:5060
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23931 INVITE
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103m
Content-Length: 295

v=0
o=1234 58795022 58795503 IN IP4 192.168.1.12
s=X-Lite
c=IN IP4 192.168.1.12
t=0 0
m=audio 8000 RTP/AVP 0 8 3 97 110 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

RECEIVE TIME: 58795513
RECEIVE << 192.168.1.13:5060
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bKD7E39BB0EB644D63BCF0A2F1BF93B060
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13;tag=as37bdbe07
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23931 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: sip:4321@192.168.1.13
Proxy-Authenticate: Digest realm=“asterisk”, nonce="26d1bf5b"
Content-Length: 0

SEND TIME: 58795513
SEND >> 192.168.1.13:5060
ACK sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bKD7E39BB0EB644D63BCF0A2F1BF93B060
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13;tag=as37bdbe07
Contact: sip:1234@192.168.1.12:5060
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23931 ACK
Max-Forwards: 70
Content-Length: 0

SEND TIME: 58795593
SEND >> 192.168.1.13:5060
INVITE sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bK29434D55DE614085B412D577368E1382
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13
Contact: sip:1234@192.168.1.12:5060
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23932 INVITE
Proxy-Authorization: Digest username=“1234”,realm=“asterisk”,nonce=“26d1bf5b”,response=“eab233c9e597fb7234080354995ec900”,uri="sip:4321@192.168.1.13"
Max-Forwards: 70
Content-Type: application/sdp
User-Agent: X-Lite release 1103m
Content-Length: 295

v=0
o=1234 58795022 58795503 IN IP4 192.168.1.12
s=X-Lite
c=IN IP4 192.168.1.12
t=0 0
m=audio 8000 RTP/AVP 0 8 3 97 110 101
a=rtpmap:0 pcmu/8000
a=rtpmap:8 pcma/8000
a=rtpmap:3 gsm/8000
a=rtpmap:97 iLBC/8000
a=rtpmap:110 speex/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

RECEIVE TIME: 58795593
RECEIVE << 192.168.1.13:5060
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.12:5060;branch=z9hG4bK29434D55DE614085B412D577368E1382
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13;tag=as37bdbe07
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23932 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
Contact: sip:4321@192.168.1.13
Content-Length: 0

SEND TIME: 58795603
SEND >> 192.168.1.13:5060
ACK sip:4321@192.168.1.13 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.12:5060;rport;branch=z9hG4bK29434D55DE614085B412D577368E1382
From: jose sip:1234@192.168.1.13;tag=2843321146
To: sip:4321@192.168.1.13;tag=as37bdbe07
Contact: sip:1234@192.168.1.12:5060
Call-ID: 590ED4F8-7D1E-4035-97C9-F77325F539EC@192.168.1.12
CSeq: 23932 ACK
Max-Forwards: 70
Content-Length: 0

Did you also setup your softphone to register with the login name and password that you setup in the sip.conf?

When making things work with Asterisk, it’s easiest to think of it as setting up an email system. (Bad analogy, I know, but a client server system is a client server system.) If you don’t login, you can’t use the services.

In my asterisk server I look:

CLI> sip show registry
nothing
CLI> sip show subscriptions
nothing
CLI> sip show peers
Name/username Host Dyn Nat ACL Mask Port status
4321/4321 192.168.1.2 D 255.255.255.255 5060 unmonitored
1234/1234 192.168.1.12 D 255.255.255.255 5060 unmonitored

But I have the same error “404 Not found”

regards

Jose

The Dial command in your extensions.conf files is mis-constructed.

Change:

extent => 1234,1,Dial(SIP,1234)
extent => 4321,1,Dial(SIP,4321)

To:

exten => 1234,1,Dial(SIP/1234)
exten => 4321,1,Dial(SIP/4321)

Notice that extent is incorrect. It should be exten.

Also, the proper way to address an endpoint, no matter what type it is, station, trunk, line, whatever, is TECHNOLOGY/IDENTIFICATION.

So, proper formats include:

ZAP/1
SIP/201
ZAP/G1

Hope that helps. Don’t be discouraged. Once you learn the basics, it will become easier. No one was born knowing how to configure an Asterisk PBX. (Well, Mark Spencer maybe, but he doesn’t count.)

Thank you

I did the corrections and my pbx is ok

regards
Jose