cron_allot_gateway_include SELECT * FROM `voice_compaign_summary` WHERE status='V' AND alloted_apis='' AND occupied=0 AND compaign_id='12' LIMIT 1 SQL_GSELECT voice_gateway_id FROM voice_gateways_of_user WHERE status=1 AND user_id='r1' AND voice_gateway_id IN(SELECT id FROM `voice_gateways` WHERE FIND_IN_SET ('1', `voice_plan_id`) AND status=1 AND isDeleted=0 AND api_owner_id='admin' ORDER BY todays_credits/channels) user dedicated gateway
Array
(
)
 user gatway is empty 

isReserved : 0 


SELECT id FROM `voice_gateways` WHERE FIND_IN_SET ('1', `voice_plan_id`) AND isDedicated=0 AND isReserve=0 AND status=1 AND isDeleted=0 AND api_owner_id='admin' ORDER BY todays_credits/channels
There is no gateway found for this compaign