[OpenSIPS-Users] call_control module problem

Dan Pascu dan at ag-projects.com
Fri Jun 19 10:05:19 CEST 2009


On 19 Jun 2009, at 04:30, Konstantin wrote:

> Hi there!
>
> I have this piece in the config script:
>
> ...
> call_control();
> xlog("=== call_control: $$retcode = $retcode\n");
> switch ($retcode) {
>    case 2:
>        xdbg("=== call_control: Call with no limit\n");
>        break;
>    case 1:
>        xdbg("=== call_control: Call has limit and is under  
> callcontrol management\n");
>        break;
> ...
>
>
> And something like this I have in the debug output:
>
> Jun 19 01:03:21 [2058] ERROR:call_control:send_command: did timeout  
> waiting for an answer
> === call_control: $retcode = 4294967291
> === call_control: Call has limit and is under callcontrol management
>
>
> So why 4294967291 works like "case 1" ("under callcontrol  
> management")  in case of timeout on
> external application?
>

Because $retcode has to be used right after the function that  
generated it. xlog is a function as well and it'll generate its own  
return code when called, overwriting the previous value.

> I would like to have "Internal server error" in case of timeout.
>
>
>
>
>
>
>
> -- 
> Konstantin
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan






More information about the Users mailing list