Sipsak 200 For A User, But 404 For A Different User…why?

Home » Asterisk Users » Sipsak 200 For A User, But 404 For A Different User…why?
Asterisk Users 6 Comments

What’s the difference between user “123” and “devries”? Based on the output here, they seem the same..?

tleilax*CLI>
tleilax*CLI> sip show users Username Secret Accountcode
Def.Context ACL Forcerport
201 password 201
default No Yes
123 password 123
default No Yes
devries password devries
default No Yes
babytel hjkgk58757
default No Yes
gs102 X58sKpZCcDfcGT0 gs102
default No Yes
tleilax*CLI>
tleilax*CLI> sip show user 123

* Name : 123
Secret :
MD5Secret :
Context : default
Language : en
Accountcode : 123
AMA flags : Unknown
Netborder CPD: No
Transfer mode: open
MaxCallBR : 384 kbps
CallingPres : Presentation Allowed, Not Screened
Call limit : 0
Callgroup :
Pickupgroup :
Callerid : “123” <123>
ACL : No
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Sess-Min-SE : 90 secs
RTP Engine : asterisk
Codec Order : (ulaw:20,gsm:20)
Auto-Framing: No

tleilax*CLI>
tleilax*CLI> sip show user devries

* Name : devries
Secret :
MD5Secret :
Context : default
Language : en
Accountcode : devries
AMA flags : Unknown
Netborder CPD: No
Transfer mode: open
MaxCallBR : 384 kbps
CallingPres : Presentation Allowed, Not Screened
Call limit : 0
Callgroup :
Pickupgroup :
Callerid : “devries” <999>
ACL : No
Sess-Timers : Accept
Sess-Refresh : uas
Sess-Expires : 1800 secs
Sess-Min-SE : 90 secs
RTP Engine : asterisk
Codec Order : (ulaw:20,gsm:20)
Auto-Framing: No

tleilax*CLI>
tleilax*CLI> exit tleilax:~ #
tleilax:~ # exit logout Connection to tleilax closed. thufir@doge:~$
thufir@doge:~$ sudo sipsak -vv -s sip:123@tleilax
[sudo] password for thufir:
No SRV record: _sip._tcp.tleilax No SRV record: _sip._udp.tleilax using A record: tleilax

message received:
SIP/2.0 200 OK
Via: SIP/2.0/UDP
127.0.1.1:55238;branch=z9hG4bK.3e59b63f;alias;received2.168.1.3;rportU238
From: sip:sipsak@127.0.1.1:55238;tag6fe4eb To: sip:123@tleilax;tag=as7dc4727d Call-ID: 510649579@127.0.1.1
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.8.32.1-vici Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer Contact:
Accept: application/sdp Content-Length: 0

** reply received after 0.627 ms **
SIP/2.0 200 OK
final received thufir@doge:~$
thufir@doge:~$ sudo sipsak -vv -s sip:devries@tleilax No SRV record: _sip._tcp.tleilax No SRV record: _sip._udp.tleilax using A record: tleilax

message received:
SIP/2.0 404 Not Found Via: SIP/2.0/UDP
127.0.1.1:54969;branch=z9hG4bK.38ee5c41;alias;received2.168.1.3;rportT969
From: sip:sipsak@127.0.1.1:54969;tagn148be1
To: sip:devries@tleilax;tag=as2b617a9b Call-ID: 1846840289@127.0.1.1
CSeq: 1 OPTIONS
Server: Asterisk PBX 1.8.32.1-vici Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer Accept: application/sdp Content-Length: 0

** reply received after 0.648 ms **
SIP/2.0 404 Not Found
final received thufir@doge:~$

thanks,

Thufir

6 thoughts on - Sipsak 200 For A User, But 404 For A Different User…why?

  • A “sip set debug on” will give you more info on why you are getting the
    404. It probably has to do something with your context/dialplan.

  • on tleilax:

    tleilax*CLI>
    tleilax*CLI> sip set debug on SIP Debugging enabled tleilax*CLI>

    on doge:

    thufir@doge:~$
    thufir@doge:~$ sudo sipsak -vv -s sip:devries@tleilax -m “hi”
    No SRV record: _sip._tcp.tleilax No SRV record: _sip._udp.tleilax using A record: tleilax Max-Forwards set to 0

    message received:
    SIP/2.0 404 Not Found Via: SIP/2.0/UDP
    127.0.1.1:56377;branch=z9hG4bK.0edaada3;alias;received2.168.1.3;rportV377
    From: sip:sipsak@127.0.1.1:56377;tagk540010
    To: sip:devries@tleilax;tag=as02b0fdd6
    Call-ID: 1800667152@127.0.1.1
    CSeq: 1 OPTIONS
    Server: Asterisk PBX 1.8.32.1-vici Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
    Supported: replaces, timer Accept: application/sdp Content-Length: 0

    ** reply received after 0.844 ms **
    SIP/2.0 404 Not Found
    final received thufir@doge:~$

    However, I’m sure you’re right that it’s the dialplan; I’m looking into it.

    thanks,

    Thufir

  • This is showing nothing so I don’t think your test message even made it here. I think it looped in the ‘doge’ server.

  • I was wondering the same thing 🙂

    in tleilax, I looked in /var/log/asterisk/messages and see:

    [Feb 20 15:13:19] VERBOSE[3661] chan_sip.c: [Feb 20 15:13:19]
    <--- SIP read from UDP:192.168.1.3:38154 --->
    OPTIONS sip:345@tleilax SIP/2.0
    Via: SIP/2.0/UDP 127.0.1.1:38154;branch=z9hG4bK.77fd156e;rport;alias From: sip:sipsak@127.0.1.1:38154;tagF53e713
    To: sip:345@tleilax Call-ID: 1179903763@127.0.1.1
    CSeq: 1 OPTIONS
    Contact: sip:sipsak@127.0.1.1:38154
    Content-Length: 0
    Max-Forwards: 0
    User-Agent: sipsak 0.9.6
    Accept: text/plain

    it seems to work, in that I get 200 OK, with success reflected, apparently, in the log, provided that its numerical. I just changed it from “piter” to “345” and get success (well, at this at least). This probably has something to do with my dialplan..

    Is the message, “hi”, logged anywhere?

    -Thufir

  • I don’t think so. But you should also see the SIP messages on the console (sip set debug on) without having to look at the log file. Maybe something in your logger.conf is messed up.

  • that worked 🙂

    tleilax*CLI>
    tleilax*CLI>
    [Feb 20 21:06:19]
    <--- SIP read from UDP:192.168.1.3:44226 --->
    OPTIONS sip:345@tleilax SIP/2.0
    Via: SIP/2.0/UDP 127.0.1.1:44226;branch=z9hG4bK.508a6d72;rport;alias From: sip:sipsak@127.0.1.1:44226;tag*099edc To: sip:345@tleilax Call-ID: 705273564@127.0.1.1
    CSeq: 1 OPTIONS
    Contact: sip:sipsak@127.0.1.1:44226
    Content-Length: 0
    Max-Forwards: 0
    User-Agent: sipsak 0.9.6
    Accept: text/plain

    <------------->
    [Feb 20 21:06:19] — (11 headers 0 lines) –