Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIP registration check seems not to work #4

Open
JanRSimon opened this issue Sep 24, 2013 · 0 comments
Open

SIP registration check seems not to work #4

JanRSimon opened this issue Sep 24, 2013 · 0 comments

Comments

@JanRSimon
Copy link

Dear Nico,

first thanks a lot for this script!

I've tried your script on an old Elastix 2.0.3 and 2.2. (x86, Perl 5.8.0.8) The SIP registry check seems to be not working as expected for me. But peers and others do.

On my boxes the refresh times varying from 105 so I cut it out to have the following code lines.

} elsif ($asterisk_command_tag eq "registry") {

foreach (`$asterisk_bin $asterisk_option \"$asterisk_command\"`) {

    if (/Username/) {
        next;
    }
    if (/registrations./) {
        next;
    }
    if (!/Registered/) {
        $return = $STA_CRITICAL;
        $output = "Trunk NOT OK";
        next;
    }
    $return = $STA_OK;
    $output = "Trunk OK\n";
}    

From my understanding the nagisk script initiates the sip show registry command, catches the output and compares line by line.
If it finds "Username" it goes to the next line (found in the first line)
If it finds "registrations." it goes to the next line (found in the last line)
If it doesn't find "Registered" it should output Trunk NOT OK.

When I run the script it always keep saying Trunk NOT OK even all trunks show up when I check it myself (sip show registry).

Do I misunderstand the script and forgot to change other parameters or did I stumble upon a bug?

Thanks a lot!
Jan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant