[Freeswitch-users] Multiple SIP-registrations and leg-specific variables.
Alex Lake
alex at digitalmail.com
Tue Jun 17 13:17:32 MSD 2014
FWIW, Here's my lua function
function fixupMultiDest(dpDest)
-- eg dpDest = "[leg_timeout=15,origination_caller_id_name=mystery
caller]sofia/internal/sip:0024307 at 84.92.90.149:59031;transport=udp,sofia/internal/sip:0024307 at 37.157.38.162:51910"
leg_params, leg_dest_list = dpDest:match("([^]]+)]([^]]+)")
leg_params = leg_params.."]"
result = ""
for leg_dest in string.gmatch(leg_dest_list, '([^,]+)') do
if leg_dest ~= "error/user_not_registered" then
if result~="" then
result=result..","
end
result = result..leg_params..leg_dest
end
end
-- eg result = "[leg_timeout=15,origination_caller_id_name=mystery
caller]sofia/internal/sip:0024307 at 84.92.90.149:59031;transport=udp,[leg_timeout=15,origination_caller_id_name=mystery
caller]sofia/internal/sip:0024307 at 37.157.38.162:51910"
return result
end
Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users
mailing list