[asterisk-dev] Start testing with res_sip
Kevin Harwell
kharwell at digium.com
Thu Jun 20 11:04:56 CDT 2013
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
>
> <--- Received SIP request (906 bytes) from UDP:10.211.55.2:29754 --->
> INVITE sip:1000 at 10.211.55.78;transport=udp SIP/2.0
> Via: SIP/2.0/UDP
> 10.211.55.2:29754;branch=z9hG4bK-d8754z-5b1e7e3cb5437903-1---d8754z-;rport
> Max-Forwards: 70
> Contact: <sip:101 at 10.211.55.2:29754;transport=udp>
> To: <sip:1000 at 10.211.55.78>
> From: <sip:101 at 10.211.55.78>;tag=1a04960b
> Call-ID: OWQxOWQ4NjI5NjZlMzk0ZTNjMzUzY2UzZmJkNWIzYWI
> 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=- 1371710347513784 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 65276 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
>
> <--- Transmitting SIP response (338 bytes) to UDP:10.211.55.2:29754 --->
> SIP/2.0 404 Not Found
> Via: SIP/2.0/UDP
> 10.211.55.2:29754;rport;received=10.211.55.2;branch=z9hG4bK-d8754z-5b1e7e3cb5437903-1---d8754z-
> Call-ID: OWQxOWQ4NjI5NjZlMzk0ZTNjMzUzY2UzZmJkNWIzYWI
> From: <sip:101 at 10.211.55.78>;tag=1a04960b
> To: <sip:1000 at 10.211.55.78>;tag=26g1d2865MPHiX2eiJPPNYLgAPR831Ei
> CSeq: 1 INVITE
> Content-Length: 0
>
>
> <--- Received SIP request (357 bytes) from UDP:10.211.55.2:29754 --->
> ACK sip:1000 at 10.211.55.78;transport=udp SIP/2.0
> Via: SIP/2.0/UDP
> 10.211.55.2:29754;branch=z9hG4bK-d8754z-5b1e7e3cb5437903-1---d8754z-;rport
> Max-Forwards: 70
> To: <sip:1000 at 10.211.55.78>;tag=26g1d2865MPHiX2eiJPPNYLgAPR831Ei
> From: <sip:101 at 10.211.55.78>;tag=1a04960b
> Call-ID: OWQxOWQ4NjI5NjZlMzk0ZTNjMzUzY2UzZmJkNWIzYWI
> CSeq: 1 ACK
> Content-Length: 0
>
>
> res_sip.conf:
>
> [localnetwork]
> type=transport
> protocol=udp
> bind=0.0.0.0:5060
>
> [endpointtemplate](!)
> callerid_privacy=allowed_not_screened
> context=testing
> disallow=all
> allow=g722
> allow=alaw
> dtmfmode=rfc4733
> transport=localnetwork
> direct_media=yes
> send_pai=yes
>
> [101](endpointtemplate)
> type=endpoint
> aors=101
> auth=101
> callerid="Ron Arts" <101>
>
> [101]
> type=aor
> max_contacts=10
> remove_existing=yes
> mailboxes=101 at default
>
> [101]
> type=auth
> auth_type=userpass
> password=101
> username=101
Hi Ron,
I believe you will need to define an endpoint for 1000 in res_sip.conf as well. It is trying to find the endpoint to invite, but it hasn't been defined. Hopefully that will work.
--
Kevin Harwell
Digium, Inc. | Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at: http://digium.com & http://asterisk.org
More information about the asterisk-dev
mailing list