RE: [Emerald] calls on line & Call ID

David Moore ( (no email) )
Tue, 20 Apr 1999 08:28:23 +1000

I have a trigger called Calls_Insert but no Calls_Update can I just create
the trigger and insert the script below.

David Moore
Moored@romtech.com.au

-----Original Message-----
From: emerald-request@iea-software.com
[mailto:emerald-request@iea-software.com] On Behalf Of Dale E. Reed Jr.
Sent: Tuesday, 20 April 1999 07:36
To: emerald@iea-software.com
Subject: Re: [Emerald] calls on line & Call ID

David Moore wrote:
>
> The Calls table CallerID is being populated with data but it doesn't seem
to
> flow through to the serverports table can you tell me what the link is so
I
> can repair it. All other data is working for my calls on line except Phone
> number.

Look at your calls_update trigger on your calls table. The first update
should be:

UPDATE sp
Set sp.Username = i.Username,
sp.AcctStatusType = i.AcctStatusType,
sp.CallDate = DateAdd(Second, 0-i.AcctDelayTime, i.CallDate),
sp.FramedAddress = i.FramedAddress,
sp.CallerID = i.CallerID,
sp.ConnectInfo = i.ConnectInfo,
sp.AcctSessionID = i.AcctSessionID
FROM Servers s, ServerPorts sp, inserted i
WHERE s.IPAddress = i.NASIdentifier AND
s.ServerID = sp.ServerID AND
sp.Port = i.NASPort AND
(DateAdd(Second, 0-i.AcctDelayTime, i.CallDate) >= sp.CallDate OR
sp.CallDate IS NULL)

--

Dale E. Reed Jr. Emerald and RadiusNT__________________________________________IEA Software, Inc. www.iea-software.com