[SIPForum-discussion] should the INVITE be accepted or rejected?

Keith Lin iamchiaweilin at gmail.com
Wed Oct 12 02:47:25 UTC 2011

Hello everyone,

Here's what I think might be relevant to my previous question.

Page 36 of RFC3261
To and Request-URI The To header field identifies the original recipient of
the request designated by
the user identified in the From field. The original recipient may or may not
be the UAS processing the
request, due to call forwarding or other proxy operations. A UAS MAY apply
any policy it wishes to de-
termine whether to accept requests when the To header field is not the
identity of the UAS. However, it is
RECOMMENDED that a UAS accept requests even if they do not recognize the URI
scheme (for example, a
tel: URI) in the To header field, or if the To header field does not address a
known or current user of this
Rosenberg, et al. Standards Track [Page 36]RFC 3261 SIP: Session Initiation
Protocol June 2002
UAS. If, on the other hand, the UAS decides to reject the request, it SHOULD
generate a response with a 403
(Forbidden) status code and pass it to the server transaction for

However, the Request-URI identifies the UAS that is to process the request.
If the Request-URI uses a
scheme not supported by the UAS, it SHOULD reject the request with a 416
(Unsupported URI Scheme)
response. If the Request-URI does not identify an address that the UAS is
willing to accept requests for,
it SHOULD reject the request with a 404 (Not Found) response. Typically, a
UA that uses the REGISTER
method to bind its address-of-record to a specific contact address will see
requests whose Request-URI
equals that contact address. Other potential sources of received
Request-URIs include the Contact header
fields of requests and responses sent by the UA that establish or refresh

Does that mean if you are an UAS, you should check request URI carefully but
"recommended" ignoring "to header"?


2011/10/11 Keith Lin <iamchiaweilin at gmail.com>

> Hello everyone,
> Suppose there is an UA, who has registered successfully (as seen in M1 and
> M2 below).
> Now if there comes an INVITE request (as seen in M3 below) to the UA, what
> should it reply? 200 OK? or?
> My opinion is the UA should reject the INVITE, because the UA was
> registered with the URI draytec at test.winitu.com
> The INVITE has a "to-header" of 31172759442 at
> As you can see, both username part and domain/host part of the URI are
> different
> That's why I reckon the UA should reject the INVITE......  what do you guys
> think?
> Thank you in advance
> M1 - trying to register
> --------------------------------------
> REGISTER sip:test.winitu.com SIP/2.0
> Via: SIP/2.0/UDP;branch=z9hG4bK-baZ-2090457395;rport
> From: 31172759442 <sip:draytec at test.winitu.com>;tag=qPb-1821832709
> To: <sip:draytec at test.winitu.com>
> Call-ID: WFZ-1501346479 at
> CSeq: 554 REGISTER
> Contact: <sip:draytec at>
> Authorization: Digest username="draytec", realm="test.winitu.com",
> nonce="4e8ec82292bcbf9f47f4a24db8a35d3815f84dcc", uri="sip:test.winitu.com",
> response="edfb37427d91f45c1a10b2776f81196b", algorithm=MD5
> Max-Forwards: 15
> Expires: 3600
> User-Agent: DrayTek UA-1.2.3 Vigor2130
> Content-Length: 0
> M2 - registered successfully
> --------------------------------------
>  SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> ;branch=z9hG4bK-baZ-2090457395;rport=5060;received=
> From: 31172759442 <sip:draytec at test.winitu.com>;tag=qPb-1821832709
> To: <sip:draytec at test.winitu.com
> >;tag=2b942734826ad2dca07eef0e7632aeb1.715c
> Call-ID: WFZ-1501346479 at
> CSeq: 554 REGISTER
> Contact: <sip:draytec at>;expires=3600;received="sip:
>  Content-Length: 0
> M3 - incoming INVITE message
> --------------------------------------
> INVITE sip:draytec at SIP/2.0
> Record-Route: <sip:;lr=on;ftag=20B9158-2341;nat=yes>
> Via: SIP/2.0/UDP;branch=z9hG4bKb598.4282f896.0
> Via: SIP/2.0/UDP;rport=65139;x-route-tag="
> cid:DMS-TRUNK at";branch=z9hG4bK881C2564
> From: "anonymous" <sip:anonymous at anonymous.invalid>;tag=20B9158-2341
> To: <sip:31172759442 at>
> Call-ID: 257F727-EFFE11E0-8B2CF4AB-C7084FB4 at
> Supported: 100rel,timer,replaces
> Min-SE:  1800
> CSeq: 101 INVITE
> Max-Forwards: 69
> Contact: <sip:0654331151 at>
> Expires: 180
> Allow-Events: telephone-event
> Content-Type: application/sdp
>  Content-Length: 306
> Remote-Party-ID: "anonymous" <sip:anonymous at anonymous.invalid
> >;party=calling;screen=yes;privacy=full
> To-Hint: sip:draytec at test.winitu.com
> To-Number-Hint: 31172759442
> From-Hint: sip:31654331151 at test.winitu.com
> From-Number-Hint: sip:31654331151 at test.winitu.com
> v=0
> o=CiscoSystemsSIP-GW-UserAgent 3678 740 IN IP4
> s=SIP Call
> c=IN IP4
> t=0 0
> m=audio 16462 RTP/AVP 8 18 101
> c=IN IP4
> a=rtpmap:8 PCMA/8000
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=yes
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
> a=direction:passive
> regards,
> Keith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sipforum.org/pipermail/discussion/attachments/20111012/2e23c302/attachment-0002.html>

More information about the discussion mailing list