Hi!
During REGISTER processing I call add_path_received() in the outbound proxy.
Now if the INVITE is routed from main proxy to the client (via the OBP), the OBP as to read the received parameter from the Ruote header and use this value as destination URI. Is there a function available to perfomr this action or do I have to do it manually (parsing Route header to the get parameter)?
thanks klaus
2009/4/7 Klaus Darilion klaus.mailinglists@pernau.at:
Hi!
During REGISTER processing I call add_path_received() in the outbound proxy.
Now if the INVITE is routed from main proxy to the client (via the OBP), the OBP as to read the received parameter from the Ruote header and use this value as destination URI. Is there a function available to perfomr this action or do I have to do it manually (parsing Route header to the get parameter)?
I don't remember now how exactly Path works, but AFAIR Path is only useful for registration. Later when the registrar receives an INVITE for that user, it extracts the Path from the location database and generates a Route with it:
Alice OBP Proxy/Registrar Bob
----- REGISTER ---> ---- REGISTER + Path -->
<----- INVITE -------- <---- INVITE ------ <----- INVITE + Route --
Am I wrong?
Iñaki Baz Castillo schrieb:
2009/4/7 Klaus Darilion klaus.mailinglists@pernau.at:
Hi!
During REGISTER processing I call add_path_received() in the outbound proxy.
Now if the INVITE is routed from main proxy to the client (via the OBP), the OBP as to read the received parameter from the Ruote header and use this value as destination URI. Is there a function available to perfomr this action or do I have to do it manually (parsing Route header to the get parameter)?
I don't remember now how exactly Path works, but AFAIR Path is only useful for registration. Later when the registrar receives an INVITE for that user, it extracts the Path from the location database and generates a Route with it:
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. If Alice is behind NAT and sends the private IP address in the Contact header, then the OBP can not route the request to Alice.
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.
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?
regards klaus
Am I wrong?
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 :)
Hi Klaus,
modparam("path", "use_received", 1) set on the OBP should do the trick.
Andreas
Klaus Darilion wrote:
Hi!
During REGISTER processing I call add_path_received() in the outbound proxy.
Now if the INVITE is routed from main proxy to the client (via the OBP), the OBP as to read the received parameter from the Ruote header and use this value as destination URI. Is there a function available to perfomr this action or do I have to do it manually (parsing Route header to the get parameter)?
thanks klaus
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users