Subject: [Sip] Request URI and TO heasder "user" part is different

From: Nitin Kapoor <[email-masked]>
Date: Thu, 18 Mar 2010 10:41:33 -0400

Hello,

I have the scenario  where the call is coming to SBC from my source UA and
then I am forwarding the same call to redirect server to route the call.

Here is the scenario.

1) Call come to my source UA and then I forwarded the call to redirect
server with below REQUEST uri.

Request-Line: INVITE
sip:[email-masked]<[email-masked]>;user=phone
SIP/2.0
Request-URI: sip:[email-masked] <[email-masked]>
;user=phone
To: sip:[email-masked] <[email-masked]>
;user=phone
From: "Joe Gonzales"
<sip:[email-masked]<[email-masked]>
;user=phone>;tag=3477742912-272141
Contact: <sip:[email-masked]:5060;user=phone;tgrp=100054CUST>

2) Now from here my *redirect server* replied me with below  uri in TO &
FROM, but will multiple CONTACT header and on which I have the first CONTACT
user part is with “1” and the others all are same but carry the “1” with
rest of the user part.

IP/2.0 300 Redirect
To: <sip:[email-masked] <[email-masked]>
;user=phone>;tag=a667a4b9fa6bfa35b
From: "Joe Gonzales"
<sip:[email-masked]<[email-masked]>
;user=phone>;tag=3477742912-272141
Via: SIP/2.0/UDP 64.124.207.220:5060
;branch=z9hG4bKb96ce5413fe01d59101005f4ae3881c6
Contact: <sip:[email-masked] <[email-masked]>
;dtg=202583VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202393VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202562VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202405VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202163VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202203VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202525VEND>,
sip:[email-masked] <[email-masked]>
;dtg=201030VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202330VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202206VEND>,
sip:[email-masked] <[email-masked]>
;dtg=202329VEND>,
sip:[email-masked] <[email-masked]>
;dtg=201906VEND>,
sip:[email-masked] <[email-masked]>
;dtg=201908VEND>,
sip:[email-masked] <[email-masked]>
;dtg=201907VEND>,
sip:[email-masked] <[email-masked]>
;dtg=201905VEND>

3)However after sending the ACK my server again sent the another invite to
my vendor with below REQUEST URI with “1” whereas in first CONTACT header
from redirect was not carrying the “1” Contact:
sip:[email-masked] <[email-masked]>
;dtg=202583VEND.

Request-Line: INVITE
sip:[email-masked]<[email-masked]>SIP/2.0
Request-URI: sip:[email-masked] <[email-masked]>

Whereby in TO header(of the same INVITE) I do not have the “1” in user part
as below.

To: sip:[email-masked] <[email-masked]>
Contact: sip:64.124.207.220:5060;tgrp=100054CUST

And because of this my vendor is sending immediate 502 REJECTED.

Status-Line: SIP/2.0 502 Rejected - Called number is not NATNUM

Could anyone please help me on this, whether it is a correct or not,because
as far as I know he user part of the Request uri would be checked first.
User part of the Request uri is valid but the To header is different from
Request uri  so now a validation for the User part of the To header will be
performed and if the user part is found to be invalid then a  404 (Not
Found) response should  sent back.

Thanks,
Nitin Kapoor

---

From: "WORLEY, DALE R (DALE)" <[email-masked]>
Date: Thu, 18 Mar 2010 13:52:19 -0400

_______________________________________
From: [email-masked] [[email-masked]] On Behalf Of Nitin Kapoor [[email-masked]]

_______________________________________________

In general, a SIP element should not consider the value of the To header.  However, the To header is required to conform to a specific syntax, and this To header does not.  The basic structure for this type of To header is "display-name <SIP-URI>".  However, if display-name is not quoted, it is restricted to being a "token", and "token" may not contain ":" or "@".  The text between <...> is supposed to be a SIP URI, but the ":" is replaced by "%3A", and there is no escaping defined for that position.  See section 25.1 of RFC 3261 for the details.

So until you correct the To header (who is generating it?) there is no reason to expect any SIP element to accept the request.

Dale

---

From: Nitin Kapoor <[email-masked]>
Date: Thu, 18 Mar 2010 14:02:13 -0400

Dale,

I guess its looks different in sip forum..

Because i have not seen a single packet in original format who is taking
"%3A" in userpart..However i am again sending you the Request line which is
actually quested in uri's.

Request-Line: INVITE

Thanks,
Nitin Kapoor

On 18 March 2010 13:52, WORLEY, DALE R (DALE) <[email-masked]> wrote:

> From: [email-masked] [
> [email-masked]] On Behalf Of Nitin Kapoor
> [[email-masked]]
>
> To: sip:[email-masked] <[email-masked]> <
> [email-masked] <[email-masked]>>
>
> In general, a SIP element should not consider the value of the To header.
>  However, the To header is required to conform to a specific syntax, and
> this To header does not.  The basic structure for this type of To header is
> "display-name <SIP-URI>".  However, if display-name is not quoted, it is
> restricted to being a "token", and "token" may not contain ":" or "@".  The
> text between <...> is supposed to be a SIP URI, but the ":" is replaced by
> "%3A", and there is no escaping defined for that position.  See section 25.1
> of RFC 3261 for the details.
>
> So until you correct the To header (who is generating it?) there is no
> reason to expect any SIP element to accept the request.
>
> Dale
>

---

From: "WORLEY, DALE R (DALE)" <[email-masked]>
Date: Thu, 18 Mar 2010 14:23:44 -0400

________________________________________
From: Nitin Kapoor [[email-masked]]

Request-Line: INVITE sip:[email-masked] SIP/2.0
Request-URI: sip:[email-masked]

Whereby in TO header(of the same INVITE) I do not have the “1” in user part as below.

To: sip:[email-masked]
______________________________________

Ugh, I think my mail system damaged your message.  And while the message of yours that I am replying to looks correct, I can see that the quoted lines above are damaged severely.  I just now edited them, but they may be damaged further before you see them.

Dale

---

From: Nitin Kapoor <[email-masked]>
Date: Thu, 18 Mar 2010 16:06:39 -0400

Anyhow i have resolved the issue by doing a digits manipulation.

Thanks everyone to help me on this.

Regards,
Nitin Kapoor