session:execute("limit","hash " ..domain_name.. " " ..destination_user_id.. " -1");
session:execute("bridge","${cond(${limit_usage(hash "..domain_name.." " ..destination_user_id..")} >= 2 ? error/user_busy : {^^|ignore_early_media=true}user/" ..destination_user_id.. "@" ..domain_name )
руководствовался вот этим
https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools%3A+LimitUser Busy
This checks the current usage a limit counter before dialing a user, conditionally returning user_busy or putting the call through under a specific condition over the value of this counter. This can be useful if you wish to check against a counter managed by an external application or incremented by other events.
<action application="bridge" data="${cond(${limit_usage(db time_spent in_bed)} <= 60 ? error/user_busy : user/$1)}" />
Note: The above action will not increment the limit counter.
Note: In recent versions, in order for this function to return a non-zero value you must call the limit application before. It should set some limit for this resource (even -1 which is unlimited) in order to enable counting.