[Kamailio-Users] SIP Re-Routing using Private Header

Iñaki Baz Castillo ibc at aliax.net
Sun Mar 8 16:34:59 CET 2009


2009/3/7 Geoffrey Mina <geoffreymina at gmail.com>:

> P-Forward-URL: bob at 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 at aliax.net>



More information about the Users mailing list