ds_select_dst() sets the outbound proxy address. There is an internal attribute that is used when sending the request. ds_select_domain() rewrites the domain part of request URI.
Could you watch the network (ngrep -qt port 4050 on openser box) too see what is happening with the messages? Also, do you get any error in the syslog file (/var/log/syslog or /var/log/messages)?
The way you use the dispatcher is ok.
Cheers, Daniel
On 02/03/06 00:48, Anders Brownworth wrote:
Daniel,
I noticed a few posts on the OpenSER Users' list and thought I'd shoot you a question directly as my subscription to the list doesn't seem to be taking yet.
I want to distribute SIP calls across a number of servers. (similar to a load balancer) I intend to use the CallId hash algorithm to keep subsequent messages going to the same server.
I (like many others) am still trying to understand the dispatcher module. Working off of the example configuration and running OpenSER version 1.0.0, I have:
... modparam( "dispatcher", "list_file", "/usr/local/etc/openser/dispatcher.list" ) #modparam( "dispatcher", "force_dst", 1 )
route { if ( ! mf_process_maxfwd_header( "10" ) ) { sl_send_reply( "483", "To Many Hops" ); drop( );
}; ds_select_dst( "1", "0" ); #ds_select_domain( "1", "0" ); forward( uri:host, uri:port ); #t_relay( );
}
I have not been able to get it to do what I'm expecting.
I have two different IPs in the dispatcher.list file and am expecting the OpenSER instance to send an INVITE out to one of those IPs. With debugging on a high level, I see the dispatcher module internally pick one of those IPs but there is no attempt to send out an INVITE. Throwing the t_relay( ) of course replies with a 100 trying, but still no INVITE is sent out to one of the IPs in the destination set.
Not really understanding the difference between ds_select_dst() and ds_select_domain(), I tried ds_select_domain() with no change in results. (both with and without t_relay()) I understand that ds_select_destination() rewrites host and port, but then what does ds_select_dst() do exactly? Why would you ever want to use ds_select_dst()? It says ds_select_dst() "selects a destination from the address set". Great, so then what does it do with that destination? I am unclear on exactly what you are changing in the request by running each of these functions. Can you clear that up for me?
Then, once you get a destination, how do you tell OpenSER to send out an INVITE to the destination server? Or does it not work this way?
I also saw some talk about how ds_select_dst() "sets the destination as outbound proxy" but how does that differ from the host / port rewrite? I think I'm missing something here...
My intent is to run a stateless distributer so I can massively scale the front end of my setup. I don't think the tm module is an option for what I want to do because scale is going to be key.
I saw a mention of the lcr module but haven't taken a closer look at that yet. I'd like to get this going as it seems like a very clean and simple way to accomplish my goal.
Any help you could provide would be much appreciated.
Thanks,
-Anders