Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to make a small Asterisk server in my house. I installed asterisk on my Ubuntu and I use 2 computers, in order to connect to one another. when I connect I can see in Wireshark that registrar ok. here is the output of sip show peers command:

Name/username              Host                                    Dyn Forcerport ACL Port     Status     
uriel/uriel                192.168.1.101                            D   N      5060     Unmonitored 
vibrant/vibrant            192.168.1.100                            D   N      5060     Unmonitored 
2 sip peers [Monitored: 0 online, 0 offline Unmonitored: 2 online, 0 offline]

But the problem is when I call sip:vibrant@192.168.1.200 from uriel I get 404 not found.

And sorry for my English.

as user MealstroM asked here are my sip.conf:

[vibrant]
type=friend
username=vibrant
secret=
host=dynamic
context=tutorial
nat=yes
qualify=yes


[uriel]
type=friend
username=uriel
secret=
host=dynamic
context=tutorial
nat=yes
qualify=yes

and for cli sip set debug peer vibrant


uriel-desktop*CLI> sip set debug peer vibrant
SIP Debugging Enabled for IP: 192.168.1.100


INVITE sip:uriel@192.168.1.200 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.100:5060;rport;branch=z9hG4bKPj5uU12iuF3c7r4U7XBIgX36ORxjGapenJ
Max-Forwards: 70
From: ;tag=v911t7.3Vk2K1-5Um-iWhFL6AmkL5uEq
To: 
Contact: 
Call-ID: M1IPA30WrJWAmikvmIk1fikAEUSD4q5c
CSeq: 4975 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
Content-Type: application/sdp
Content-Length: 600

v=0
o=- 3535974498 3535974498 IN IP4 192.168.1.100
s=pjmedia
c=IN IP4 192.168.1.100
t=0 0
a=X-nat:0
m=audio 40010 RTP/AVP 106 105 107 3 0 8 9 108 103 104 102 18 101
c=IN IP4 192.168.1.100
a=rtcp:40011 IN IP4 192.168.1.100
a=sendrecv
a=rtpmap:106 speex/16000
a=rtpmap:105 speex/8000
a=rtpmap:107 speex/32000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:9 G722/8000
a=rtpmap:108 AMR/8000
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:102 ILBC/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15

--- (14 headers 25 lines) ---
Sending to 192.168.1.100:5060 (no NAT)
Using INVITE request as basis request - M1IPA30WrJWAmikvmIk1fikAEUSD4q5c
Found peer 'vibrant' for '192.168.1.100' from 192.168.1.100:5060
Found RTP audio format 106
Found RTP audio format 105
Found RTP audio format 107
Found RTP audio format 3
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 9
Found RTP audio format 108
Found RTP audio format 103
Found RTP audio format 104
Found RTP audio format 102
Found RTP audio format 18
Found RTP audio format 101
Found audio description format speex for ID 106
Found audio description format speex for ID 105
Found audio description format speex for ID 107
Found audio description format GSM for ID 3
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format G722 for ID 9
Found audio description format AMR for ID 108
Found audio description format ISAC for ID 103
Found audio description format ISAC for ID 104
Found audio description format ILBC for ID 102
Found audio description format G729 for ID 18
Found audio description format telephone-event for ID 101
Capabilities: us - 0x80000008000e (gsm|ulaw|alaw|h263|testlaw), peer - audio=0x20050170e (gsm|ulaw|alaw|g729|speex|speex16|ilbc|g722|h263p|mpeg4)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0xe (gsm|ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.1.100:40010
Looking for uriel in tutorial (domain 192.168.1.200)


SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 192.168.1.100:5060;branch=z9hG4bKPj5uU12iuF3c7r4U7XBIgX36ORxjGapenJ;received=192.168.1.100;rport=5060
From: ;tag=v911t7.3Vk2K1-5Um-iWhFL6AmkL5uEq
To: ;tag=as4078a435
Call-ID: M1IPA30WrJWAmikvmIk1fikAEUSD4q5c
CSeq: 4975 INVITE
Server: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0



[Jan 19 17:08:18] NOTICE[1081]: chan_sip.c:21614 handle_request_invite: Call from 'vibrant' to extension 'uriel' rejected because extension not found in context 'tutorial'.
Scheduling destruction of SIP dialog 'M1IPA30WrJWAmikvmIk1fikAEUSD4q5c' in 6400 ms (Method: INVITE)


ACK sip:uriel@192.168.1.200 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.100:5060;rport;branch=z9hG4bKPj5uU12iuF3c7r4U7XBIgX36ORxjGapenJ
Max-Forwards: 70
From: ;tag=v911t7.3Vk2K1-5Um-iWhFL6AmkL5uEq
To: ;tag=as4078a435
Call-ID: M1IPA30WrJWAmikvmIk1fikAEUSD4q5c
CSeq: 4975 ACK
Content-Length: 0


--- (8 headers 0 lines) ---
Really destroying SIP dialog 'M1IPA30WrJWAmikvmIk1fikAEUSD4q5c' Method: ACK
Reliably Transmitting (NAT) to 192.168.1.100:5060:
OPTIONS sip:vibrant@192.168.1.100:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.200:5060;branch=z9hG4bK41ab4d90;rport
Max-Forwards: 70
From: "asterisk" ;tag=as47523e3d
To: 
Contact: 
Call-ID: 1ef589e575f2263903cae0931bb27eb4@192.168.1.200:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX 1.8.4.4~dfsg-2ubuntu1
Date: Thu, 19 Jan 2012 15:08:39 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


---


SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.200:5060;rport=5060;received=192.168.1.200;branch=z9hG4bK41ab4d90
Call-ID: 1ef589e575f2263903cae0931bb27eb4@192.168.1.200:5060
From: "asterisk" ;tag=as47523e3d
To: ;tag=z9hG4bK41ab4d90
CSeq: 102 OPTIONS
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Accept: application/sdp, application/pidf+xml, application/xpidf+xml, application/simple-message-summary, message/sipfrag;version=2.0, application/im-iscomposing+xml, text/plain
Supported: replaces, 100rel, timer, norefersub
Allow-Events: presence, message-summary, refer
Content-Length: 0


--- (11 headers 0 lines) ---
Really destroying SIP dialog '1ef589e575f2263903cae0931bb27eb4@192.168.1.200:5060' Method: OPTIONS

and now for the extensions.conf


     [tutorial]
     exten => uriel,1,Dial(SIP/uriel);
     exten => vibrant,2,Dial(SIP/vibrant);
share|improve this question
    
0 down vote Add pelase qualify=yes to sip.conf for peer vibran then at asterisk cli: sip set debug peer vibran then make a call and show messages from output of cli. also please privede information of peer configuration from sip.conf –  MealstroM Jan 19 '12 at 13:11

4 Answers 4

up vote 0 down vote accepted

[Jan 19 17:08:18] NOTICE[1081]: chan_sip.c:21614 handle_request_invite: Call from 'vibrant' to extension 'uriel' rejected because extension not found in context 'tutorial'.

That explains it, can you post the contents of the tutorial context?

share|improve this answer
    
where is it located? –  Uriel Frankel Jan 19 '12 at 16:31

Solved it! changed extensions.conf to:


    [tutorial]
     exten => uriel,1,Dial(SIP/uriel@192.168.1.101);
     exten => vibrant,2,Dial(SIP/vibrant@192.168.1.200);

I dont know if that is the right way to do it, but it works

share|improve this answer
    
unfortunately, no that is not the correct way to do it unless you only want the calls to ring on those two ip-addresses forever. What if the IP's change? What if you want to login to another device? Asterisk does not want the device name and extensions to be the same. You should more appropriately give the extension a number instead of a name so you can call this device from a phone. If those two extensions are 101 and 200 instead of uriel and vibrant this could work fine when dialing 101 and 200 instead of uriel@192.168.1.101 –  Shapeshifter Aug 30 '13 at 17:08

Change the extensions to something numerical so that they do not match the device names that you configured in sip.conf and so that they can be dialed from a phone. Also set type=peer and you won't need to include the @ip-address in your extensions.conf

Let me know if that helps.

share|improve this answer

Check the priority number of your vibrant extension. When you dial vibrant, the asterisk will look for the first priority on your tutorial context with the extension vibrant. Just replace 2 with 1.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.