El Martes 07 Abril 2009, Klaus Darilion escribió:
Alice
OBP Proxy/Registrar Bob
----- REGISTER ---> ---- REGISTER + Path -->
<----- INVITE --------
<---- INVITE ------ <----- INVITE + Route --
^^^^^^
Here at this point the OBP forwards the request to Alice based on the
RURI. The RURI is the URI which Alice provided in the Contact header of
the REGISTER.
I understand your point.
BTW, couldn't the OBP change the REGISTER Contact address?
This is:
Alice NAT OBP Proxy/Registrar Bob
----(1) REGISTER -> --(2)- REGISTER + Path -->
<----- INVITE --------
<---(4)- INVITE --- <--(3)- INVITE + Route ---
(1)
REGISTER sip:...
Contact: <sip:alice@ALICE_PRIVATE_IP>
(2)
REGISTER sip:...
Contact: <sip:alice@ALICE_PUBLIC_IP>
Path: <sip:OBP>
(3)
INVITE sip:alice@ALICE_PUBLIC_IP
Route: <sip:OBP>
(4)
INVITE sip:alice@ALICE_PUBLIC_IP
Thus, there is the option to add the received
parameter to the Path
header. Then the OBP can derive the public IP:port from the received
paramter in the Route header.
Yes, that would be the most ellegant solution since it would allow the OBP
setting the destination URI:
$du = "sip:ALIC_PUBLIC_IP"
and creating an INVITE as follows:
INVITE sip:alice@ALICE_PRIVATE_IP
In this way, Alice would receive an INVITE with RURI matching *exactly* the
Contact she used during registration.
The question now is: Do I have to manually parse the
route header,
extract the received parameter and set $du, or is there somewhere a
function which does this all?
Good question! :)
However, I expect you can use the string transformations to parse it.
Interesting subject :)
--
Iñaki Baz Castillo <ibc(a)aliax.net>