[Users] dispatcher module and rewritehost vs forward

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed May 31 11:12:33 CEST 2006


Hi,

if you want to bring the selected destination in RURI instead of 
dst_uri, use ds_select_domain() instead of ds_select_dst(). See:
    http://openser.org/docs/modules/1.1.x/dispatcher.html#AEN177

regards,
bogdan

Script Head wrote:

> My question was about the use of rewritehostport in conjunction with 
> the dispatcher module.
>
> I see the syntax that's required by rewritehostport yet I am strugging 
> to understand how to take the result set of the dispatcher 
> ds_select_dst command and pass it to the rewritehostport. For some 
> reason I thought that uri:host and uri:port where the resulting 
> variables out of ds_select_dst, no?
>
>
>
> On 5/30/06, *Bogdan-Andrei Iancu* <bogdan at voice-system.ro 
> <mailto:bogdan at voice-system.ro>> wrote:
>
>     Hi,
>
>     first of all t_on_reply("1"); is useless since you do stateless
>     forward
>     and that functionality may be used only in a stateful context.
>
>     and yes, the syntax is wrong. See
>
>     http://openser.org/dokuwiki/doku.php?id=openser_core_cookbook#rewritehost_sethost
>
>     regards,
>     bogdan
>
>     Script Head wrote:
>
>     > I have the following in my config, which works...
>     > now if I comment forward and comment out rewritehost I get
>     errors. Am
>     > I not using the correct syntax?
>     >
>     > route[5] {
>     >
>     >         #
>     > -----------------------------------------------------------------
>     >         # PSTN Handler
>     >         #
>     > -----------------------------------------------------------------
>     >
>     >         t_on_reply("1");
>     >
>     >         # do load balancing
>     >         ds_select_dst("1","4");
>     >         sl_send_reply("100","Trying");
>     >
>     >         #rewritehost(uri:host);
>     >         forward(uri:host,uri:port);
>     >
>     >         route(4);
>     >         route(1);
>     > }
>     >
>     >------------------------------------------------------------------------
>
>     >
>     >_______________________________________________
>     >Users mailing list
>     >Users at openser.org <mailto:Users at openser.org>
>     > http://openser.org/cgi-bin/mailman/listinfo/users
>     >
>     >
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Users mailing list
>Users at openser.org
>http://openser.org/cgi-bin/mailman/listinfo/users
>  
>





More information about the sr-users mailing list