2009/3/7 Geoffrey Mina <geoffreymina(a)gmail.com>om>:
P-Forward-URL: bob(a)somedomain.com
Use the estandar "Route" header instead of a custom one. You will need
no code in Kamailio to handle it (it wll be done automatically):
When a proxy receives a request with a Route header:
- It must inspect if the URI into the Route header is the proxy
itself. If so, remove it and route the request based on the following
Route header (if present) or on the RURI. If there is no Route header
then route the request based on the RURI.
if(is_present_hf("P-Forward-URL")){
//what do i do here to rewrite the To and INVITE parts before doing
record_route() and t_relay()
}
You don't need it, just do loose_route() and insert before Route
header (in Asterisk) with an URI poinitng to the gateway address.
Maybe I'm totally off track here, but this is all
I have come up with
so far! Perhaps there is a mechanism in SIP which already allows me
to do this, and I don't know about it... I don't know what I don't
know :)
Yes, there is: Route header :)
--
Iñaki Baz Castillo
<ibc(a)aliax.net>