similar way I tried both
api originate {origination_caller_id_name='XXX',
start_dtmf_generate=true}user/1000
&bridge({accountcode='XXX'}sofia/gateway/gw_name/phno)and
&bridge({accountcode='XXX',
api originate {origination_caller_id_name='XXX'}user/1000
start_dtmf_generate=true}sofia/gateway/gw_name/phno)
it's not working, but the inband type is working when i use it in dialplan.
Please assist.