[asterisk-bugs] [Asterisk 0018348]: No answer to OPTIONS packet because Asterisk not looking for 's' in default context

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Mar 16 16:44:01 CDT 2011


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18348 
====================================================================== 
Reported By:                shmaize
Assigned To:                rmudgett
====================================================================== 
Project:                    Asterisk
Issue ID:                   18348
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     acknowledged
Target Version:             1.8.5
Asterisk Version:           SVN 
JIRA:                       SWP-2639 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-11-22 02:54 CST
Last Modified:              2011-03-16 16:44 CDT
====================================================================== 
Summary:                    No answer to OPTIONS packet because Asterisk not
looking for 's' in default context
Description: 
Hello,

asterisk-1.8.0 installed through yum on CentOS 5.5 32bit. 

My SIP provider is checking if I'm alive with OPTIONS. I must answer to
that request with "SIP/2.0 200 OK". The default behavior is to check if I
have a peer with that IP, then check for "s" in it's context. If not check
for "s" in the guests context (context=XX from general section of
sip.conf). Or I'm missing something?

With 1.8.0 the extension part is missing. Some debug logs:
1.1.1.1 is the SIP provider, 2.2.2.2 is my IP. 

/var/log/asterisk/full:
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: = Looking for  Call ID:
269dd7c535d89368dbb1770a86cd13df at 1.1.1.1 (Checking From) --From tag 24178
--To-tag   
[Nov 18 16:38:05] DEBUG[6942] acl.c: For destination '1.1.1.1', our source
address is '2.2.2.2'.
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: Setting SIP_TRANSPORT_UDP with
address 2.2.2.2:5060
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: Allocating new SIP dialog for
269dd7c535d89368dbb1770a86cd13df at 1.1.1.1 - OPTIONS (No RTP) 
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: **** Received OPTIONS (3) -
Command in SIP OPTIONS
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: Trying to put 'SIP/2.0 404' onto
UDP socket destined for 1.1.1.1:5080
[Nov 18 16:38:05] DEBUG[6942] chan_sip.c: SIP message could not be
handled, bad request: 269dd7c535d89368dbb1770a86cd13df at 1.1.1.1


<--- SIP read from UDP:1.1.1.1:5080 ---> 
OPTIONS sip:2.2.2.2:5060 SIP/2.0
Call-ID: 7ee61f3291443916e4d631a411c231b5 at 1.1.1.1
CSeq: 100 OPTIONS
From: "Voxbone Monitoring" <sip:voxmon at 1.1.1.1>;tag=95055
To: <sip:2.2.2.2:5060>
Max-Forwards: 30
Route: <sip:2.2.2.2:5060>
Via: SIP/2.0/UDP
1.1.1.1:5080;branch=z9hG4bKfabde850548854ad76efa0335e4bfe82
Content-Length: 0

<------------->
--- (9 headers 0 lines) ---
Looking for  in guests (domain 2.2.2.2:5060)

<--- Transmitting (no NAT) to 1.1.1.1:5080 ---> 
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
1.1.1.1:5080;branch=z9hG4bKfabde850548854ad76efa0335e4bfe82;received=1.1.1.1
From: "Voxbone Monitoring" <sip:voxmon at 1.1.1.1>;tag=95055
To: <sip:2.2.2.2:5060>;tag=as5967e5ef
Call-ID: 7ee61f3291443916e4d631a411c231b5 at 1.1.1.1
CSeq: 100 OPTIONS
Server: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Accept: application/sdp
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog
'7ee61f3291443916e4d631a411c231b5 at 1.1.1.1' in 32000 ms (Method: OPTIONS)

In the part "Looking for  in guests" it should be "Looking for s in
guests". 

sip.conf
[general]

bindport=5060           ; Port to bind to (SIP is 5060)
srvlookup=yes
bindaddr=2.2.2.2
disallow=all                                                         
allow=alaw                                                          
dtmfmode=rfc2833
allowguest=no
canreinvite=no
context=guests ; Send unknown SIP callers to this context          
callerid=Unknown
allowoverlap=no                 ; Disable overlap dialing support.
(Default is yes)
allowtransfer=no
useragent=Asterisk PBX
externip=2.2.2.2


When testing with 1.6.2.14 (installed from yum) it's OK:
<------------->
--- (9 headers 0 lines) ---
Looking for s in guests (domain 2.2.2.2)

<--- Transmitting (no NAT) to 1.1.1.1:5080 --->
SIP/2.0 200 OK

======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
has duplicate       0018922 Asterisk is answering with 404 to OPTIO...
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-03-16 16:44 lmadsen        Asterisk Version         1.8.0 => SVN        
2011-03-16 16:44 lmadsen        Assigned To               => rmudgett        
2011-03-16 16:44 lmadsen        Target Version            => 1.8.5           
2011-03-16 16:44 lmadsen        Description Updated                          
======================================================================




More information about the asterisk-bugs mailing list