How to get transferer number when doing blind transfer?

Hi,

While bridging outbound calls I check if the user has permission to call outbound numbers. I do this via user variables:

<regex field="${user_data(${caller_id_number}@${domain_name} var toll_allow)}" expression="external"/>

This works as expected when a user directly calls outbound number. But with blind transfers I am having problem. Here is a simple senario:

  1. Extension 100: no outbound calling permission
  2. Extension 200: has outbound calling permission
  3. 100 calls 200, 200 answers. 100 wants to talk with an outbound number.
  4. 200 blind transfers the call to outbound number.
  5. XML dialplan runs and as the destination number is an outbound number, it checks if caller_id_number has outbound calling permission (toll_allow)
  6. With blind transfer, caller_id_number is 100 and as it has no outbound permission, the call is rejected.

What I want to achive is to detect that there is a blind transfer and check the transferer’s (ext 200) outbound permission instead of caller_id_number. So if an extension has outbound permissions, it can also blind transfer calls to outbound number even the original caller has no permissions.

How can I achive this? I uuid_dump the testing calls but could not find any variables about blind transfer and transferrer number etc.

Regards,

Rahman