Koozali.org: home of the SME Server

Sail Class of Service

Offline dbiczo

  • 4
  • +0/-0
Sail Class of Service
« on: September 09, 2008, 10:29:29 AM »
I have just updated to sail-2.2.1-659 and some bugs in the web interface have been fixed in extensions when setting dialling restrictions thank you.

There still appears to be a bug on my system which prevents the calls being restricted during closed times. Calls are restricted anytime if I tick an Open Hours Dialling Restriction. Calls are not restriced at all if I tick a Closed Hours Dialling Restriction. I have one closed date segment set for the same time period everyday and it is recognised when I change a closed inbound route.

In both cases the agi sets the context to opencos. Here is the relevant debug line:
AGI Rx << SET CONTEXT 3002opencos

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail Class of Service
« Reply #1 on: September 09, 2008, 07:04:58 PM »
Thank you for this.

We will recreate and get back with you.

Kind Regards

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail Class of Service
« Reply #2 on: September 09, 2008, 07:20:13 PM »
Code looks good on the first pass.

Do you have your system in AUTO or in hard OPEN?

Do 'database show' at the asterisk console...  You should see..

Code: [Select]
/STAT/OCSTAT                                      : AUTO

If it is hard open you will see...
Code: [Select]
/STAT/OCSTAT                                      : OPEN
Set the system to automatic by doing *30* at any phone.  If the system is in AUTO then please let us know and we'll dig a bit further.

Kind Regards


Offline dbiczo

  • 4
  • +0/-0
Re: Sail Class of Service
« Reply #3 on: September 10, 2008, 12:50:30 AM »
Thank you for the prompt reply.

/STAT/OCSTAT is set to AUTO

I just tried a closed call restriction again and same problem. I also checked the selintra database and the open and closed restrictions for the extensions appear to being set correctly. The closed state is recognised when I set a closed inbound route and make a test call.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail Class of Service
« Reply #4 on: September 10, 2008, 03:26:33 AM »
here is a patch module for you to test....

At the linux console...

Code: [Select]
cd /var/lib/asterisk/agi-bin
mv selintra selintra-save
wget http://aelintra.com/selintra
chmod +x selintra

Restart asterisk and run your tests.

Kind Regards


Offline dbiczo

  • 4
  • +0/-0
Re: Sail Class of Service
« Reply #5 on: September 10, 2008, 04:19:36 AM »
Thanks for the patch. Unfortunately the bug persists. The debug output has changed though. It looks like the closed time is now being recognised by the script, however an open call restriction is still restricted even when the system is closed and a closed call restriction is still not restricted at all.

Here is the debug output:

Closed period with closed call restriction
Code: [Select]
    -- Executing [0403029xxx@internal:1] AGI("SIP/3001-08dd4078", "selintra|OutCos|0403029xxx") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: SIP/3001-08dd4078
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1221011030.5
AGI Tx >> agi_callerid: 3001
AGI Tx >> agi_calleridname: 3001
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 0403029xxx
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: internal
AGI Tx >> agi_extension: 0403029xxx
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << DATABASE GET "STAT" "OCSTAT"
AGI Tx >> 200 result=1 (AUTO)
AGI Rx << GET VARIABLE IFTIME(11:00-12:00|*|*|*?CLOSED:OPEN)
AGI Tx >> 200 result=1 (CLOSED)
AGI Rx << SET PRIORITY 1
AGI Tx >> 200 result=0
AGI Rx << SET EXTENSION 0403029xxx
AGI Tx >> 200 result=0
AGI Rx << SET CONTEXT 3001closedcos
AGI Tx >> 200 result=0
    -- AGI Script selintra completed, returning 0
    -- Executing [0403029xxx@3001closedcos:1] AGI("SIP/3001-08dd4078", "selintra|OutCluster|0403029xxx") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra

Closed period with open call restriction
Code: [Select]
    -- Executing [0403029xxx@internal:1] AGI("SIP/3001-08dbd420", "selintra|OutCos|0403029xxx") in new stack
    -- Launched AGI Script /var/lib/asterisk/agi-bin/selintra
AGI Tx >> agi_request: selintra
AGI Tx >> agi_channel: SIP/3001-08dbd420
AGI Tx >> agi_language: en
AGI Tx >> agi_type: SIP
AGI Tx >> agi_uniqueid: 1221011263.7
AGI Tx >> agi_callerid: 3001
AGI Tx >> agi_calleridname: 3001
AGI Tx >> agi_callingpres: 0
AGI Tx >> agi_callingani2: 0
AGI Tx >> agi_callington: 0
AGI Tx >> agi_callingtns: 0
AGI Tx >> agi_dnid: 0403029xxx
AGI Tx >> agi_rdnis: unknown
AGI Tx >> agi_context: internal
AGI Tx >> agi_extension: 0403029xxx
AGI Tx >> agi_priority: 1
AGI Tx >> agi_enhanced: 0.0
AGI Tx >> agi_accountcode:
AGI Tx >>
AGI Rx << DATABASE GET "STAT" "OCSTAT"
AGI Tx >> 200 result=1 (AUTO)
AGI Rx << GET VARIABLE IFTIME(11:00-12:00|*|*|*?CLOSED:OPEN)
AGI Tx >> 200 result=1 (CLOSED)
AGI Rx << SET PRIORITY 1
AGI Tx >> 200 result=0
AGI Rx << SET EXTENSION 0403029xxx
AGI Tx >> 200 result=0
AGI Rx << SET CONTEXT 3001closedcos
AGI Tx >> 200 result=0
    -- AGI Script selintra completed, returning 0
    -- Executing [0403029xxx@3001closedcos:1] PlayTones("SIP/3001-08dbd420", "congestion") in new stack
    -- Executing [0403029xxx@3001closedcos:2] Hangup("SIP/3001-08dbd420", "") in new stack
  == Spawn extension (3001closedcos, 0403029xxx, 2) exited non-zero on 'SIP/3001-08dbd420'

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail Class of Service
« Reply #6 on: September 10, 2008, 11:17:14 AM »
HI,

I think we've found this.  It was easier to fix in source and cut a release than to send you any more patch modules.

You can download -660 from the download site.  It should fix your problem.

Kind Regards

Offline dbiczo

  • 4
  • +0/-0
Re: Sail Class of Service
« Reply #7 on: September 10, 2008, 01:22:12 PM »
It looks like you have nailed the problem with the new release. Thank you very much.

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Sail Class of Service
« Reply #8 on: September 10, 2008, 01:46:45 PM »
Thanks for taking the time to help with the diagnosis

Kind Regards