Subject: To header for a proxied call

From: Shail Bhatnagar <[email-masked]>
Date: Thu, 08 Jul 1999 12:36:31 -0400

If a gateway is generating an INVITE message ( it is configured to send
all INVITEs to a proxy), what should be the value of To header ??
The request-URI looks like this  ( it is calling the number 9195551212
and proxy's IP address is 1.2.3.4)

INVITE sip:[email-masked] SIP/2.0

-- 
Best regards,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 08 Jul 1999 14:21:31 -0400

I believe the To field should probably be a phone URL:

To: tel:9195551212

In fact, its arguable whether the request URI should also be a phone
URL:

INVITE tel:9195551212 SIP/2.0
To: tel:9195551212

The tel URL basically would mean "I want to call this number, but I
don't know or care what host to reach it from", and the sip URL "I want
to call this number, accessible through a SIP UAS at the given host".
The job of a proxy (perhaps running GLP) would be to translate the phone
URL tel:9195551212 into a SIP URL for the next hop server:
sip:[email-masked].

-Jonathan R.

-- 
Jonathan D. Rosenberg                       Lucent Technologies
Member of Technical Staff                   101 Crawfords Corner Rd.
High Speed Networks Research                Holmdel, NJ 07733
FAX:   (732) 834-5379                       Rm. 4C-526
EMAIL: [email-masked]
URL: http://www.cs.columbia.edu/~jdrosen

---

From: "Adam B. Roach" <[email-masked]>
Date: Thu, 8 Jul 1999 13:52:01 -0500 (CDT)

>INVITE sip:[email-masked] SIP/2.0

It sounds like you're trying to describe a firewall proxy or something
similar (where all requests from a given client go through the same
proxy). If so, your example is incorrect.

In this case, let's assume you're trying to call [email-masked],
and your proxy is set as 1.2.3.4. Your request would look something
like:

INVITE sip:[email-masked] SIP/2.0
From: Shail Bhatnagar <sip:[email-masked]>
To: Socks Clinton <sip:[email-masked]>

BUT you would send this request to the machine 1.2.3.4. The request
will not reflect this value anywhere.

I can't tell if this is the answer to your question, or if the "proxy"
you described above is more of a PSTN gateway.  In any case, the
value of "To:" is not terribly important except for message
correlation. The real destination on any given machine is taken
from the request-URI.

--
Adam Roach, Ericsson Inc. |  Ph: +1 972 583 7594 | 1010 E. Arapaho, MS L-04
[email-masked]   | Fax: +1 972 669 0154 | Richardson, TX 75081 USA

---

From: Shail Bhatnagar <[email-masked]>
Date: Thu, 08 Jul 1999 15:26:42 -0400

My gateway is a gateway - it can talk to PSTN and the IP world. You can
assume that in the example I quoted, the routing intelligence is in the
proxy server - he will figure out where the phone number is located. 
 
Any interoperability issues with using the tel: URL ?

Thanks,
Shail

---

From: "Daniel G. Petrie" <[email-masked]>
Date: Thu, 08 Jul 1999 17:26:16 -0400

Sorry, but I read this differently than Adam or Jonathan.  Perhaps Shail
can clearify this.  I saw this as a corporate environment with a PSTN
gateway and a proxy filling the roll of corporate PBX.  My phone registers
as user: 9195551212 and user: dpetrie  (Alternately the proxy may be
configured with user aliases, etc.).  In this environment I believe that it
is perfectly valid to send the following sip message to the proxy:

INVITE sip:[email-masked] SIP/2.0
To: sip:[email-masked]
...

The proxy could in turn send the following message to my phone (ip address
1.2.3.222):

INVITE sip:[email-masked] SIP/2.0
To: sip:[email-masked]
...

or depending on the registration, proxy configuration, etc. :

INVITE sip:[email-masked] SIP/2.0
To: sip:[email-masked]
...

---

From: Shail Bhatnagar <[email-masked]>
Date: Thu, 08 Jul 1999 17:46:17 -0400

Daniel, Let us proceed with what you said. 

Original INVITE to proxy :
INVITE sip:[email-masked] SIP/2.0
To: sip:[email-masked]
From: sip:[email-masked]

Proxy rewrites request-URI and sends INVITE to terminating gateway :
INVITE sip:[email-masked] SIP/2.0
To: sip:[email-masked]
From: sip:[email-masked]

The call is setup, the 2 parties talk and the called party hangs up -
terminating gateway send a BYE to the proxy. The terminating gateway
would flip the From and To fields and do they make sense ??

I don't have the exact picture of  using a proxy for sending out
INVITE messages, but I as I said in response to Adam's mail, it is 
possible that routing intelligence is in the proxy server. Actually 
their could all flavours of outbound calls ( for example based on
called number) - 
1) to redirect server
2) to proxy server
3) to terminating gateway

Regards,
Shail

---

From: Jonathan Rosenberg <[email-masked]>
Date: Thu, 08 Jul 1999 23:48:57 -0400

> would flip the From and To fields and do they make sense ??

Sure they make sense. Flipping the To and From is done regardless of
whether the URI contains an IP address or a hostname or a domain. Think
of the IP addresses playing a similar role to domain names in this case,
like isi.edu. 

-Jonathan R.

---

From: Sudipto Mukherjee <[email-masked]>
Date: Fri, 9 Jul 1999 09:42:46 -0400 (EDT)

The problem with this scenario is that the Originating Gateway makes an 
assumption that the called party's (9195551212) SIP address is same as 
that of the Proxy server (1.2.3.4). This results in an incorrect
To header (To: sip:[email-masked]). 

So in the scenario where the called party hangs up, the from header in
the BYE would look this - From:sip:[email-masked]. 

The question is how should the proxy deal with this BYE as it has a wrong
>From header. Does the proxy need to look at the From field to process the
message ?

Thanks
Sudipto

---

From: Jonathan Rosenberg <[email-masked]>
Date: Fri, 09 Jul 1999 10:03:20 -0400

> >From header. Does the proxy need to look at the From field to process the

It needs the To, From, Call-ID and CSeq to serve as a unique key to the
transaction state. For this function, the From field could be an
arbitrary random number and it would make no difference. Call routing is
done based on the request URI. So, From field has no impact on this. A
server is free, of course, do perform any other policy decisions based
on the fields in the headers as it sees fit. Nothing would prevent a
proxy from rejecting calls based on the From field (as a screening
service, for example). 

So, putting this "wrong From header" is fine; its not wrong at all.
Probably it would be even better to put a tel URL in the From field, but
it won't make any real difference on processing or routing.

The only impact it has is on configuration of the proxy; as its working
as a local proxy for gateways which insert the proxy address in this
fashion, it should be prepared to receive INVITE's with addresses in
this form.

-Jonathan R.