The dialplan at the IP01 is nothing but usual one including the following outbound rule:- exten=_0086xxx.,1,Macro(trunkdial-failover-0.3,${SIP1}/${EXTEN:0},${SIP2}/${EXTEN:0},SIP1,SIP2,${CALLERID(num)},${CALLERID(num)})
複製代碼 which includes fail-over(actually both trunks should be used in case of callback).
As for the sipsorcery side, it is:- num = req.URI.user.to_s
- if num.index("\*")!=nil then
- pos=num.index(/\*/)
- caller=num[0,pos]
- callto=num[pos+1,80]
- sys.Callback("#{caller}@myIP01","#{callee}@myIP01")
- end
複製代碼 which parses the caller&callee number with the help of the field separator *.
At web page, just send the following message to sipsorcery:- https://www.sipsorcery.com/callmanager.svc/webcallback?user=username&number=$number
複製代碼 where $number=$callernumber*$calleenumber.
Reference: http://www.sipsorcery.com/help/webcallback.html |