[SR-Users] append_branch and tls

James Cloos cloos at jhcloos.com
Mon Aug 21 22:40:59 CEST 2017


>>>>> Daniel-Constantin Mierla <miconda at gmail.com> writes:

> do you need to insert Route headers? Or just set R-URI with a specific
> transport such as tcp or tls?

My current code does things like:

     append_hf("P-Original-IP: $pr $si $sp \r\n");
     append_urihf("CC-Diversion: ", "\r\n");
     setuser("agent99");
     t_relay_to_tls("nexthop.example.net", "5061");

The goal is to return a prioritized list of username,host,protocol
tuples and call rewrite_ruri() for the highest priority tuple followed
by append_branch for each subsequent tuple in the set.  And then let
tm handle trying each tuple until one works.  The two append_ calls
are expected to remain.

I'll be doing a sql call which will return one such tuple per row.

Most of the tuples will specify tls, but a subset will need tcp or udp.
Or *maybe* even sctp or wss.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 0x997A9F17ED7DAEA6



More information about the sr-users mailing list