[asterisk-dev] Start testing with res_sip

Ron Arts ron.arts at oneip.nl
Thu Jun 20 10:10:54 CDT 2013


On Thu, Jun 20, 2013 at 4:29 PM, Mark Michelson <mmichelson at digium.com> wrote:
> On 06/20/2013 01:43 AM, Ron Arts wrote:
>>
>> Hi,
>>
>> I cannot get authentication to work with res_sip. I get a not found.
>> Is there a way to enable
>> debugging in res_sip? The SIP trace below appears automatically, and I
>> don't know how to
>> stop that, but OTOH chan_sip has debugging that shows where it's
>> looking for and why it can't
>> find the peer. I include my res_sip.conf below. It's very short.
>>
>> Thanks,
>> Ron
>>
>
> A way that you can stop the SIP trace from appearing is to "module unload
> res_sip_logger.so" from the CLI. Or you can noload res_sip_logger.so from
> modules.conf and just load it when you need to start seeing SIP traces. The
> best you're going to find for debugging right now is the core debugging
> feature. Just ensure that the console is receiving debug messages in
> logger.conf, and then set your debug log level to 3 or higher ("core set
> debug 3") and you'll probably see everything that's being logged at the
> moment. If you have specific ideas for improvements for log messages, feel
> free to let us know (or even contribute them).
>
> Regarding the problem you're seeing, I'm not sure why you'd be seeing it. It
> looks like you adapted the configuration from the issue that Malcolm linked
> to, and I know authentication was working for him when he was testing. My
> guess is that there is a module that either failed to load or just is not
> configured to load that needs to be there. If you run a "module show like
> res_sip" command in your CLI what all shows up?
>
> Mark Michelson
>
>

With 'core set verbose 8' I get the following:

<--- Received SIP request (906 bytes) from UDP:10.211.55.2:47382 --->
INVITE sip:1000 at 10.211.55.78;transport=udp SIP/2.0
Via: SIP/2.0/UDP
10.211.55.2:47382;branch=z9hG4bK-d8754z-bdb7d75265eb3853-1---d8754z-;rport
Max-Forwards: 70
Contact: <sip:101 at 10.211.55.2:47382;transport=udp>
To: <sip:1000 at 10.211.55.78>
From: <sip:101 at 10.211.55.78>;tag=9f246e6a
Call-ID: ODc4MTU0YWNjMzM1MTBkZTNiNTRkNTYzMjc4M2E4ZWY
CSeq: 1 INVITE
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE,
SUBSCRIBE, INFO
Content-Type: application/sdp
Supported: replaces
User-Agent: Bria 3 release 3.5.2 stamp 70365
Content-Length: 345

v=0
o=- 1371740489377030 1 IN IP4 10.211.55.2
s=Bria 3 release 3.5.2 stamp 70365
c=IN IP4 10.211.55.2
t=0 0
m=audio 56248 RTP/AVP 122 120 9 8 0 18 101
a=rtpmap:122 opus/48000/2
a=fmtp:122 useinbandfec=1
a=rtpmap:120 SILK/16000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=yes
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=sendrecv

[Jun 20 16:49:59] DEBUG[7799]: threadpool.c:506 grow: Increasing
threadpool SIP's size by 5
[Jun 20 16:49:59] DEBUG[11844]: res_sip_endpoint_identifier_user.c:104
username_identify: Retrieved endpoint 101
[Jun 20 16:49:59] DEBUG[11844]: res_sip_session.c:1438
handle_outgoing_response: Response is 404 Not Found
<--- Transmitting SIP response (338 bytes) to UDP:10.211.55.2:47382 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP
10.211.55.2:47382;rport;received=10.211.55.2;branch=z9hG4bK-d8754z-bdb7d75265eb3853-1---d8754z-
Call-ID: ODc4MTU0YWNjMzM1MTBkZTNiNTRkNTYzMjc4M2E4ZWY
From: <sip:101 at 10.211.55.78>;tag=9f246e6a
To: <sip:1000 at 10.211.55.78>;tag=XZNVf-XGZUcREntY7jIKhE7pr1.umdWI
CSeq: 1 INVITE
Content-Length:  0

and the modules loaded are:

ubuntu*CLI> module show like res_sip
Module                         Description
 Use Count  Status
res_sip.so                     Basic SIP resource
 15         Running
res_sip_acl.so                 SIP ACL Resource
 0          Running
res_sip_authenticator_digest.so SIP authentication resource
  0          Running
res_sip_caller_id.so           SIP Caller ID Support
 0          Running
res_sip_dtmf_info.so           SIP DTMF INFO Support
 0          Running
res_sip_endpoint_identifier_constant.so SIP Constant Endpoint
Identifier         0          Running
res_sip_endpoint_identifier_ip.so SIP IP endpoint identifier
    0          Running
res_sip_endpoint_identifier_user.so SIP username endpoint identifier
      0          Running
res_sip_logger.so              SIP Packet Logger
 0          Running
res_sip_mwi.so                 SIP MWI resource
 0          Running
res_sip_nat.so                 SIP NAT Support
 0          Running
res_sip_outbound_authenticator_digest.so SIP authentication resource
           0          Running
res_sip_outbound_registration.so SIP Outbound Registration Support
   0          Running
res_sip_pubsub.so              SIP event resource
 1          Running
res_sip_registrar.so           SIP Registrar Support
 0          Running
res_sip_rfc3326.so             SIP RFC3326 Support
 0          Running
res_sip_sdp_rtp.so             SIP SDP RTP/AVP stream handler
 0          Running
res_sip_session.so             SIP Session resource
 8          Running
18 modules loaded


Thanks,
Ron



More information about the asterisk-dev mailing list