Username of Transferring phone-user

Inclined Readers,

This is my first post, and I will try my best to adhere to all rules, if I violate any regulations my apologies beforehand!

My problem might be a general issue of understanding that I wasn’t able to resolve with the ressources available on the net (or maybe I’m just a poor google-user)

We are using Asterisk 1.6.2.13, that serves as a backend for user-phones. A frontend Server with a TE420 (also 1.6.2.13) serves as frontend for the backend servers. Frontend and Backend-Servers are interconnected with IAX-Trunks

Graphically speaking:
ISDN<==>FRONTEND<=>IAX<==>BACKEND<==>SIP<==>Phone

All Phones are Yealink T26

Sometimes users need to transfer incoming calls via the built-in transfer-function of the Yealink phones to numbers outside of the PBX (eg to the cell phone of an out-of-office user)

On outgoing calls an AGI-Script is exceuted that checks the permissions of the dialling-phone (checking CHANNEL(peername)).

When doing these INCOMING=>INSIDE=>OUTOGING transfers, I observe the follwoing behavior:

  • When the in-office user is doing an transfer with consulting to the cell-phone, everythings works fine, as the phone generates a new channel originating from the in-office-user’s phone, so the permissions can be verified. On the end of the consulting-phase the calls are bridged and everyone is happy…

  • When the in-office user is doing an transfer without consulting to the cell-phone, the transfer fails, as the channel stays the incoming IAX-channel and is sent outbound. So I cannot determine user information.

My question might be pretty basic, (or conceptional :wink:: Is there -in the second case described - a way to determine the username of the phone that initiated the transfer, or am I the victim ob a basic misconception?
Asterisk sees the cannel as IAX, so I don’t have access to the SIP-headers (although the transfer is initiated via SIP of course)

I’ve been thinking about running my transfers via the astserisk server itself, but I’d rather not to be honest.

Thanks for reading through all this
regards,
George