Transfer Inbound Caller ID when dialing

Hi guys.
Someone is calling myPublicNumber with inboundCallerID. After 15 seconds, all VIPs should be redirected to mobileNumber. This works, but on mobileNumber, myPublicNumber is displayed when calling mobileNumber. Instead I want to display inboundCallerID. How to archive this? Right now, I just use Dial(PJSIP/mobileNumber@provider_endpoint,120).

I am connected to provider via SIP-Trunk.


-- Executing [myPublicNumber@provider:1] Log("PJSIP/provider_endpoint-0000000d", "NOTICE, Incoming call from inboundCallerID") in new stack

[Jul 24 17:37:29] NOTICE[5989][C-00000005]: Ext. myPublicNumber:1 @ provider: Incoming call from inboundCallerID
– Executing [myPublicNumber@provider:2] Set(“PJSIP/provider_endpoint-0000000d”, “DB(CALLTRACE/)=inboundCallerID”) in new stack
– Executing [myPublicNumber@provider:3] GotoIf(“PJSIP/provider_endpoint-0000000d”, “0?blacklisted,s,1”) in new stack
– Executing [myPublicNumber@provider:4] Dial(“PJSIP/provider_endpoint-0000000d”, “PJSIP/internalExtension1,15”) in new stack
– Called PJSIP/internalExtension1
– PJSIP/internalExtension1-0000000e is ringing
– PJSIP/internalExtension1-0000000e is ringing
– Nobody picked up in 15000 ms
– Executing [myPublicNumber@provider:5] GotoIfTime(“PJSIP/provider_endpoint-0000000d”, “8:00-19:00,mon-fri,,?vip_handling,s,1”) in new stack
– Goto (vip_handling,s,1)
– Executing [s@vip_handling:1] Log(“PJSIP/provider_endpoint-0000000d”, “NOTICE, VIP-Handling for inboundCallerID initiated”) in new stack
[Jul 24 17:37:44] NOTICE[5989][C-00000005]: Ext. s:1 @ vip_handling: VIP-Handling for inboundCallerID initiated
– Executing [s@vip_handling:2] Dial(“PJSIP/provider_endpoint-0000000d”, “PJSIP/mobileNumber@provider_endpoint,120”) in new stack
– Called PJSIP/mobileNumber@provider_endpoint
– PJSIP/provider_endpoint-0000000f is ringing
– PJSIP/provider_endpoint-0000000f is ringing
== Spawn extension (vip_handling, s, 2) exited non-zero on ‘PJSIP/provider_endpoint-0000000d’

Best practice for providers is to not let end users forge caller IDs, which is what would be happening here, as they have no idea that the incoming leg of the call is related. Good providers will only forward caller ID if it is the one they gave you or is one where you have proved you have control over the incoming line.

Obviously from the level of phone spam with faked caller ID, there are lot of providers that don’t follow good practice.

I got it fixed and, yes, you are right, David.

I have this scenario: A (Caller) -> B (Target) -> C (Redirection Target)
C should see number of A, when called, not B (what usually happens).

Of course I do not own the number of A. Nevertheless my provider allows me to signal number of A to C.
It needs some configuration at their portal and I needed to have redirection configured “device dependend”. They call that feature Clip no screening.

Ah, in my Dialplan I rewrite the signaling number by using:
same = n,Set(CALLERID(num)=${CALLERID(num)})


1 Like