Sign in to follow this  
Followers 0
kc9pke

Any VOIP providers let you see ANI?

14 posts in this topic

either on a CDR sheet or even sending it down via SIP? IIRC, there's a function you could throw in an Asterisk dialplan that shows the ANI digits, I'm assuming if the provider sends them

0

Share this post


Link to post
Share on other sites

 

Check out this presentation from Kevin Mitnick. Basically, run a toll-free number to your asterisk box (with SIP), since your paying for the call, You have a right to know the billing number, even if the CPN is blocked (at least this is true with some providers).

 

I did this back in 2009 or so, I think I was using flowroute.

 

EDIT:

To be honest, now that I got to re-watch the video (no sound..wtf), I might have given you mixed up information. They're (flowroute) allowing you to see the p-asserted-identity with a toll-free number. It still unblocks the caller ID, and I have read in various other places that owners of toll-free numbers are entitled to see your ANI, but I might be wrong in saying p-asserted-identity is equivalent to ANI (? I think its just plain caller id)

 

 

Although my memory on all this stuff is hazy,I feel like I was able to filter out payphone origination to my toll-free when I was messing around with it, because I remember wanting to avoid the surcharges. How else could I have done that without ANI? Unfortunately I really don't remember since it was a good while ago. The more I read, the more Im convinced I remember correctly. Pretty sure flowroute passes you everything with a toll-free.

 

EDIT:

I can say I'm certain you get the Calling Party Category or ANI2 digit, and unblock caller ID with a toll-free number, but I never really tried to get the billing number/ANI itself in SIP, so I can't say for sure whether it's possible. I'm trying to find out more information on that specifically.

 

Check this out apparently flowroute definitely does what you want it to, and I'll bet plenty of other SIP providers do as well (Wonder if its possible for any providers to do this without toll-free?): https://blog.flowroute.com/2015/08/27/using-advanced-signaling-to-detect-call-center-fraud/Apparently you can unmask alot of caller information including ANI over SIP, including the ANI2/CPC digit, amongst other things, so this thread is still a valid answer to your question.. Just wanted to verify I wasn't recalling anything incorectly.

Edited by phonetrovert
1

Share this post


Link to post
Share on other sites

 

Check out this presentation from Kevin Mitnick. Basically, run a toll-free number to your asterisk box (with SIP), since your paying for the call, You have a right to know the billing number, even if the CPN is blocked (at least this is true with some providers).

 

I did this back in 2009 or so, I think I was using flowroute.

 

EDIT:

To be honest, now that I got to re-watch the video (no sound..wtf), I might have given you mixed up information. They're (flowroute) allowing you to see the p-asserted-identity with a toll-free number. It still unblocks the caller ID, and I have read in various other places that owners of toll-free numbers are entitled to see your ANI, but I might be wrong in saying p-asserted-identity is equivalent to ANI (? I think its just plain caller id)

 

 

Although my memory on all this stuff is hazy,I feel like I was able to filter out payphone origination to my toll-free when I was messing around with it, because I remember wanting to avoid the surcharges. How else could I have done that without ANI? Unfortunately I really don't remember since it was a good while ago. The more I read, the more Im convinced I remember correctly. Pretty sure flowroute passes you everything with a toll-free.

 

EDIT:

I can say I'm certain you get the Calling Party Category or ANI2 digit, and unblock caller ID with a toll-free number, but I never really tried to get the billing number/ANI itself in SIP, so I can't say for sure whether it's possible. I'm trying to find out more information on that specifically.

 

Check this out apparently flowroute definitely does what you want it to, and I'll bet plenty of other SIP providers do as well (Wonder if its possible for any providers to do this without toll-free?): https://blog.flowroute.com/2015/08/27/using-advanced-signaling-to-detect-call-center-fraud/Apparently you can unmask alot of caller information including ANI over SIP, including the ANI2/CPC digit, amongst other things, so this thread is still a valid answer to your question.. Just wanted to verify I wasn't recalling anything incorectly.

How exactly do you see the headers it was mentioning? I just set up Asterisk in a VM with a flowroute account I recently added credit to.

0

Share this post


Link to post
Share on other sites

I'm thinking since that link I posted from flowroute said they support all of this, some of these standard channel variables for asterisk 1.8 should work, Even though the documentation says some of the fields are for PRI channels.

${CALLERID(ani)}

${CALLERID(ani2)}

 

Check out the asterisk documentation here: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables

 

Also be aware that I read in earlier documentation (from asterisk 1.4) that from (Im assuming) then on all channel drivers would pass an ANI, and it would pass callerid through the ANI field if there was no ANI (in situations like VOIP to VOIP calls). So you should check the results against the ANAC that gives ANI at 800-223-1104, to make sure your getting the proper information in asterisk.

 

Edit:

That would be my first guess (They just fill the relevant PRI specific fields) but Im noticing their article says something about going through Sip-Invite and NPAC metadata.. Which is definitely something I'd have to read up on, because I dont know what the hell that means at this point lol. If the standard channel variables dont work I'd ask flowroute support how it's done. I can't see them not giving out all that extra info (on top of unblocking CPN), since they specifically said they do.

 

Let us know how everything goes

 

P.S, Alternatively, if you get incoming calls to your asterisk box working, Do the following in the terminal, And try to go through the asterisk CLI output to see where some of the headers of interest are possibly..

/path/to/asterisk -crvvvvvv > debug.txt

and grep debug as required .. Of course that's a last resort anyway, probably just go to support worst case.

(Everything lined out is wrong.. Im shot..)

 

To debug SIP, use something like ngrep, or setup logger.conf in asterisk specifically to log at the protocol level (if possible..otherwise use ngrep).

http://www.voip-info.org/wiki/view/Asterisk+config+logger.conf

Edited by phonetrovert
0

Share this post


Link to post
Share on other sites

I'm thinking since that link I posted from flowroute said they support all of this, some of these standard channel variables for asterisk 1.8 should work, Even though the documentation says some of the fields are for PRI channels.

${CALLERID(ani)}

${CALLERID(ani2)}

 

Check out the asterisk documentation here: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Standard+Channel+Variables

 

Also be aware that I read in earlier documentation (from asterisk 1.4) that from (Im assuming) then on all channel drivers would pass an ANI, and it would pass callerid through the ANI field if there was no ANI (in situations like VOIP to VOIP calls). So you should check the results against the ANAC that gives ANI at 800-223-1104, to make sure your getting the proper information in asterisk.

 

Edit:

That would be my first guess (They just fill the relevant PRI specific fields) but Im noticing their article says something about going through Sip-Invite and NPAC metadata.. Which is definitely something I'd have to read up on, because I dont know what the hell that means at this point lol. If the standard channel variables dont work I'd ask flowroute support how it's done. I can't see them not giving out all that extra info (on top of unblocking CPN), since they specifically said they do.

 

Let us know how everything goes

 

P.S, Alternatively, if you get incoming calls to your asterisk box working, Do the following in the terminal, And try to go through the asterisk CLI output to see where some of the headers of interest are possibly..

/path/to/asterisk -crvvvvvv > debug.txt

and grep debug as required .. Of course that's a last resort anyway, probably just go to support worst case.

Well, I'm having trouble.

I programmed my Asterisk box to 1) answer, 2) insert a NoOp formatted like "Calling ANI = ${CALLERID(ani)} - ANI II = ${CALLERID(ani2)}) 3) play hello-world.ulaw and 4) hang up gracefully

 

I have the Asterisk CLI up and running in PuTTY showing the debug output in real time.

When I dial into my box with *67, the ANI is Anonymous. When I dial without *67, I obviously get the accurate info.

However, I'm dialing in via a cell phone on T-Mobile. It's showing the ANI II digits as "0"... that can't be right.

 

Hrmmmmm.

 

Edit: do I absolutely have to have a toll-free number? I forgot to mention i just had a local number with them

Edited by kc9pke
0

Share this post


Link to post
Share on other sites

OK so forget that idea that they might be populating the ANI fields in the dial plan (I was just hoping life might be easier on this one..).

 

is the number toll-free?

 

BTW the "0" ANI-2 digit is for POTS, a cellphone should be 23, 61, 62 or 63. So it's definitely just giving you callerid Keep in mind ANI should never be anonymous unless someone did some tricky, deliberate stuff to get it that way.

http://www.nanpa.com/number_resource_info/ani_ii_assignments.html

 

Try

n,Set(RPID=${SIP_HEADER(P-Asserted-Identity)})

or

n,Set(RPID=${SIP_HEADER(Remote-Party-Id)})

in your dial plan, do either of these values yield anything when you press *67? ( At least we'd know you could unmask a blocked callerid for starters.. )

 

As instructed in that flowroute link, ngrep for the "INVITE" header and see if the ANI data is in there..Should be. If poking around like this yields no success. I would contact them for further details, i.e, where specifically to find the extra SIP-T ANI stuff.

 

Edit:

 

I see you say it's not a toll-free number, I'm not sure if that makes a difference or not. I would have imagined it did, but I don't see anything about it in that link. I think SIP-T is an addition to regular SIP at the protocol level. Use some kind of network debugging software at the protocol level to figure out the exact headers you need, and you can then add the headers in the asterisk dial plan with SIPAddHeader and process the extra information from flowroute I would think. (That's wrong SIPAddHeader() adds a header to an INVITE message on an outbound call, that's what I get for skimming documentation and forums..)

 

I have an account from them too,If I get some time I will try experimenting with this as well. I feel like it should work since they're saying it would..

Edited by phonetrovert
0

Share this post


Link to post
Share on other sites

OK so forget that idea that they might be populating the ANI fields in the dial plan (I was just hoping life might be easier on this one..).

 

is the number toll-free?

 

BTW the "0" ANI-2 digit is for POTS, a cellphone should be 23, 61, 62 or 63. So it's definitely just giving you callerid Keep in mind ANI should never be anonymous unless someone did some tricky, deliberate stuff to get it that way.

http://www.nanpa.com/number_resource_info/ani_ii_assignments.html

 

Try

n,Set(RPID=${SIP_HEADER(P-Asserted-Identity)})

or

n,Set(RPID=${SIP_HEADER(Remote-Party-Id)})

in your dial plan, do either of these values yield anything when you press *67? ( At least we'd know you could unmask a blocked callerid for starters.. )

 

As instructed in that flowroute link, ngrep for the "INVITE" header and see if the ANI data is in there..Should be. If poking around like this yields no success. I would contact them for further details, i.e, where specifically to find the extra SIP-T ANI stuff.

 

Edit:

 

I see you say it's not a toll-free number, I'm not sure if that makes a difference or not. I would have imagined it did, but I don't see anything about it in that link. I think SIP-T is an addition to regular SIP at the protocol level. Use some kind of network debugging software at the protocol level to figure out the exact headers you need, and you can then add the headers in the asterisk dial plan with SIPAddHeader and process the extra information from flowroute I would think. I have an account from them too,If I get some time I will try experimenting with this as well. I feel like it should work since they're saying it would..

I just did a tcpdump on the Asterisk box itself and called with and without *67. 

Without *67 the From:, Contact:, and P-Asserted-Identity fields do populate with ANI, but ANI II is nowhere to be found in the INVITE header at all.

With *67, the three aforementioned headers just populate with Anonymous. 

 

EDIT: It's apparently with toll frees only.

An extra header named P-Charge-Info has the ANI in the format of tel:NPANXXXXXX

Without *67: http://imgur.com/MXMwPsZ

With *67: http://imgur.com/0smhTFO

Edited by kc9pke
0

Share this post


Link to post
Share on other sites

 

OK so forget that idea that they might be populating the ANI fields in the dial plan (I was just hoping life might be easier on this one..).

 

is the number toll-free?

 

BTW the "0" ANI-2 digit is for POTS, a cellphone should be 23, 61, 62 or 63. So it's definitely just giving you callerid Keep in mind ANI should never be anonymous unless someone did some tricky, deliberate stuff to get it that way.

http://www.nanpa.com/number_resource_info/ani_ii_assignments.html

 

Try

n,Set(RPID=${SIP_HEADER(P-Asserted-Identity)})

or

n,Set(RPID=${SIP_HEADER(Remote-Party-Id)})

in your dial plan, do either of these values yield anything when you press *67? ( At least we'd know you could unmask a blocked callerid for starters.. )

 

As instructed in that flowroute link, ngrep for the "INVITE" header and see if the ANI data is in there..Should be. If poking around like this yields no success. I would contact them for further details, i.e, where specifically to find the extra SIP-T ANI stuff.

 

Edit:

 

I see you say it's not a toll-free number, I'm not sure if that makes a difference or not. I would have imagined it did, but I don't see anything about it in that link. I think SIP-T is an addition to regular SIP at the protocol level. Use some kind of network debugging software at the protocol level to figure out the exact headers you need, and you can then add the headers in the asterisk dial plan with SIPAddHeader and process the extra information from flowroute I would think. I have an account from them too,If I get some time I will try experimenting with this as well. I feel like it should work since they're saying it would..

I just did a tcpdump on the Asterisk box itself and called with and without *67. 

Without *67 the From:, Contact:, and P-Asserted-Identity fields do populate with ANI, but ANI II is nowhere to be found in the INVITE header at all.

With *67, the three aforementioned headers just populate with Anonymous. 

 

EDIT: It's apparently with toll frees only.

An extra header named P-Charge-Info has the ANI in the format of tel:NPANXXXXXX

Without *67: http://imgur.com/MXMwPsZ

With *67: http://imgur.com/0smhTFO

 

 

Yeah the CPN from P-asserted-identity on a private inbound call trick is with toll-free only I think..

 

EDIT:

If the ANI is anonymous then your not getting ANI, its giving you CPN, try it with a toll-free..And before you do, I'd just ask them outright if they'll give you a billing number anywhere, because that's what your looking for I think..(you already have ANI2 digits, and CPN, thats the missing piece)

 

EDIT:

P-Asserted-Identity gets passed even with *67?  On a non-toll free number?

Edited by phonetrovert
0

Share this post


Link to post
Share on other sites

OK so forget that idea that they might be populating the ANI fields in the dial plan (I was just hoping life might be easier on this one..).

 

is the number toll-free?

 

BTW the "0" ANI-2 digit is for POTS, a cellphone should be 23, 61, 62 or 63. So it's definitely just giving you callerid Keep in mind ANI should never be anonymous unless someone did some tricky, deliberate stuff to get it that way.

http://www.nanpa.com/number_resource_info/ani_ii_assignments.html

 

Try

n,Set(RPID=${SIP_HEADER(P-Asserted-Identity)})

or

n,Set(RPID=${SIP_HEADER(Remote-Party-Id)})

in your dial plan, do either of these values yield anything when you press *67? ( At least we'd know you could unmask a blocked callerid for starters.. )

 

As instructed in that flowroute link, ngrep for the "INVITE" header and see if the ANI data is in there..Should be. If poking around like this yields no success. I would contact them for further details, i.e, where specifically to find the extra SIP-T ANI stuff.

 

Edit:

 

I see you say it's not a toll-free number, I'm not sure if that makes a difference or not. I would have imagined it did, but I don't see anything about it in that link. I think SIP-T is an addition to regular SIP at the protocol level. Use some kind of network debugging software at the protocol level to figure out the exact headers you need, and you can then add the headers in the asterisk dial plan with SIPAddHeader and process the extra information from flowroute I would think. I have an account from them too,If I get some time I will try experimenting with this as well. I feel like it should work since they're saying it would..

I just did a tcpdump on the Asterisk box itself and called with and without *67. 

Without *67 the From:, Contact:, and P-Asserted-Identity fields do populate with ANI, but ANI II is nowhere to be found in the INVITE header at all.

With *67, the three aforementioned headers just populate with Anonymous. 

 

EDIT: It's apparently with toll frees only.

An extra header named P-Charge-Info has the ANI in the format of tel:NPANXXXXXX

Without *67: http://imgur.com/MXMwPsZ

With *67: http://imgur.com/0smhTFO

 

Yeah the P-asserted-identity trick is with toll-free only I think..

 

EDIT:

If the ANI is anonymous then your not getting ANI, its giving you CPN, try it with a toll-free..And before you do, I'd just ask them outright if they'll give you a billing number anywhere, because that's what your looking for I think..(you already have ANI2 digits, and CPN, thats the missing piece)

 

EDIT:

P-Asserted-Identity gets passed even with *67?  On a non-toll free number?

I didn't get any metadata on the non-toll-free.

The two Imgur screenshots are of inbound calls to a toll-free I purchased today

0

Share this post


Link to post
Share on other sites

Wait, Im sorry.. Im slow lol..

I see the charge-info is there, that's the billing number, so that's cool. And the asserted identity get's passed as well. Sweet! it works.

Apparently asterisk is doing as I said, and placing the CPN in the ANI field because your doing this over SIP-T and not PRI (the CALLERID(ani) var is PRI specific). But the other SIP-T fields are there with the same info.

 

Edit:

Reading stuff like this https://tools.ietf.org/html/draft-york-dispatch-p-charge-info-02to try and learn more about everything, Im realizing I shouldn't call it a BTN or billing number, but a charge number seems to be the more common lingo..

 

Edit:

Im pretty sure theyd be violating FCC regulation by not strictly enforcing *67 on a non toll free number..Thats why I was asking, would have been pretty surprised.

 

Sorry I did give alot of misleading tips/wrong info, My flowroute account is out of credits atm, so alot of things I couldnt test myself, and I was reading through like 1,000,000 acronyms that all describe similar things (i.e, I've seen ANI2 digit referred to as ISUP/OLI, CPC, and ANI-II digit). I learned alot though..

Edited by phonetrovert
0

Share this post


Link to post
Share on other sites

I was wondering what happens when you call forward to your 800 line, Is there any information about the originator of the call, as opposed to the number doing the forwarding? I think I read somewhere that's how alot of those anonymous call unmasking services work.

0

Share this post


Link to post
Share on other sites

I was wondering what happens when you call forward to your 800 line, Is there any information about the originator of the call, as opposed to the number doing the forwarding? I think I read somewhere that's how alot of those anonymous call unmasking services work.

I'm not sure. I'll have to try that

0

Share this post


Link to post
Share on other sites

Last I heard (and granted, this was a good while ago), Asterisk didn't have proper SIP-T support; it would accept the calls, but just ignore any of the extra fields. In any case, Wireshark has SIP-T support if you want something to analyze the packet captures.

0

Share this post


Link to post
Share on other sites

Last I heard (and granted, this was a good while ago), Asterisk didn't have proper SIP-T support; it would accept the calls, but just ignore any of the extra fields. In any case, Wireshark has SIP-T support if you want something to analyze the packet captures.

Without *67: http://imgur.com/MXMwPsZ

With *67: http://imgur.com/0smhTFO

 

Kc9pke posted these, It looks like p-charge-info and ani2 gets passed to asterisk.  These fields would be SIP-T, right? There's alot of other unrelated changes that have happened to asterisk (i.e, scrapping meetme for confbridge, and changing some conf file syntax), so it wouldnt surprise me if they updated these capabilities also.

Edited by phonetrovert
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0