What is the best way to get the redirecting number from a REFER message? In my case, when someone with a softphone tries to transfer a call to an external number, all these calls go again to my Asterisk, and I need to get the number that has made the transfer, and set it as a redirecting number for an outbound call.
I have managed to cut the extension name out of the ${BLINDTRANSFER} variable and then set the redirecting number (either the extension number of an outbound callerid) for billing purposes (otherwise calls would be blocked).