Ticket #3053 (closed Feature Requests: fixed)

Opened 5 years ago

Last modified 5 years ago

Ability to specify Private, Restricted, etc. to CID field on inbound routes

Reported by: LouCalabrese Assigned to: p_lindheimer
Priority: minor Milestone: 2.5
Component: Core - Trunks/Routing Version: 2.5-branch
Keywords: Cc:
Confirmation: Need testing Distro:
Backend Engine: All Distro Ver:
Backend Ver: SVN Revision (if applicable):

Description

At one time I was able to handle Private, Restrictes, Unknown and similar calls by entering the text "Private" etc. in the CID field when setting up an inbound route. This of course would allow handling of calls with blocked CID info other than through the PrivacyManager?. Somewhere along the line this feature was removed, and I have been hampered by it ever since.

Attachments

cidfix.patch (5.0 kB) - added by p_lindheimer on 08/13/08 10:05:25.
allow cid's like Blocked, Restricted, etc.

Change History

08/12/08 16:22:45 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • component changed from - choose - to Core - Trunks/Routing.
  • milestone changed from 2.5 to 3.0.

A bit more details would be good to understand exactly how you were doing that and determine how/where it went away.

08/12/08 22:31:34 changed by LouCalabrese

I originally was able to handle this in FreePBX by creating an inbound route that would handle each "blocked" CID call by specifying, for instance, <Private> or <Restricted> in the "Caller ID Number:" field when setting up the inbound route. I then sent the call to an announcement to the effect of "Private calls are not allowed by this party, please unblock your number and call again". Currently the only way to handle "blocked" calls, or calls with no CID info is to send them to the Privacy Manager, where the caller is asked to enter a number to display. This was doable before, as I DID have it working, and others recall this, so I know that I am crazy.

I do remember that the text to match had to be placed in "<>"s or quotation marks, buut it no longer works no matter what you try. Currently it appears that the field "Caller ID Number:" only accepts numeric data, not text/string data.

I cannot understand why this isn't a hotter issue, as in many cases, especially for personal use, blocking "Private" type calls would seem to be high on one's list of priorities.

Thanks for your attention and help . . .

08/12/08 22:32:24 changed by LouCalabrese

(Sorry meant to say "NOT crazy" above!!

08/12/08 22:41:52 changed by p_lindheimer

I'm not sure how this worked, but nothing has changed in the way inbound calls are routed with CID. It's possible some validation may have been added which is effecting this but what does not seem right is that only the CID number part is used by Asterisk for the inbound routing.

It's easy enough for you to test this. Create an inbound route with some CID. Then go into extensions_additional.conf and edit the created route replacing the CID with the string (<Private> or what ever works) that you used to use. If that results in working, then post here what you did. It sounds surprising but if it works, then we can modify the validation to allow it.

08/12/08 23:28:06 changed by LouCalabrese

Yes, that does in fact work. Editing extensions_additional.conf, by replacing the 10/11 digit number with Private, Restricted, Unknown will allow calls with no CID info to be handled correctly. As I said, I (and another asterisk user) have done this in past versions, but lost the ability to do it somewhere along the migration line. It was not done by direct .conf editing prior, which proves that if the FreePBX would accept the text Private, etc., it would build the correct .conf file to effect this.

Try editing the extensions_additional.conf as you suggested, you will be pleasantly surprised! Please do what you can to remedy this, as it REALLY is a major feature, that I am dumbfounded no one has missed . . .

Thanks again for your attention and time

Lou Calabrese

08/12/08 23:57:04 changed by p_lindheimer

can you please paste or attach a segment of the ext-did that you modified to test this, and the a log or CLI trace (at verbose level 5) so I can see what it looked like and the example. Then I can figure out how/what to best change in the validation to make this work once I see what it looks like. Thanks! (Sounds like it may simply be a bug fix to move back into 2.5)

08/13/08 00:29:58 changed by LouCalabrese

exten => 3027524508,1,Set(FROM_DID=${EXTEN}) exten => 3027524508,n,Gosub(app-blacklist-check,s,1) exten => 3027524508,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok) exten => 3027524508,n,Set(CALLERID(name)=${CALLERID(num)}) exten => 3027524508,n(cidok),Noop(CallerID is ${CALLERID(all)}) exten => 3027524508,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}}) exten => 3027524508,n,SetCallerPres?(allowed_not_screened) exten => 3027524508,n,Goto(ext-miscdests,1,1) exten => 3027524508/Private,1,Set(FROM_DID=${EXTEN}) exten => 3027524508/Private,n,Gosub(app-blacklist-check,s,1) exten => 3027524508/Private,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok) exten => 3027524508/Private,n,Set(CALLERID(name)=${CALLERID(num)}) exten => 3027524508/Private,n(cidok),Noop(CallerID is ${CALLERID(all)}) exten => 3027524508/Private,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}}) exten => 3027524508/Private,n,SetCallerPres?(allowed_not_screened) exten => 3027524508/Private,n,Goto(custom-a2billing,${EXTEN},1 ) exten => 3027524508/Restricted,1,Set(FROM_DID=${EXTEN}) exten => 3027524508/Restricted,n,Gosub(app-blacklist-check,s,1) exten => 3027524508/Restricted,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok) exten => 3027524508/Restricted,n,Set(CALLERID(name)=${CALLERID(num)}) exten => 3027524508/Restricted,n(cidok),Noop(CallerID is ${CALLERID(all)}) exten => 3027524508/Restricted,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}}) exten => 3027524508/Restricted,n,SetCallerPres?(allowed_not_screened) exten => 3027524508/Restricted,n,Goto(custom-a2billing,${EXTEN},1 )

trixbox2*CLI> trixbox2*CLI>

-- Executing [3027524508@from-trunk:1] Set("SIP/64.34.181.47-b7706b58", "FROM_DID=3027524508") in new stack -- Executing [3027524508@from-trunk:2] Gosub("SIP/64.34.181.47-b7706b58", "app-blacklist-check|s|1") in new stack -- Executing [s@app-blacklist-check:1] LookupBlacklist?("SIP/64.34.181.47-b7706b58", "") in new stack -- Executing [s@app-blacklist-check:2] GotoIf?("SIP/64.34.181.47-b7706b58", "0?blacklisted") in new stack -- Executing [s@app-blacklist-check:3] Return("SIP/64.34.181.47-b7706b58", "") in new stack -- Executing [3027524508@from-trunk:3] GotoIf?("SIP/64.34.181.47-b7706b58", "1 ?cidok") in new stack -- Goto (from-trunk,3027524508,5) -- Executing [3027524508@from-trunk:5] NoOp?("SIP/64.34.181.47-b7706b58", "CallerID is "NOT FOUND" <Restricted>") in new stack -- Executing [3027524508@from-trunk:6] Set("SIP/64.34.181.47-b7706b58", "CALLINGPRES_SV=allowed_not_screened") in new stack -- Executing [3027524508@from-trunk:7] SetCallerPres?("SIP/64.34.181.47-b7706b58", "allowed_not_screened") in new stack -- Executing [3027524508@from-trunk:8] Goto("SIP/64.34.181.47-b7706b58", "custom-a2billing|3027524508|1 ") in new stack -- Goto (custom-a2billing,3027524508,1) -- Executing [3027524508@custom-a2billing:1] Answer("SIP/64.34.181.47-b7706b58", "") in new stack -- Executing [3027524508@custom-a2billing:2] Wait("SIP/64.34.181.47-b7706b58", "1") in new stack

Verbosity is at least 99

-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php

Keep in mind that when changing the extensions_additional.conf file manually, the changes do not appear in FreePBX, it shows the inbound route the way it was originally created. Eveantually, the extensions_additional.conf file gets wiped and reverts back to the initial data, so this fix is kind of critical for me.

Again,

Thanks for your help

Lou Calabrese

08/13/08 00:52:20 changed by p_lindheimer

can you please re-paste that putting it between triple french braces:
{ { {
paste here
} } }
but don't put spaces between the braces. Also, Paste the section of extensions_additional.conf that you modified so I can see that, also in braces. Thanks.

Note, the braces are what gives you this:

your paste

08/13/08 01:03:41 changed by LouCalabrese

{{{exten => 3027524508,1,Set(FROM_DID=${EXTEN})

exten => 3027524508,n,Gosub(app-blacklist-check,s,1)

exten => 3027524508,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok)

exten => 3027524508,n,Set(CALLERID(name)=${CALLERID(num)})

exten => 3027524508,n(cidok),Noop(CallerID is ${CALLERID(all)})

exten => 3027524508,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}})

exten => 3027524508,n,SetCallerPres?(allowed_not_screened)

exten => 3027524508,n,Goto(ext-miscdests,1,1)

exten => 3027524508/Private,1,Set(FROM_DID=${EXTEN})

exten => 3027524508/Private,n,Gosub(app-blacklist-check,s,1)

exten => 3027524508/Private,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok)

exten => 3027524508/Private,n,Set(CALLERID(name)=${CALLERID(num)})

exten => 3027524508/Private,n(cidok),Noop(CallerID is ${CALLERID(all)})

exten => 3027524508/Private,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}})

exten => 3027524508/Private,n,SetCallerPres?(allowed_not_screened)

exten => 3027524508/Private,n,Goto(custom-a2billing,${EXTEN},1 )

exten => 3027524508/Restricted,1,Set(FROM_DID=${EXTEN})

exten => 3027524508/Restricted,n,Gosub(app-blacklist-check,s,1)

exten => 3027524508/Restricted,n,GotoIf?($[ "${CALLERID(name)}" != "" ] ?cidok)

exten => 3027524508/Restricted,n,Set(CALLERID(name)=${CALLERID(num)})

exten => 3027524508/Restricted,n(cidok),Noop(CallerID is ${CALLERID(all)})

exten => 3027524508/Restricted,n,Set(CALLINGPRES_SV=${CALLINGPRES_${CALLINGPRES}})

exten => 3027524508/Restricted,n,SetCallerPres?(allowed_not_screened)

exten => 3027524508/Restricted,n,Goto(custom-a2billing,${EXTEN},1 ) }}}

This IS the extensions_additional.conf ext-did section that was modified. It gets all lumped together unless I add the double spacing . . .

08/13/08 01:06:32 changed by LouCalabrese

trixbox2*CLI>

-- Executing [3027524508@from-trunk:1] Set("SIP/64.34.181.47-b7706b58", "FROM_DID=3027524508") in new stack

-- Executing [3027524508@from-trunk:2] Gosub("SIP/64.34.181.47-b7706b58", "app-blacklist-check|s|1") in new stack

-- Executing [s@app-blacklist-check:1] LookupBlacklist?("SIP/64.34.181.47-b7706b58", "") in new stack

Same deal here, spacing added to maintain legibility . . .

-- Executing [s@app-blacklist-check:2] GotoIf?("SIP/64.34.181.47-b7706b58", "0?blacklisted") in new stack

-- Executing [s@app-blacklist-check:3] Return("SIP/64.34.181.47-b7706b58", "") in new stack -- Executing [3027524508@from-trunk:3] GotoIf?("SIP/64.34.181.47-b7706b58", "1 ?cidok") in new stack

Verbosity is at least 99

-- Executing [3027524508@from-trunk:5] NoOp?("SIP/64.34.181.47-b7706b58", "CallerID is "NOT FOUND" <Restricted>") in new stack

trixbox2*CLI> -- Executing [3027524508@from-trunk:6] Set("SIP/64.34.181.47-b7706b58", "CALLINGPRES_SV=allowed_not_screened") in new stack

-- Executing [3027524508@from-trunk:7] SetCallerPres?("SIP/64.34.181.47-b7706b58", "allowed_not_screened") in new stack

-- Executing [3027524508@from-trunk:8] Goto("SIP/64.34.181.47-b7706b58", "custom-a2billing|3027524508|1 ") in new stack

-- Goto (custom-a2billing,3027524508,1)

-- Executing [3027524508@custom-a2billing:1] Answer("SIP/64.34.181.47-b7706b58", "") in new stack

-- Executing [3027524508@custom-a2billing:2] Wait("SIP/64.34.181.47-b7706b58", "1") in new stack

-- Executing [3027524508@custom-a2billing:3] DeadAGI("SIP/64.34.181.47-b7706b58", "a2billing.php|1") in new stack

-- Launched AGI Script /var/lib/asterisk/agi-bin/a2billing.php

08/13/08 10:04:44 changed by p_lindheimer

  • milestone changed from 3.0 to 2.5.

Thanks, would you happen to know what the standard is for CID other than numbers.

  • Private
  • Restricted
  • Blocked
  • Unknown
  • Unavailable

Any others? I'd like to restrict it to the ones used by the telco. In the mean time, here is a patch that will get checked in shortly as a bug fix / feature return to 2.5. It will not work on 2.4 unfortunately. (btw - donations are welcome, since this seemed pretty important to you :-)

08/13/08 10:05:25 changed by p_lindheimer

  • attachment cidfix.patch added.

allow cid's like Blocked, Restricted, etc.

08/13/08 10:06:49 changed by p_lindheimer

  • confirmation changed from Need Feedback to Need testing.

actually - the page.did.php part of the patch may work fine on 2.4

08/13/08 10:08:23 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

(In [6366]) closes #3053 allow CIDs like Restricted, Blocked, Unknown, Private, Unavailable to handle such special cases sent by the telco

08/13/08 10:21:58 changed by LouCalabrese

The text that I have personally encountered being received is "Private", "Unavailable" and "Restricted"

08/13/08 10:38:43 changed by p_lindheimer

(In [6367]) re #3053 Modify tooltip to reference allowed exceptions for CID