<div dir="ltr">hi<div>when a call is attended transferred, for example, to a number like 222, first bleg is hold and caller initiates a new channel with destination 222 which hits default context. if this new call is transferred to another context like public using transfer application with a different destination number like 333 after attended transfer completes the bleg is dropped. because it goes in routing state with destination number 333 in default dialplan. to solve this problem I'm using an extension in all contexts after unloop extension:</div>
<div><br></div><div><div><extension name="transfer_adjustment"></div><div><span style="white-space:pre"> </span> <condition field="${transfer_adjusted}" expression="^$"/> </div>
<div> <condition field="${sip_refer_to}" expression="^<sip:(.+)@.*$"> </div><div><span class="" style="white-space:pre">                </span><action application="log" data="DEBUG original tranfer was:$1"/></div>
<div><span class="" style="white-space:pre">                </span><action application="set" data="transfer_adjusted=true"/></div><div><span class="" style="white-space:pre">                </span><action application="transfer" data="$1 ${dialplan} ${context}"/><span class="" style="white-space:pre">                </span></div>
<div> </condition></div><div></extension></div></div><div><br></div><div>I check if transfer_adjusted is not set and the channel is transferred,first and second conditions, then I transfer it to the original number which caller called to transfer the call to correct destination. Is this the right way? or I'm missing something</div>
<div>thanks</div></div>