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

NodeController ExpectAtleast Hangup #26

Open
iamacarpet opened this issue Sep 8, 2014 · 0 comments
Open

NodeController ExpectAtleast Hangup #26

iamacarpet opened this issue Sep 8, 2014 · 0 comments

Comments

@iamacarpet
Copy link

Hello,

I seem to be having an issue with the NodeController when setting up a node to accept a range of input lengths, for e.g. using:

->expectAtleast(2)
->expectAtMost(3)

I've also got a function registered I'd expect it to go to:

$self =& $this;
$this->cont->registerResult('verifyMenu')->onMaxAttemptsReached()->execute(function() use ($self) { $self->_fail(); });

If the user tries and input that's too long, or just doesn't enter anything, it goes to that function successfully - but if they enter something but it's not long enough to meet the minimum, it just hangs up.

To get around this, I've had to replace expectAtleast(7) with

->validateInputWith(
   'option',
      function(Node $node) {
         return strlen( $node->getInput() ) >= 7 ? true : false;
      })

I'll try and pin down what's causing this, but in the meantime, asterisk logs:

[Sep  8 10:43:17]  /home/callcentrepagi/agi_entry.php: Going to CS Verify Menu
[Sep  8 10:43:17]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,NodeController: extOrderVerify: unknown -> 56999999444214441: Running verifyMenu)
[Sep  8 10:43:17]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: streamFile(/home/a1audio/extension_orderverify_numberPrompt,0123456789*#))
[Sep  8 10:43:17]     -- Playing '/home/a1audio/extension_orderverify_numberPrompt' (escape_digits=0123456789*#) (sample_offset 0)
[Sep  8 10:43:20] DTMF[23980]: channel.c:4151 __ast_read: DTMF begin '4' received on SIP/A1General-000002d5
[Sep  8 10:43:20] DTMF[23980]: channel.c:4155 __ast_read: DTMF begin ignored '4' on SIP/A1General-000002d5
[Sep  8 10:43:20] DTMF[23980]: channel.c:4066 __ast_read: DTMF end '4' received on SIP/A1General-000002d5, duration 220 ms
[Sep  8 10:43:20] DTMF[23980]: channel.c:4135 __ast_read: DTMF end passthrough '4' on SIP/A1General-000002d5
[Sep  8 10:43:20]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: verifyMenu: Reading Digit #: 2)
[Sep  8 10:43:20]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: waitDigit(5000))
[Sep  8 10:43:20] DTMF[23980]: channel.c:4151 __ast_read: DTMF begin '5' received on SIP/A1General-000002d5
[Sep  8 10:43:20] DTMF[23980]: channel.c:4155 __ast_read: DTMF begin ignored '5' on SIP/A1General-000002d5
[Sep  8 10:43:21] DTMF[23980]: channel.c:4066 __ast_read: DTMF end '5' received on SIP/A1General-000002d5, duration 140 ms
[Sep  8 10:43:21] DTMF[23980]: channel.c:4135 __ast_read: DTMF end passthrough '5' on SIP/A1General-000002d5
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: verifyMenu: Reading Digit #: 3)
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: waitDigit(5000))
[Sep  8 10:43:21] DTMF[23980]: channel.c:4151 __ast_read: DTMF begin '7' received on SIP/A1General-000002d5
[Sep  8 10:43:21] DTMF[23980]: channel.c:4155 __ast_read: DTMF begin ignored '7' on SIP/A1General-000002d5
[Sep  8 10:43:21] DTMF[23980]: channel.c:4066 __ast_read: DTMF end '7' received on SIP/A1General-000002d5, duration 160 ms
[Sep  8 10:43:21] DTMF[23980]: channel.c:4135 __ast_read: DTMF end passthrough '7' on SIP/A1General-000002d5
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: verifyMenu: Reading Digit #: 4)
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: waitDigit(5000))
[Sep  8 10:43:21] DTMF[23980]: channel.c:4151 __ast_read: DTMF begin '8' received on SIP/A1General-000002d5
[Sep  8 10:43:21] DTMF[23980]: channel.c:4155 __ast_read: DTMF begin ignored '8' on SIP/A1General-000002d5
[Sep  8 10:43:21] DTMF[23980]: channel.c:4066 __ast_read: DTMF end '8' received on SIP/A1General-000002d5, duration 160 ms
[Sep  8 10:43:21] DTMF[23980]: channel.c:4135 __ast_read: DTMF end passthrough '8' on SIP/A1General-000002d5
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: verifyMenu: Reading Digit #: 5)
[Sep  8 10:43:21]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: waitDigit(5000))
[Sep  8 10:43:26]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: Expired available time per digit)
[Sep  8 10:43:26]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: Input validated)
[Sep  8 10:43:26]     -- AGI Script Executing Application: (LOG) Options: (DEBUG,Node: verifyMenu: unknown -> 56999999444214441: [ Node: verifyMenu input: (4578)  state: (timeout)])
[Sep  8 10:43:26]     -- AGI Script Executing Application: (LOG) Options: (NOTICE,Shutdown)
[Sep  8 10:43:26] NOTICE[23980]: Ext. 56999999444214441:1 @ default: Shutdown
[Sep  8 10:43:26]     -- <SIP/A1General-000002d5>AGI Script /home/callcentrepagi/agi_entry.php completed, returning 0
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