<div dir="ltr"><div>how to do callback with dialplan?</div><div><br></div><div>the idea is when user A(his phone number is, for example 1001) calls a number with a prefix, e.g. **1002, the </div><div><br></div><div>freeswitch will hangup the call leg with user A and originate calls to 1001 and 1002, then bridge 1001 and 1002 after </div>
<div><br></div><div>both are connected. since originate is a console command, how could i make dialplan to do callback?</div><div><br></div><div>maybe it's something like:</div><div> <extension name="callback"></div>
<div> <condition field="destination_number" expression="^\*\*(\d+)$"></div><div><span class="" style="white-space:pre">        </span><action application="hangup"/></div><div><span class="" style="white-space:pre">        </span><action application="originate" data="sofia/${use_profile}/$1"/></div>
<div><span class="" style="white-space:pre">        </span><action application="originate" data="sofia/${use_profile}/${caller_id_number}"/></div><div><span class="" style="white-space:pre">        </span><action application="bridge" data="sofia/${use_profile}/$1 sofia/${use_profile}/${caller_id_number}"/></div>
<div> </condition></div><div> </extension></div><div>but certainly it's not gonna work, can anybody give a hand?</div><div><br></div></div>