Change caller ID before a transfer

Hello,

I have two servers A and B. From server A I make a call to server B

  • Server B receives and processes the call with callerID 201
    [Oct 21 12:48:48] – Executing [5108@inbound:5] Verbose(“PJSIP/Prod-0000e374”, “1, “New caller, 201 dialed into the IVR.””) in new stack

  • After handling the call on server B, I send it to a derivation context. Where I change the CallerID and run a blind transfer to server A.

[Oct 21 12:49:10] – Executing [s@5208:5] Set(“PJSIP/Prod-0000e374”, “CALLERID(num)=999999”) in new stack
[Oct 21 12:49:10] – Executing [s@5208:6] NoOp(“PJSIP/Prod-0000e374”, “999999”) in new stack
[Oct 21 12:49:10] – Executing [s@5208:9] Transfer(“PJSIP/Prod-0000e374”, "PJSIP/DER0015@XXX:XXX:XXX:XXX) in new stack
[Oct 21 12:49:10] – Executing [s@5208:10] NoOp(“PJSIP/Prod-0000e374”, “999999”) in new stack

  • The transfer is successful, but it doesn’t change the callerID I get in server A again 201

Executing [0015@from-internal-xfer:1] GotoIf(“SIP/pruebaUno-00000017”, “0?ext-local,0015,1”) in new stack
Executing [0015@from-internal-xfer:2] Macro(“SIP/pruebaUno-00000017”, “user-callerid,”) in new stack
Executing [s@macro-user-callerid:1] Set(“SIP/pruebaUno-00000017”, “TOUCH_MONITOR=1634833282.23”) in new stack
Executing [s@macro-user-callerid:2] Set(“SIP/pruebaUno-00000017”, “AMPUSER=201”) in new stack
Executing [s@macro-user-callerid:3] GotoIf(“SIP/pruebaUno-00000017”, “0?report”) in new stack
Executing [s@macro-user-callerid:4] ExecIf(“SIP/pruebaUno-00000017”, “1?Set(REALCALLERIDNUM=201)”) in new stack
Executing [s@macro-user-callerid:5] Set(“SIP/pruebaUno-00000017”, “AMPUSER=”) in new stack
Executing [s@macro-user-callerid:6] GotoIf(“SIP/pruebaUno-00000017”, “0?limit”) in new stack
Executing [s@macro-user-callerid:7] Set(“SIP/pruebaUno-00000017”, “AMPUSERCIDNAME=”) in new stack
Executing [s@macro-user-callerid:8] GotoIf(“SIP/pruebaUno-00000017”, “1?report”) in new stack
Goto (macro-user-callerid,s,15)
Executing [s@macro-user-callerid:15] GotoIf(“SIP/pruebaUno-00000017”, “0?continue”) in new stack
Executing [s@macro-user-callerid:16] Set(“SIP/pruebaUno-00000017”, “__TTL=64”) in new stack
Executing [s@macro-user-callerid:17] GotoIf(“SIP/pruebaUno-00000017”, “1?continue”) in new stack
Goto (macro-user-callerid,s,28)
Executing [s@macro-user-callerid:28] Set(“SIP/pruebaUno-00000017”, “CALLERID(number)=201”) in new stack
Executing [s@macro-user-callerid:29] Set(“SIP/pruebaUno-00000017”, “CALLERID(name)=Operador 4”) in new stack
Executing [s@macro-user-callerid:30] Set(“SIP/pruebaUno-00000017”, “CDR(cnum)=201”) in new stack
Executing [s@macro-user-callerid:31] Set(“SIP/pruebaUno-00000017”, “CDR(cnam)=Operador 4”) in new stack
Executing [s@macro-user-callerid:32] Set(“SIP/pruebaUno-00000017”, “CHANNEL(language)=en”) in new stack
Executing [0015@from-internal-xfer:3] Set(“SIP/pruebaUno-00000017”, “DIAL_OPTIONS=tTrI”) in new stack
Executing [0015@from-internal-xfer:4] Set(“SIP/pruebaUno-00000017”, “CONNECTEDLINE(num)=0015”) in new stack
Executing [0015@from-internal-xfer:5] Gosub(“SIP/pruebaUno-00000017”, “sub-presencestate-display,s,1(0015)”) in new stack
Executing [s@sub-presencestate-display:1] Goto(“SIP/pruebaUno-00000017”, “state-not_set,1”) in new stack
Goto (sub-presencestate-display,state-not_set,1)

Please, Can the callerid be changed before a Transfer?
I need to send a variable during a transfer, there is some other way. I already tried with the headers and they confirmed that it does not support it (Transfer PJSIP with headers)

Thanks!

You could look at the connected line interception handlers.

https://wiki.asterisk.org/wiki/display/AST/Party+ID+Interception+Macros+and+Routines

You have a client A and a server B. They are interconnected using SIP. Server B answers the call, sets the caller ID and does a SIP blind transfer redirecting client A to server C. Why does client A’s connected line ID not change?

The starting point is that client A is seeing a connected line ID, not a caller ID.

I think this may be a case where setting the connected line is enough, providing that you remember to set option that sends it rather than just accumulates the information. I think you only need interception handlers when it is passing over a bridge.

Note that I’m inferring the answer from the reference to IVRs… Transfer is very different if the call is unanswered.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.