[Freeswitch-users] att_xfer+transfer, how?

Денис denis at ringme.ru
Fri Oct 16 19:27:17 MSD 2015


Hello.

For right work our extensions we need make att_xfer not so stupid, 
because when we call leg C, in rules we can have IVR, queue, group 
calls, redirects to another extension, ext call etc. But att_xfer make 
only bridge. For us it does not work.

In system - ALL calls makes via kamailio, and bridge goes to kamailio 
too (with error 500 in ivr/queue)

First, i try to return 302 from kamailio with called contact when i see 
some variable in invite, but it's work not so good, and with bugs.
Second, i use loopback. Works strange, but better than nothing. But in docs
https://freeswitch.org/confluence/display/FREESWITCH/Attended+Transfer
Observations
att_xfer will not work with loopback channels because the application 
blocks when bridged to the C leg. If the C leg hangs up, it will bridge 
back to A. Since loopback hangs up to replace the legs to the correct 
legs, att_xfer will detect that and bridge it back to the A leg 
automatically.

Old info in doc or really we will have problems?

Or i need write right att_xfer on python/lua?

Please, share your experience and maybe more worked code.

Now:
     <extension name="att_xfer">
       <condition field="destination_number" expression="^att_xfer$">
         <action application="read" data="2 15 
'tone_stream://%(10000,0,350,440)' digits 5000 #"/>
         <action application="set" data="origination_cancel_key=#"/>
         <action application="set" data="sip_h_X-return=true"/>
         <action application="log" data="err 
sip_from_port=${sip_from_port}, sip_to_port=${sip_to_port}, <action 
application="set" 
data="export_vars=sip_ph_X-Call-UUID,X-ResolveArray,Other-Leg-Unique-ID,sip_rh_X-Leg2i,Other-Leg-X-Leg2i,sip_h_X-Inring,sip_h_X-FromID,sip_received_port,sip_req_uri,sip_from_uri,sip_req_user,sip_req_host,sip_to_uri,sip_to_user,sip_to_host,sip_from_user,sip_from_host"/>
         <action application="att_xfer" data="loopback/${digits}/XML"/>
       </condition>
     </extension>




Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list