Page 1 of 1

Manual dial with External DNC Check

PostPosted: Mon Aug 11, 2014 3:31 am
by kapil_budhiraja
Dear All,
Cheers for your great work always.

I have a custom situation where all manual dials should be checked for two level of DNC's.

First : Camapign level which is present.
Second : Third party url-based DNC where number shall be posted to a url which returns Y/N as result. I would appreciate if any available expert could guide me the dialplan which check this upon manual dial request from agent. If result N then play recording to agent "Number is in DNC' and hangup.


Thanks,
Kapil

Re: Manual dial with External DNC Check

PostPosted: Mon Aug 11, 2014 7:57 am
by geoff3dmg
i don't think a dialplan can do what you want. You'd need to do it with a custom AGI script.

Re: Manual dial with External DNC Check

PostPosted: Mon Aug 11, 2014 10:25 pm
by kapil_budhiraja
I believe this function could call the URL directly and set the url response into foo variable. But just not sure if this works. If so, how to process the dial plan further based on foo result Y or N.

exten => s,1,Set(foo=${CURL(url?x=5&y=4)})

Please advice.

Re: Manual dial with External DNC Check

PostPosted: Tue Aug 12, 2014 5:26 am
by geoff3dmg
You could use GotoIf?

Re: Manual dial with External DNC Check

PostPosted: Wed Aug 13, 2014 1:54 am
by kapil_budhiraja
Yeah. It's working using CURL and gotoIf functions.

[abc]
exten => _X.,1,Answer()
exten => _X.,2,Set(var=${CURL(URL?phone=${EXTEN})})
exten => _X.,3,GotoIf($["${var}" != ""]?4:5)
exten => _X.,4,NoOp(${var})
exten => _X.,5,Hangup()