[Kamailio-Devel] "kamctl fifo wrong_command" should reply Bash error (!= 0)

Iñaki Baz Castillo ibc at aliax.net
Mon Mar 16 13:00:23 CET 2009


2009/3/16 Henning Westerholt <henning.westerholt at 1und1.de>:
> On Monday 16 March 2009, Iñaki Baz Castillo wrote:
>> Hi, if I run:
>>
>> ~#  kamctl fifo blablabla
>>
>> I get:
>>
>> 500 command 'blabla' not available
>>
>> but $? is 0.
>>
>> I think the script returned code should be an error (i.e. 1). Opinions?
>
> Hi Iñaki,
>
> sure, this would be great. I also thought about this in the past and spent a
> bit time on it. A problem is that the structure of this control scripts are a
> bit convoluted. :-) The output is processed by some stages, the kamctl
> imports some helper, the actual execution happens in kamctl.fifo, the
> helper .base runs this filter_fl (AWK stuff) on the output..

Basically it the MI reply is [3456]XX then the script should reply !=
0. I expect that "kamctl fifo" gets the final reply as a single string
so parsing the first value of the string to match [3456]XX should be
feasible. Am I right?

-- 
Iñaki Baz Castillo
<ibc at aliax.net>



More information about the Devel mailing list