Anonymous CLI not forwarded to forwarding target

RenatoW

Titanium Partner
Basic Certified
Joined
Nov 7, 2022
Messages
3
Reaction score
0
Hi 3cx Community

I'm currently in the process of amending our provider template for 3cx and I struggle with a particular issue.

If I receive a call on the trunk from a supressed number/anonymous, and the call is forwarded to an external target, the forwarded call no longer is sending anonymous as the CLI and instead the main trunk No of my outgoing rule trunk.
In this case, the main trunk No is in the sip.from.user and PAI header of the outgoing, forwarded, call.

If I display the number of the phone I use to make the incoming call, A-Number is transmitted correctly in the sip.from.user and PAI header, so the transfer of originator caller id to the outgoing call is working in principle.

Does anyone know a template that I could use a as a reference where this behavior doesn't occur or have suggestions for the parameters I'm currently testing.

These are my parameters from the imported template used to setup this trunk:
<field name="ParameterIn" custom="" parameter="ToUserPart">$CalledNum</field>
<field name="ParameterIn" custom="" parameter="FromDisplayPart">$CallerName</field>
<field name="ParameterIn" custom="" parameter="FromUserPart">$CallerNum</field>
<field name="ParameterOut" custom="" parameter="RequestLineURIUser">$CalledNum</field>
<field name="ParameterOut" custom="" parameter="RequestLineURIHost">$GWHostPort</field>
<field name="ParameterOut" custom="" parameter="ContactUser">$AuthID</field>
<field name="ParameterOut" custom="" parameter="ContactHost">$ContactUri</field>
<field name="ParameterOut" custom="" parameter="ToDisplayName">$CalledName</field>
<field name="ParameterOut" custom="" parameter="ToUserPart">$CalledNum</field>
<field name="ParameterOut" custom="" parameter="ToHostPart">$GWHostPort</field>
<field name="ParameterOut" custom="" parameter="FromDisplayName">$OutboundCallerId</field>
<field name="ParameterOut" custom="" parameter="FromUserPart">$OriginatorCallerId</field>
<field name="ParameterOut" custom="" parameter="FromHostPart">$GWHostPort</field>
<field name="ParameterOut" custom="" parameter="P-AssertedIdentityUserPart">$EnforcedOriginatorCallerId</field>
<field name="ParameterOut" custom="" parameter="P-AssertedIdentityHostPart">$GWHostPort</field>


Best Regards

Renato
 
What would you need to show when the call coming in is Anonymous?

If the PBX has a number coming in, it will forward it. If not, it needs to put something in. The PBX does have a way of transmitting a call as Anonymous, but this requires the user to dial *5 (by default)

1737982532125.png

is the number you are forwarding to static?

What I would recommend in this case is to create a CID rule that has "Anonymous" as the Caller Id, send it through an outbound rule with a specific prefix.

For example the number you are forwarding to is 1234567890. Create a rule that has a destination of 5551234567890 and forward to your destination

1737982977499.png

Now, go to your outbound rule and create a specific outbound rule for 5551234567890 and define your desired caller ID. Dont forget to strip the first 3 digits from the number before sending the call out.

1737983221198.png

Why did I add the 555 to the ooutgoing number? To differentiate it from a forwarded call and a user internally dialling 1234567890.
 

Attachments

  • 1737983121496.png
    1737983121496.png
    30.3 KB · Views: 3
Just to add to the above, the PBX never forwards Anonymous caller IDs. If the call comes in with Anonymous then even if you have the template set up to forward the OriginatorCallerID the PBX will replace Anonymous with your main trunk number.
This is by design and cannot be changed currently.
 
Hi Nicolas and Yiannis

Thank you for your responses, I was now able to get the desired results with the workaround from Nicolas.

I understand that you can make a anonymous outgoing call using *5, that works fine with my template.

In this case, it's a simple static forwarding on a user.
I have a user with a DID (B-number), where I set the "Away" forwarding rule to immediately forward incoming calls to an external number (C-number), e.g. person is out of office and wants calls relayed to their mobile phone.

(Of course, the obvious solution would be to use the 3cx app on the mobile phone, but there's always customers that are either unwilling or unable to use the app, especially in Switzerland, where in some regions, internet connection but can very unreliable, while mobile reception is still viable.)


In this scenario, I call the B-number from my mobile phone, either with the number displayed or supressed (A-number)

But as such, using only a CID rule would not be viable, since the goal is to forward only the calls to that specific B-number, that is assigned to the user with status "Away", with the original caller ID/A-number relayed to the C-number, e.g. to call back if they miss the call, but not to supress the A-number of every call that is being forwarded.
Nor do I want incoming calls with CLI anonymous to other numbers from that customer get forwarded.

To get around this, I created a seperate trunk, to which I assigned only the B-number in question, this avoids forwarding calls that arrive to other numbers from the same number block with CLI anonymous, since these calls now arrive the default trunk where no CID rule is present.
Then I created the outgoing rule for the second trunk as described by Nicolas with the 555 prefix and gave it the top priority.

At the same time, the user with the B-number assigned has regular "Away" forwarding rule active as well, without that 555 prefix.

Now, calls displaying a E.164 A-number incoming on B-number will be forwarded using the "Away" rule to the C-number with the A-number displayed using the already existing (default) outgoing rule, while incoming calls to B-number and only B-number, with the number supressed would be intercepted by the CID rule and forwarded to the same target using the newly created outgoing rule.

It's not an elegant solution, but something we can work with if a customer has this specific request.

Kind Regards and thanks a lot

Renato
 

Latest Posts

Forum statistics

Threads
111,962
Messages
589,995
Members
164,867
Latest member
swegner