2010/6/25 Geoffrey Mina <geoffreym...@gmail.com>:
> OK, I am running into some errors when starting my script:
>
> if(to_gw("1")){
>     force_send_socket(X.X.X.180:5060);
> }else if(to_gw("3")){
>     force_send_socket(X.X.X.179:5060);
> }else if(to_gw("4")){
>     force_send_socket(X.X.X.189:5060);
> }
>
> Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]:
> ERROR:core:pv_parse_spec: bad parameters
> Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]:
> ERROR:core:fixup_pvar: parsing of pseudo variable 1 failed!
> Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]:
> ERROR:core:fix_actions: fixing failed (code=-1) at cfg line 348
> Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]:
> CRITICAL:core:fix_expr: fix_actions error
> Jun 25 16:45:14 atl-sipgateway1 /usr/local/sbin/kamailio[15942]:
> ERROR:core:main: failed to fix configuration with err code -1
>
>
> Perhaps I an confused about how the to_gw() function of the LCR module is to
> be used.  In my "gw" table, I have gateways with grp_id 1, 3, and 4.  I am
> assuming that is the value I should be checking for in the to_gw() function,
> but it seems to be expecting a pseudo variable or something.

Theorically (according to the LCR documentation), "to_gw()" must be
used when processing in-dialog requests. However I'm not sure of the
cause of your error, which is exactly the line 384 in your script?

Anyhow I suggest you a different approach:

- Set a different flag for each gw (in LCR 'gw' table) depending on
the sending socket that must be used.
- After calling 'next_gw()' inspect the value of the gw flags (stored
in a configured AVP) and choose which 'force_send_socket()' to use.


-- 
Iñaki Baz Castillo
<i...@aliax.net>

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to