Page 1 of 1

USA Directory Assistance

PostPosted: Wed Aug 18, 2010 11:34 pm
by gmcust3
1xxx555xxxx USA Directory Assistance

I would like to Block all calls with above Phone Number format.

Spoke to VOIP provider and they say they cannot do it due to some software related issue.

Can we do it from Vici ?

PostPosted: Thu Aug 19, 2010 7:54 am
by Op3r
you just posted your solution to your problem.

Do it by dial plan style :)

PostPosted: Thu Aug 19, 2010 7:59 am
by gmcust3
Any Example will definitely help ...

PostPosted: Thu Aug 19, 2010 8:06 am
by gmcust3
Or

Can I add 1***555**** in DNC ?

PostPosted: Thu Aug 19, 2010 4:28 pm
by williamconley
_1NXX555XXXX

beyond that i'd have to see your existing dial plan entries to tell you how to modify them to catch and kill

PostPosted: Thu Aug 19, 2010 9:34 pm
by gmcust3
I use :

exten => _9X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _9X.,2,Dial(${SIP9}/${EXTEN:2},,tToR)
exten => _9X.,3,Hangup

PostPosted: Thu Aug 19, 2010 10:39 pm
by williamconley
To be able to capture calls in this fashion, you'll have to change that to defined-length extensions instead of "." (any length).

You'll have to use _91NXXNXXXXXX and _91NXX555XXXX which will have "hangup" as its only entry (and the priority must be "1", not "3", or it will be ignored)

I'd also recommend declaring the 555 version FIRST.

Test it out!

PostPosted: Mon Aug 23, 2010 6:07 am
by gmcust3
You mean to say this :

exten => _91NXXN555XXX,1,Hangup
exten => _91NXXNXXXXXX,2,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,3,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _91NXXNXXXXXX,4,Hangup

In my Campaign Settings I keep Omit Code= YES.

For USA, I use 911
For UK, I use 9144
For AUS, I use 9161

PostPosted: Mon Aug 23, 2010 10:27 am
by williamconley
um ... nope.
exten => _91NXXN555XXX,1,Hangup
exten => _91NXXNXXXXXX,2,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,3,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _91NXXNXXXXXX,4,Hangup

this "dial pattern" is completely new compared to your "actual" dial pattern and requires its own program (an exten is actually a program, the ,1, indicates the "first line of the program" the ,2, and ,3, can be replaced with ,n, for "next" to remove the need to do that difficult math (1,2,3,4 is so hard :) )
more like:
exten => _91NXX555XXXX,1,Hangup

exten => _91NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXXNXXXXXX,n,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _91NXXNXXXXXX,n,Hangup


now, if asterisk fails to use this because both patterns match, we could write an "if" statement in to "check" to see if those digits are '555' instead. but that's a wee bit more complex. try this one first. :)

PostPosted: Mon Aug 23, 2010 12:01 pm
by mflorell
It would be better for logging purposes to send that call through the loopback to the no-service extensions instead of just hanging it up, just like you can do for improperly formatted dialing. This is how it should look:

exten => _91NXX555NXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _91NXX555NXXX,n,Dial(${TRUNKloop}/8889990011112,,to)
exten => _91NXX555NXXX,n,Hangup

PostPosted: Mon Aug 23, 2010 3:38 pm
by williamconley
true!

PostPosted: Tue Aug 24, 2010 7:14 am
by gmcust3
Sorry , but what Dial Plan should I try ?

PostPosted: Tue Aug 24, 2010 7:14 am
by gmcust3
I tried

exten => _71NXX555XXXX,1,Hangup
exten => _7X.,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _7X.,2,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _7X.,3,Hangup

and then I tried to dial 7115045557777 and It got connected.

I tried this also :

exten => _71NXX555XXXX,1,Hangup
exten => _71NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _71NXXNXXXXXX,n,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _71NXXNXXXXXX,n,Hangup

and all calls get Call Not Found.

PostPosted: Tue Aug 24, 2010 10:18 am
by williamconley
exten => _711NXX555XXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _711NXX555XXXX,n,Dial(${TRUNKloop}/8889990011112,,to)
exten => _711NXX555XXXX,n,Hangup
exten => _711NXXNXXXXXX,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _711NXXNXXXXXX,n,Dial(${SIPA}/${EXTEN:2},,tToR)
exten => _711NXXNXXXXXX,n,Hangup

Why are you dialing "711" in front of your calls? but this works for that.

This plan will "strip" the 71 off the front of the call and send 1+10digit number to the carrier, which is what most expect.

PostPosted: Tue Aug 24, 2010 10:23 am
by gmcust3
In my Campaign Settings I keep Omit Code= YES.

I use 911 for VOIP1
I use 811 for VOIP2

Similarly.

PostPosted: Tue Aug 24, 2010 10:35 am
by gmcust3
Works Perfectly.

Thanks

PostPosted: Tue Aug 24, 2010 10:52 am
by williamconley
gmcust3 wrote:In my Campaign Settings I keep Omit Code= YES.

I use 911 for VOIP1
I use 811 for VOIP2

Similarly.
you will likely have issues with your lead time zones in addition to not matching callerid to client on inbound calls unless you leave the phone number 10 digit ... but i'm not sure if that was what you were saying. :)

PostPosted: Thu Aug 26, 2010 7:03 am
by gmcust3
You suggest to use _711NXXNXXXXX instead of _7X. ??

PostPosted: Thu Aug 26, 2010 7:08 am
by williamconley
i'm not sure what you meant, but i suggest your phone numbers reflect the actual number, the phone code reflect the country and/or local dial code the phone company/carrier expect and the dial prefix be the digits that you dial within your system and discard before actually sending the call to the carrier.

that way the phone number is properly formatted for the time zone script to work, and the number dials properly.

in addition to that, i generally recommend you use the correct number of digits in your dial pattern to avoid "invalid" phone patterns being sent to your provider. it's generally better to catch these internally and not send them. so you would ordinarily build a dial pattern to catch invalid "number of digits" or any other "catchable" errors and reject the call with logging in vicidial so you know what's going on.

PostPosted: Thu Aug 26, 2010 7:13 am
by gmcust3
ahh Got you.

Thanks.

You are Simply Awesome !!!

PostPosted: Thu Aug 26, 2010 7:37 am
by williamconley
thanks, but in this case it's more like OCD/anal.

i'm just spouting "do it like The Vicidial Group designed the software!!". LOL

i'm quite often a "by the book guy" when it seems to Help!