[SR-Users] Using forward(); with PVs

Alex Balashov abalashov at evaristesys.com
Sat Jan 28 18:40:08 CET 2012


On 01/28/2012 12:35 PM, Spencer Thomason wrote:

> I'm experiencing some difficulty using forward with PVs. If the IP
> and port are specified directly everything works but if I use PVs
> for the values startup fails with a configuration error. What I'm
> trying to do is statelessly forward an OPTIONS request to a B2BUA
> that sits behind Kamailio without hard coding the address into the
> configuration file. Is there a better way to accomplish this?

Yet another quirk;  many legacy core functions do not support PV 
arguments, because they hark back to the days before PVs existed.  :-)

Just use the request URI to guide the request:

    $rd = "xxx.xxx.xxx.xxx";
    $rp = 5060;

    forward();

Like t_relay(), by default, forward() will consume the RURI for 
routing on the network and transport level as well.

-- 
Alex Balashov - Principal
Evariste Systems LLC
260 Peachtree Street NW
Suite 2200
Atlanta, GA 30303
Tel: +1-678-954-0670
Fax: +1-404-961-1892
Web: http://www.evaristesys.com/



More information about the sr-users mailing list