I'm having an issue trying to use the construct show in the module documentation.
The docs show: while(mq_fetch("myq")) { xlog("$mqk(myq) - $mqv(myq)\n"); }
And I'm doing essentially the same thing (differently named mqueue, but otherwise identical), but invariably I get this in the logs: ERROR: <core> [action.c:1388]: ERROR: runaway while (559, 28): more then 100 loops
Am I doing something wrong, or is mq_fetch not returning appropriate values for successful versus failed fetches? This is on Kamailio 3.1.4, FWIW.
Regards, - Brad
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
On 06/28/2011 05:36 PM, Watkins, Bradley wrote:
I'm having an issue trying to use the construct show in the module documentation.
The docs show: while(mq_fetch("myq")) { xlog("$mqk(myq) - $mqv(myq)\n"); }
And I'm doing essentially the same thing (differently named mqueue, but otherwise identical), but invariably I get this in the logs: ERROR:<core> [action.c:1388]: ERROR: runaway while (559, 28): more then 100 loops
I reported this back in October:
http://lists.sip-router.org/pipermail/sr-users/2010-October/065740.html
A fix was committed to the master branch almost immediately:
http://lists.sip-router.org/pipermail/sr-dev/2010-October/009499.html
I requested that it be backported into the 3.1 branch in May and it was done:
http://lists.sip-router.org/pipermail/sr-dev/2011-May/011132.html
However, I don't know that it's made it into the tarballs yet. You can get the 3.1 branch with the fix by doing this:
git clone git://git.sip-router.org/sip-router -b 3.1
Otherwise, here's the workaround I was using before:
while(mq_fetch("myq")) { ...
if(!defined $mqk(myq)) break;
... }
Cheers,
-- Alex
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users- bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Tuesday, June 28, 2011 5:42 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] mq_fetch and while loops
I reported this back in October:
http://lists.sip-router.org/pipermail/sr-users/2010-October/065740.html
A fix was committed to the master branch almost immediately:
http://lists.sip-router.org/pipermail/sr-dev/2010-October/009499.html
I requested that it be backported into the 3.1 branch in May and it was done:
http://lists.sip-router.org/pipermail/sr-dev/2011-May/011132.html
However, I don't know that it's made it into the tarballs yet. You can get the 3.1 branch with the fix by doing this:
git clone git://git.sip-router.org/sip-router -b 3.1
Otherwise, here's the workaround I was using before:
while(mq_fetch("myq")) { ... if(!defined $mqk(myq)) break; ... }
Cheers,
-- Alex
Excellent, thanks for the quick response!
Regards, - Brad
Just a correction to my previous statement: Apparently I was incorrect and I was running Kamailio 3.1.3 and not 3.1.4. I have installed 3.1.4 and it seems this fix is indeed in a released version now.
Regards, - Brad
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it.
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users- bounces@lists.sip-router.org] On Behalf Of Watkins, Bradley Sent: Tuesday, June 28, 2011 5:54 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] mq_fetch and while loops
you received it in error please notify us immediately and
then destroy it.
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users- bounces@lists.sip-router.org] On Behalf Of Alex Balashov Sent: Tuesday, June 28, 2011 5:42 PM To: sr-users@lists.sip-router.org Subject: Re: [SR-Users] mq_fetch and while loops
I reported this back in October:
http://lists.sip-router.org/pipermail/sr-users/2010-October/065740.htm l
A fix was committed to the master branch almost immediately:
http://lists.sip-router.org/pipermail/sr-dev/2010-October/009499.html
I requested that it be backported into the 3.1 branch in May and it was done:
http://lists.sip-router.org/pipermail/sr-dev/2011-May/011132.html
However, I don't know that it's made it into the tarballs yet. You can get the 3.1 branch with the fix by doing this:
git clone git://git.sip-router.org/sip-router -b 3.1
Otherwise, here's the workaround I was using before:
while(mq_fetch("myq")) { ... if(!defined $mqk(myq)) break; ... }
Cheers,
-- Alex
Excellent, thanks for the quick response!
Regards,
- Brad
Hi all,
Is it possible to autochange gateway's state from pending to active after gw get up ?
http://www.kamailio.org/docs/modules/1.4.x/dispatcher.html says only about ping caused autochange state from active to pending, but nothing about change gw's state back.
In the later versions, you could use the following parameter:
3.23. ds_probing_mode (int)
Controls what gateways are tested to see if they are reachable. If set to 0, only the gateways with state PROBING are tested, if set to 1, all gateways are tested. If set to 1 and the response is 408 (timeout), an active gateway is set to PROBING state.
Default value is “0”.
Example 1.24. Set the “ds_probing_mode” parameter
... modparam("dispatcher", "ds_probing_mode", 1) ...
In this case, the Dispatcher module would send a OPTIONS-request to all the gateways and if it replies with a "200 OK", enable them again....
Carsten
2011/6/29 vaad.fabi@gmail.com vaad.fabi@gmail.com:
Hi all,
Is it possible to autochange gateway's state from pending to active after gw get up ?
http://www.kamailio.org/docs/modules/1.4.x/dispatcher.html says only about ping caused autochange state from active to pending, but nothing about change gw's state back.
-- Vadim F.
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