exten => XXX,1,Answer(100)
same => n,GotoIfTime(06:00-23:00,mon-fri,,?connect,1)
exten => connect,1,Dial(PJSIP/user1,10,tTx)…
same => n,Hangup()
[KFOut_tst]
exten => 2,1,Set(CDR(userfield)=KF_Local)
same => n,Dial(PJSIP/user2,90,tTx)
same => n,Hangup()
exten => 1,1,Set(CDR(userfield)=KF_Local)
same => n,Dial(PJSIP/user1,90,tTx)
same => n,Hangup()
This is scenario:
Customer calls number XXX and it goes to user1 - customer’s callerID is ok
When user1 wants to transfer this call to user2 - it gets more complicated:
user2 gets callerid: From: connection@x.x.x.x… - so user2 sees call from connection which is…really an extension! Even RPID or PAI is like: sip:connect@x.x.x.x - it’s wrong I think
When user2 accept call and user1 hangup - customer is connected with user2 but callerid still remains: connect. Asterisk sends Update with RPID and PAI which is ok.
So, this is the question:
why asterisk sends callerid connect when it is really an extension and not real user1 who calls user2? I don’t use word connect anywhere but in extension. Is it ok?
SIP INVITE followed by REFER/Replaces, and which side is the REFER/Replaces sent to? (Note some phones use this even for blind transfers.)
Asterisk attended transfer feature code?
Asterisk blind transfer feature code?
Note that for REFER/Replaces calls, Asterisk cannot distinguish the INVITE call from a second line (or even second phone) independent outgong call, and treats it as such
If you are saying that the caller ID is now that of the original caller. That is expected behaviour.
It’s not clear whether or not you are saying that the new destination see the caller ID at this point.
This is rather an unfriendly thing to do; if the caller is making a chargeable call, they will get charged for making a call that simply starts charging then hangs up with no media sent. Answering at the start of incoming calls is rarely the right thing to do.
You need to provide your pjsip.conf endpoint configuration. Essentially the dialplan extension will be used as a last resort if one hasn’t been configured on the endpoint or if the endpoint hasn’t been configured to accept callerid from the remote side.