Solved

Fixed Caller ID when using CFwdALL feature with Asterisk

Posted on 2014-01-06
16
2,129 Views
Last Modified: 2014-01-27
I am running Trixbox 2.8.0.4 with a Cisco 7961 handset. Our upstream provider is about to restrict our outbound Caller ID to the incoming number ranges we have with them.

If I use the CFwdALL button on the 7961 handset to forward all calls to a mobile the Caller ID shown on the receiver's mobile is the originating caller's.

e.g.
1. All calls to 0299222222 (handsets external number) are forwarded to 0411111111
2. External caller, 0433333333 makes a call to 0299222222.
3. Call is forwarded to 0411111111 and shows caller ID of 0433333333.

Once our upstream provider starts restricting our outbound caller id this call will be rejected by them as we don't own the number 0433333333.

Is there a way to force the forwarded call to use the forwarded extension's external number (0299222222) instead of the calling party's (0433333333) for the outbound Caller ID?
0
Comment
Question by:thenos
  • 9
  • 7
16 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 39761142
Generally speaking, your configuration needs to change not to pass through the Received caller ID.
Have not dealt with your setup to point you to a specific remedy.

In your configuration you likely have settings to maintain caller id, sendrid=yes, or orig callerid which is fine internally! your outgoing translation has to be configured to strip that information and attach your designated caller id!
0
 

Author Comment

by:thenos
ID: 39766788
Thanks for your input Arnold.

When you say outgoing translation is there a particular configuration file/context you can point me to in relation to Asterisk?
0
 
LVL 77

Expert Comment

by:arnold
ID: 39767216
The suggestion made are generally applicable to any VOIP based system.

Not sure what management of your setup exists.

See if the link below helps.
http://www.digium.com/en/products/switchvox/support/handling-caller-id
http://forums.asterisk.org/viewtopic.php?t=71339

Deals with configuring outgoing call rules.

What caller ID Is reflected when you dial out from that location?
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

Author Comment

by:thenos
ID: 39775745
Thanks for that Arnold.

After some test calls and investigation of our dial plan I worked out it was the macro-outbound-called that sets the outgoing Caller ID.

From analysing the logs I think I need to edit the logic on line 5 in the code snippet below.

Lines 6 and 7 are skipped when forwarding IS NOT set (CID = 0299222222) and line 7 is skipped when forwarding IS set (CID = 0422222222)

 [macro-outbound-callerid]
include => macro-outbound-callerid-custom
exten => s,1,ExecIf($["${CALLINGPRES_SV}" != ""]?Set(CALLERPRES()=${CALLINGPRES_SV}))
exten => s,n,ExecIf($["${REALCALLERIDNUM:1:2}" = ""]?Set(REALCALLERIDNUM=${CALLERID(number)}))
exten => s,n(start),GotoIf($[ $["${REALCALLERIDNUM}" = ""] | $["${KEEPCID}" != "TRUE"] | $["${OUTKEEPCID_${ARG1}}" = "on"] ]?normcid)
exten => s,n,Set(USEROUTCID=${REALCALLERIDNUM})
exten => s,n,GotoIf($["foo${DB(AMPUSER/${REALCALLERIDNUM}/device)}" = "foo"]?bypass)
exten => s,n(normcid),Set(USEROUTCID=${DB(AMPUSER/${AMPUSER}/outboundcid)})
exten => s,n(bypass),Set(EMERGENCYCID=${DB(DEVICE/${REALCALLERIDNUM}/emergency_cid)})
exten => s,n,Set(TRUNKOUTCID=${OUTCID_${ARG1}})
exten => s,n,GotoIf($[ $["${EMERGENCYROUTE:1:2}" = ""] | $["${EMERGENCYCID:1:2}" = ""] ]?trunkcid)
exten => s,n,Set(CALLERID(all)=${EMERGENCYCID})
exten => s,n(exit),MacroExit()
exten => s,n(trunkcid),ExecIf($["${TRUNKOUTCID:1:2}" != ""]?Set(CALLERID(all)=${TRUNKOUTCID}))
exten => s,n(usercid),ExecIf($["${USEROUTCID:1:2}" != ""]?Set(CALLERID(all)=${USEROUTCID}))
exten => s,n(hidecid),ExecIf($["${CALLERID(name)}"="hidden"]?Set(CALLERPRES()=prohib_passed_screen))

; end of [macro-outbound-callerid]

Open in new window

0
 
LVL 77

Expert Comment

by:arnold
ID: 39776853
I do not believe you need to alter anything, you simply need to set

Your current setup includes the option to preserve incoming callerID on transfer between extensions

CALLINGPRES_SV

Lines 6-8 deal with extention specific CallerID settings.
i.e. user on extension 3245 may have a direct dial line, so you would configure the user DB with extension 3245 when dialing out to have the caller id as xxxxx3245 as an example



TRUNKOUTCID='yourdefault' within the configuration which will override prior line 14
Line 10 gets the TRUNKOUTCID from ${OUTCID_${ARG1}}


The rule deals with the variances. in the current setup if you do not have TRUNKOUTCID set on line 10, and this is an incoming call with a caller ID being forwarded out and thus being set with the outgoing caller ID. Any other call that does not have a user extension with a phone mapping, will mean that there will be no caller ID transmitted.

possibly unknown/anonymous/blocked not sure what variations you may have.
0
 

Author Comment

by:thenos
ID: 39777926
I do not believe you need to alter anything, you simply need to set
What do I need to set?
0
 
LVL 77

Expert Comment

by:arnold
ID: 39778046
Look at line 10 of what you posted.  It refers to a variable outsid_.

Look in your configuration files for OUTCID_(not sure what it might be as I do not have this setup.)

Check your default outgoing callerID settings.

What if any caller ID is displayed when you dial from that location out?
0
 

Author Comment

by:thenos
ID: 39778098
The Caller ID when making a call from an extension to an external number is that extension's specific DID.
0
 
LVL 77

Expert Comment

by:arnold
ID: 39778354
Ok, that data is pulled from the user database in the macro, lines 6-9

Ref line 5 that deals with whether to keepCID.

You seem to be missing the default CID setting.  if you have an unassigned phone, create an extension that is not assigned a direct DID dial.  Then dial using that extension out and see what if any caller ID shows up.  My guess is that there will be no caller ID associated because the current configuration does not have a default caller-id set.


Double check your outgoing call rules to make sure you have a default outgoing CALLER ID set that applies to all non-DID extensions.

i.e. you have 10 numbers, you must have an extenssion that is not mapped to a specific DID.
0
 

Author Comment

by:thenos
ID: 39778368
Ok so I just created an extension 1092 with no attached DID. I made an outgoing call to my mobile using that extension and the called ID showed as 01092 so I think you could be right.
0
 

Author Comment

by:thenos
ID: 39778490
Just to be clear I was hoping to pass the Caller ID of the extension that is forwarding the call, not just a single DID for all extensions that forward calls.

I can get the Caller ID to pass the default outbound trunk Caller ID but not the extension's DID that the call is being forwarded from
0
 
LVL 77

Expert Comment

by:arnold
ID: 39779402
One thing at a time.  Based on your own comment, you must have a default outgoing CallerID set and configured or once your provider starts enforcing the outgoing callerID restriction a call such as the one you made using the newly created extension will not be completed. The caller  will hear dead air.

I think the system treats forwarding by a user from an extension differently than an incoming call that is automatically forwarded through a configuration on the system.

Not sure whether your setup allows for preserving incoming CallerID while transfering among internal extension while at the same time when the call is destined to the outside not have the incoming callerID preserved.
0
 

Author Comment

by:thenos
ID: 39780929
Yes I realised if I set the trunk outgoing caller id and tick the option "Never Override CallerID" I get a better result. The forwarded call gets through the provider and display's the Outbound Caller ID set on the trunk.

This was quite helpful http://issues.freepbx.org/browse/FREEPBX-2370

It's better but not the exact result I am looking for as it is still not showing the caller extension's DID who is forwarding the call as the Caller ID
0
 
LVL 77

Assisted Solution

by:arnold
arnold earned 200 total points
ID: 39780955
Are you distinguishing whether the forward out is automated or whether the user forwards out the incoming call?

Lines 14,15,16 from your code suggest that if the usercallerID is set, it is the one that will be pushed set, but line 13 seems to terminate the macro processing.  

As I do not have this setup, it is not clear to me whether line 13 needs to be there or not.
Or whether it is a modified version of the original that had lines 14,15,16 above the current line 17.
0
 

Accepted Solution

by:
thenos earned 0 total points
ID: 39802107
0
 

Author Closing Comment

by:thenos
ID: 39811525
Arnold gave some helpful advise but didn't really give me an answer
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Apache application gives "Forbidden" message 5 54
Video Streaming 6 72
Setting up two Raspberry Pi gateways/routers 3 60
Linux Copy Command - All Files inc Directory 1 42
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now