<HTML>
<HEAD>
<TITLE>Re: [OpenSER-Users] LCR Module / Function: load_gws() error</TITLE>
</HEAD>
<BODY>
<FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Answered my own question . . <BR>
<BR>
In function fixstringloadgws in /modules/lcr/lcr_mod.c . .<BR>
<BR>
if(str2int(&s, (unsigned int*)&model->spec.pvp.pvn.u.isname.name.n)!=0<BR>
|| model->spec.pvp.pvn.u.isname.name.n<100) {<BR>
<BR>
As called by:<BR>
<BR>
static cmd_export_t cmds[] = {<BR>
{"load_gws", load_gws, 0, 0, 0, REQUEST_ROUTE},<BR>
{"load_gws", load_gws_grp, 1, fixstringloadgws, 0,<BR>
REQUEST_ROUTE},<BR>
{"next_gw", next_gw, 0, 0, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE},<BR>
{"from_gw", from_gw, 0, 0, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},<BR>
{"from_gw", from_gw_grp, 1, fixup_str2int, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE},<BR>
{"to_gw", to_gw, 0, 0, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE},<BR>
{"to_gw", to_gw_grp, 1, fixup_str2int, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE},<BR>
{"load_contacts", load_contacts, 0, 0, 0,<BR>
REQUEST_ROUTE},<BR>
{"next_contacts", next_contacts, 0, 0, 0,<BR>
REQUEST_ROUTE | FAILURE_ROUTE},<BR>
{0, 0, 0, 0, 0, 0}<BR>
};<BR>
<BR>
I was using values under 100, as the default value in the docs is “1”. When I set the group ids at 100 or higher, it works just fine.<BR>
<BR>
Hate to answer my own questions, but thought I should so we can update the docs.<BR>
<BR>
- Darren<BR>
<BR>
<BR>
On 5/1/08 2:48 PM, "Darren Sessions" <dsessions@icidirect.net> wrote:<BR>
<BR>
</SPAN></FONT></FONT><BLOCKQUOTE><FONT SIZE="4"><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Question . . <BR>
<BR>
I’m trying to use the load_gws with a particular group id per the docs for 1.3, and am getting the following error message when I try and start OpenSER:<BR>
<BR>
May 1 20:40:05 [16853] DBG:core:fix_actions: fixing load_gws, line 487<BR>
May 1 20:40:05 [16853] ERROR:lcr:fixstringloadgws: Wrong value <2> for param <1>!<BR>
May 1 20:40:05 [16853] ERROR:core:fix_actions: fixing failed (code=-1) at cfg line 487<BR>
May 1 20:40:05 [16853] CRITICAL:core:fix_expr: fix_actions error<BR>
May 1 20:40:05 [16853] ERROR:core:main: failed to fix configuration with err code -1<BR>
May 1 20:40:05 [16853] INFO:snmpstats:mod_destroy: The SNMPStats module got the kill signal<BR>
May 1 20:40:05 [16853] INFO:snmpstats:mod_destroy: Shutting down the AgentX Sub-Agent!<BR>
May 1 20:40:05 [16853] DBG:xlog:destroy: destroy module...<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: tm_shutdown : start<BR>
May 1 20:40:05 [16853] DBG:tm:unlink_timer_lists: emptying DELETE list<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: emptying hash table<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: releasing timers<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: removing semaphores<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: destroying callback lists<BR>
May 1 20:40:05 [16853] DBG:tm:tm_shutdown: tm_shutdown : done<BR>
May 1 20:40:05 [16853] DBG:core:shm_mem_destroy: <BR>
May 1 20:40:05 [16853] DBG:core:shm_mem_destroy: destroying the shared memory lock<BR>
<BR>
<BR>
Am I missing something? Per the docs at <a href="http://www.openser.org/docs/modules/1.3.x/lcr.html#AEN303">http://www.openser.org/docs/modules/1.3.x/lcr.html#AEN303</a> , I should be able to use a particular gateway group id in that function.<BR>
<BR>
My config code excerpt:<BR>
<BR>
if (from_gw("1000")) { <BR>
xlog("L_ERR", "Route 14: Call originating from incoming vendor\n");<BR>
if (!load_gws("2")) {<BR>
xlog("L_ERR", "Route 14: Error loading gateways (GW Group 2) - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<BR>
sl_send_reply("503", "Termination Currently Unavailable");<BR>
exit;<BR>
}<BR>
if (!next_gw()) {<BR>
xlog("L_ERR", "Route 14: No gateways available (GW Group 2) - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");<BR>
sl_send_reply("503", "Termination Currently Unavailable");<BR>
exit;<BR>
}<BR>
setflag(21);<BR>
t_on_failure("1");<BR>
route(10);<BR>
}<BR>
<BR>
<BR>
Basically, it’s checking to see if the call is originating from one of the incoming gateways in group id 1000, and if it is, I’d like to pull a gateway from group 2 and send the call to it.<BR>
<BR>
<BR>
Any help would be appreciated.<BR>
<BR>
Thanks,<BR>
<BR>
- Darren<BR>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>