------------------------------------------------------------------------
r19070 | nico | 2009-11-12 15:30:16 +0100 (Thu, 12 Nov 2009) | 2 lines

For Switchboard: sent more info on ListCountries request

------------------------------------------------------------------------
r19032 | nico | 2009-11-10 11:50:04 +0100 (Tue, 10 Nov 2009) | 6 lines

When a user logs in set the ans field to the user extension.

Also a connection time should be added for reporting issues.

Release notes: Login/Logout actions are part of the detailed report!

------------------------------------------------------------------------
r18999 | nico | 2009-11-05 15:08:45 +0100 (Thu, 05 Nov 2009) | 4 lines

After a blind transfer to a busy caller and the caller hangs up, the callid is not sent to the transferred caller.

When a call is picked up from the BUSY queue to redirect to the original callee set the redirtype to BLIND and the sid is displayed correctly.

------------------------------------------------------------------------
r18986 | nico | 2009-11-05 13:39:44 +0100 (Thu, 05 Nov 2009) | 2 lines

Removal of old comment statements

------------------------------------------------------------------------
r18985 | nico | 2009-11-05 12:27:29 +0100 (Thu, 05 Nov 2009) | 2 lines

Do license check after the table is updated....

------------------------------------------------------------------------
r18973 | nico | 2009-11-04 16:23:51 +0100 (Wed, 04 Nov 2009) | 2 lines

adding max callers in queue for reporting

------------------------------------------------------------------------
r18931 | nico | 2009-11-02 15:17:21 +0100 (Mon, 02 Nov 2009) | 4 lines

company is filled on an incoming trunk. when a random trunk is taken the company is not correct.

Detail reports crosses phone calls between company. Only when the channel is not iscaller set the company.

------------------------------------------------------------------------
r18911 | nico | 2009-10-29 17:08:26 +0100 (Thu, 29 Oct 2009) | 2 lines

Fix cross-company fallback.

------------------------------------------------------------------------
r18902 | nico | 2009-10-29 13:37:50 +0100 (Thu, 29 Oct 2009) | 4 lines

when the queue is updated the oldest parameter was reset to zero

On a add set the field oldest by calling the function

------------------------------------------------------------------------
r18898 | nico | 2009-10-28 16:55:43 +0100 (Wed, 28 Oct 2009) | 2 lines

for call cost calculation reports also fill in the charged company

------------------------------------------------------------------------
r18893 | nico | 2009-10-28 15:39:35 +0100 (Wed, 28 Oct 2009) | 2 lines

added cost class with a outbound phone call

------------------------------------------------------------------------
r18884 | nico | 2009-10-28 12:05:33 +0100 (Wed, 28 Oct 2009) | 4 lines

On a phone callwaiting doesn't update switchboard.

Callwaiting parameter is on/off and not yes/no. Changed

------------------------------------------------------------------------
r18872 | raarts | 2009-10-27 17:10:11 +0100 (Tue, 27 Oct 2009) | 2 lines

Allow for extra parameters Int2, Int3 and Int4 in the CALLHIST User Event.

------------------------------------------------------------------------
r18869 | raarts | 2009-10-27 16:48:32 +0100 (Tue, 27 Oct 2009) | 2 lines

Put class into the 500 record.

------------------------------------------------------------------------
r18868 | nico | 2009-10-27 16:19:59 +0100 (Tue, 27 Oct 2009) | 4 lines

after a caller is put in the park queue of the SB and is later transferred to another callee the call hist was incorrect.

When a call is linked and 2 sessionid exists move the callhist from the callee session to the caller session

------------------------------------------------------------------------
r18865 | nico | 2009-10-27 10:03:55 +0100 (Tue, 27 Oct 2009) | 2 lines

queue rapportage: lookupfrom and to added .

------------------------------------------------------------------------
r18847 | nico | 2009-10-23 16:17:57 +0200 (Fri, 23 Oct 2009) | 2 lines

Sometime good things needs to changed.... ListPones will be added in SB and forwarding will be sent via Queue_Contact.

------------------------------------------------------------------------
r18840 | nico | 2009-10-23 11:38:31 +0200 (Fri, 23 Oct 2009) | 2 lines

Adding in table phone the parameters callwaiting and maxcalls for new SB message

------------------------------------------------------------------------
r18839 | nico | 2009-10-23 11:05:59 +0200 (Fri, 23 Oct 2009) | 2 lines

send extra info with queue event to SB if Allowinempty is set

------------------------------------------------------------------------
r18821 | raarts | 2009-10-22 10:11:17 +0200 (Thu, 22 Oct 2009) | 2 lines

Send more contact permissions to the switchboard.

------------------------------------------------------------------------
r18819 | nico | 2009-10-21 16:31:39 +0200 (Wed, 21 Oct 2009) | 2 lines

Comment added in callhist.h

------------------------------------------------------------------------
r18813 | nico | 2009-10-21 15:38:31 +0200 (Wed, 21 Oct 2009) | 2 lines

When a call is answered by the voicemail, reset call recording flags!

------------------------------------------------------------------------
r18809 | raarts | 2009-10-21 14:54:45 +0200 (Wed, 21 Oct 2009) | 3 lines

Set call connection time at ivr and voicemail, so the reports
will show them correctly.

------------------------------------------------------------------------
r18803 | nico | 2009-10-21 11:50:39 +0200 (Wed, 21 Oct 2009) | 4 lines

small error in checking for contact id.

remove character ';' after if ==> contact id is now not overwritten.

------------------------------------------------------------------------
r18800 | nico | 2009-10-21 11:32:19 +0200 (Wed, 21 Oct 2009) | 4 lines

Add super indication for Company event for SB.

Super: 0 or Super: 1 indicates super company.

------------------------------------------------------------------------
r18797 | nico | 2009-10-21 11:05:15 +0200 (Wed, 21 Oct 2009) | 2 lines

debug print statemnet removed :)

------------------------------------------------------------------------
r18796 | nico | 2009-10-21 11:04:07 +0200 (Wed, 21 Oct 2009) | 5 lines

Switchboard in super company should be able to find extensions cross company.

An error in the log is printed if there are duplicate extensions.
If the extensions is found and busy the connection will be put in the Busy Queue.

------------------------------------------------------------------------
r18791 | nico | 2009-10-21 09:46:54 +0200 (Wed, 21 Oct 2009) | 3 lines

Simplifying charge of phone session.
Calvi does need some changes

------------------------------------------------------------------------
r18787 | nico | 2009-10-20 13:56:06 +0200 (Tue, 20 Oct 2009) | 3 lines

The Src field on a Blind transfer was overwitten.
Move the check for iscaller to the transfer and fill the Src field.

------------------------------------------------------------------------
r18785 | nico | 2009-10-20 11:38:47 +0200 (Tue, 20 Oct 2009) | 3 lines

Blind transfer via switchboard could leave a session up (hanging)
If there is a blind transfer and the channnel is not the caller set it to iscaller (clear wasdest)

------------------------------------------------------------------------
r18784 | raarts | 2009-10-20 10:41:13 +0200 (Tue, 20 Oct 2009) | 3 lines

The astiumd ./configure procedure now *requires* libdbi, mcrypt, glib2 etc.
Before it just tried to continue, but compilation would fail. 

------------------------------------------------------------------------
r18783 | nico | 2009-10-20 10:10:31 +0200 (Tue, 20 Oct 2009) | 3 lines

change of channel parameters too early done in Transfer.
Moved the code to the rename, just after the remove channel from the phone!

------------------------------------------------------------------------
r18781 | nico | 2009-10-19 14:01:14 +0200 (Mon, 19 Oct 2009) | 4 lines

save the last CALLHIST 103 for contact in othercontact and store this id with the CALLEVENT_ID

If the call is forwarded to an external number the last contact id is known in the CDR

------------------------------------------------------------------------
r18773 | raarts | 2009-10-19 11:02:14 +0200 (Mon, 19 Oct 2009) | 2 lines

Parse the RDNIS USERDATA event, and overwrite astchannel->dial, so it will show up in the reports.

------------------------------------------------------------------------
r18771 | raarts | 2009-10-17 21:26:46 +0200 (Sat, 17 Oct 2009) | 2 lines

Write more meaningful information into the CALLEVENT_ID record.

------------------------------------------------------------------------
r18770 | raarts | 2009-10-17 18:57:00 +0200 (Sat, 17 Oct 2009) | 2 lines

Start writing the src, dial and answer contact values to the astiumcdr.

------------------------------------------------------------------------
r18767 | raarts | 2009-10-17 02:39:56 +0200 (Sat, 17 Oct 2009) | 3 lines

Assign int4 of the CALLEVENT_ID history record to the contact id.
It isn't used anwhere yet, so this patch is harmless.

------------------------------------------------------------------------
r18764 | nico | 2009-10-16 16:55:59 +0200 (Fri, 16 Oct 2009) | 2 lines

Session registration hangup on blind transfer caller!

------------------------------------------------------------------------
r18761 | nico | 2009-10-16 15:52:10 +0200 (Fri, 16 Oct 2009) | 4 lines

For Calvi records the src_trunc was not copied after a transfer.
For Calvi records set (or just not) the correct chargeable on a transferred call to extern. (normal transfer type 3)
Recording once again changed for local channels. Don't do anything on a local channel!

------------------------------------------------------------------------
r18754 | nico | 2009-10-16 10:34:34 +0200 (Fri, 16 Oct 2009) | 4 lines

License read error. Only the first line was read.

Also some debug msgs removed

------------------------------------------------------------------------
r18752 | raarts | 2009-10-15 21:51:53 +0200 (Thu, 15 Oct 2009) | 2 lines

Set timeout on URL license requests. Explain how to use proxies in /etc/sysconfig/astiumd

------------------------------------------------------------------------
r18751 | raarts | 2009-10-15 21:34:45 +0200 (Thu, 15 Oct 2009) | 2 lines

Fix another core dump in license processing.

------------------------------------------------------------------------
r18750 | raarts | 2009-10-15 21:19:00 +0200 (Thu, 15 Oct 2009) | 2 lines

Fix core dump.

------------------------------------------------------------------------
r18749 | raarts | 2009-10-15 21:00:30 +0200 (Thu, 15 Oct 2009) | 2 lines

Fix bug in not zero terminating values.

------------------------------------------------------------------------
r18742 | raarts | 2009-10-15 14:07:07 +0200 (Thu, 15 Oct 2009) | 2 lines

Don't count software faxes as logged in users so they don't eat up your licenses.

------------------------------------------------------------------------
r18741 | nico | 2009-10-15 14:01:04 +0200 (Thu, 15 Oct 2009) | 2 lines

update astglobals with licusers (licensed users)

------------------------------------------------------------------------
r18738 | nico | 2009-10-15 13:17:20 +0200 (Thu, 15 Oct 2009) | 2 lines

license on in astium

------------------------------------------------------------------------
r18737 | nico | 2009-10-15 12:50:30 +0200 (Thu, 15 Oct 2009) | 2 lines

Enabled encryption on license

------------------------------------------------------------------------
r18727 | raarts | 2009-10-15 09:43:21 +0200 (Thu, 15 Oct 2009) | 2 lines

Enable license checking in A en B.

------------------------------------------------------------------------
r18723 | raarts | 2009-10-14 23:15:10 +0200 (Wed, 14 Oct 2009) | 2 lines

Reregister on signal.

------------------------------------------------------------------------
r18722 | raarts | 2009-10-14 23:03:08 +0200 (Wed, 14 Oct 2009) | 2 lines

Force re-registering when the company info for company 3 changes.

------------------------------------------------------------------------
r18720 | raarts | 2009-10-14 22:39:49 +0200 (Wed, 14 Oct 2009) | 2 lines

More doc changes, well actually dummy commits.

------------------------------------------------------------------------
r18719 | raarts | 2009-10-14 21:43:17 +0200 (Wed, 14 Oct 2009) | 2 lines

More doc added.

------------------------------------------------------------------------
r18718 | raarts | 2009-10-14 21:32:58 +0200 (Wed, 14 Oct 2009) | 2 lines

Fix spelling error in the docs.

------------------------------------------------------------------------
r18716 | nico | 2009-10-14 16:24:36 +0200 (Wed, 14 Oct 2009) | 2 lines

Add help for licenses command.

------------------------------------------------------------------------
r18715 | nico | 2009-10-14 16:23:50 +0200 (Wed, 14 Oct 2009) | 4 lines

Use the proper column names for sending company data.
Fixed crash bug (when someone was logged into the CLI and another thread was doing g_message().
Added 'licenses' CLI command.

------------------------------------------------------------------------
r18712 | nico | 2009-10-14 15:31:36 +0200 (Wed, 14 Oct 2009) | 2 lines

debug messages removed and https required.

------------------------------------------------------------------------
r18711 | nico | 2009-10-14 14:50:26 +0200 (Wed, 14 Oct 2009) | 2 lines

Changes to enable licence checks. But it's not enabled yet.

------------------------------------------------------------------------
r18699 | raarts | 2009-10-13 13:45:05 +0200 (Tue, 13 Oct 2009) | 2 lines

Send the flag Isreceptionist to the switchboard.

------------------------------------------------------------------------
r18693 | raarts | 2009-10-13 11:34:42 +0200 (Tue, 13 Oct 2009) | 2 lines

Add CMC value to astchannel messages.

------------------------------------------------------------------------
r18687 | raarts | 2009-10-12 23:19:42 +0200 (Mon, 12 Oct 2009) | 4 lines

REverse a 'fix' that was originally made for reporting, but was later 
better fixed in the reporting PHP files (by checking at call_duration
for incoming calls, and bill_duration for outgoing calls.).

------------------------------------------------------------------------
r18683 | raarts | 2009-10-12 19:56:22 +0200 (Mon, 12 Oct 2009) | 2 lines

Fixed formatting bug in writing cmc value.

------------------------------------------------------------------------
r18681 | raarts | 2009-10-12 19:28:22 +0200 (Mon, 12 Oct 2009) | 2 lines

Also enable CMC value in CALLOWNER.

------------------------------------------------------------------------
r18662 | raarts | 2009-10-09 17:54:43 +0200 (Fri, 09 Oct 2009) | 2 lines

Small code change.

------------------------------------------------------------------------
r18661 | raarts | 2009-10-09 17:46:50 +0200 (Fri, 09 Oct 2009) | 2 lines

Small logic change.

------------------------------------------------------------------------
r18659 | raarts | 2009-10-09 17:40:53 +0200 (Fri, 09 Oct 2009) | 2 lines

Added some comments. Create reason for leaving queue: queue full.

------------------------------------------------------------------------
r18658 | raarts | 2009-10-09 17:14:44 +0200 (Fri, 09 Oct 2009) | 2 lines

Small documentation fix.

------------------------------------------------------------------------
r18646 | nico | 2009-10-09 12:13:41 +0200 (Fri, 09 Oct 2009) | 4 lines

- Fill the queuelog reporting table. This immensely speeds up queue reporting.
- Some Calvi modifications (starttime transferred call)
- Fix for not cleaning up session after AsyncGoto (fixes neverending session in call detail report)

------------------------------------------------------------------------
r18631 | raarts | 2009-10-08 12:28:21 +0200 (Thu, 08 Oct 2009) | 3 lines

Switchboard calls didn't set contacttype. Fixed. Now switchboard calls are internal
and do not triger default forwarding rules, but the proper ones.

------------------------------------------------------------------------
r18610 | raarts | 2009-10-07 14:12:38 +0200 (Wed, 07 Oct 2009) | 2 lines

Rotate astiumd logs and traces. Always enable logging.

------------------------------------------------------------------------
r18592 | nico | 2009-10-05 10:25:51 +0200 (Mon, 05 Oct 2009) | 4 lines

QueueComplete event was removed for Local channels. 

We still need this event because not everything is click2dial!

------------------------------------------------------------------------
r18582 | raarts | 2009-10-04 15:54:51 +0200 (Sun, 04 Oct 2009) | 2 lines

Fix coredump when a CALLOWNER event was received without a Contact.

------------------------------------------------------------------------
r18579 | raarts | 2009-10-04 00:10:51 +0200 (Sun, 04 Oct 2009) | 3 lines

Accept the ClientCode eventfrom asterisk, and write it into the astchannel structure.
From there it will automatically be written to the astiumcdr. 

------------------------------------------------------------------------
r18577 | raarts | 2009-10-03 23:48:22 +0200 (Sat, 03 Oct 2009) | 2 lines

Write customerid and cmc into the astiumcdr. Needed by our paid-support plugin.

------------------------------------------------------------------------
r18563 | nico | 2009-10-02 16:49:53 +0200 (Fri, 02 Oct 2009) | 2 lines

info from other channel was not copied correctly in Bridge command.

------------------------------------------------------------------------
r18562 | nico | 2009-10-02 15:38:33 +0200 (Fri, 02 Oct 2009) | 6 lines

On more then 1 CDR in one call_seq remember the records flags.

On a redirect to a hold queue (with IsCaller change from SB) also copy the dial field.... Else it will be overwritten with the queue id.

On a transfer with asyncgoto (same as above) set the flag localchan to TRUE to disrecard the hangup of that (local?) channel.

------------------------------------------------------------------------
r18557 | nico | 2009-10-02 12:11:26 +0200 (Fri, 02 Oct 2009) | 4 lines

When a phoneline is busy the dial back function still answers the phone but there is no conversation.

For Calvi reports this is not requirerd, when a call end reason is busy do not set the connect time on a state UP.

------------------------------------------------------------------------
r18532 | nico | 2009-09-30 09:51:14 +0200 (Wed, 30 Sep 2009) | 4 lines

all functions that are using getparms should be searching for the last '-' in the channel name. Sometimes it's possible that the Chanel name only consists of type and username. In that case add a "-dummy" string to the channelname.

Change in the function getparms, for a SIPor IAX channel or search for the last '-' in the channel name.

------------------------------------------------------------------------
r18527 | nico | 2009-09-29 12:48:48 +0200 (Tue, 29 Sep 2009) | 4 lines

getparms fails to find the correct paramaters on channel if the company name contains a '-'

Check for second '-' in a SIP or IAX channel if the company name contains a '-'

------------------------------------------------------------------------
r18515 | nico | 2009-09-28 11:34:58 +0200 (Mon, 28 Sep 2009) | 4 lines

When external trunc is calling the report shows incorrect call flags. 

Update src_record for trunks.

------------------------------------------------------------------------
r18497 | raarts | 2009-09-24 23:42:33 +0200 (Thu, 24 Sep 2009) | 3 lines

limit the name field to 24 chars or the insert query on the astiumcdr will fail.
This is for people with very long IVR names.

------------------------------------------------------------------------
r18496 | nico | 2009-09-24 17:40:24 +0200 (Thu, 24 Sep 2009) | 4 lines

When a call ends within 1 second after answered reporting shows call duration of 0 seconds

When a call connect always add 1 sec to the connection time for rounding purposes.

------------------------------------------------------------------------
r18495 | nico | 2009-09-24 16:40:24 +0200 (Thu, 24 Sep 2009) | 4 lines

When SB puts callee in hold queue first and then calls another, reporting is incorrect

On a Bridge command check if both channels are callee's to change the src in that situation.

------------------------------------------------------------------------
r18485 | nico | 2009-09-23 12:51:46 +0200 (Wed, 23 Sep 2009) | 6 lines

when linking after a bridge the iscaller could be in the second parm instead of the first

Reverse the parms so the iscaller will be checked for recording instead of the callee!

Also on a bridge (re)set the recording option if the caller is a trunc!

------------------------------------------------------------------------
r18484 | nico | 2009-09-23 12:23:06 +0200 (Wed, 23 Sep 2009) | 5 lines

Transfering from SB to and from hold queue would overwrite dial field and increase call sequence number.

Now when a session is set for the first time on a channel in the event dial, the call sequence will increase
instead of the Transfer event when the redirtype is Hold.

------------------------------------------------------------------------
r18478 | nico | 2009-09-22 12:13:07 +0200 (Tue, 22 Sep 2009) | 10 lines

Honor forwarding solved

Report after bridging solved

Single quotes in callerid solved

Keeping track of sessions solved

Several fixes for transferring via switchboard solved

------------------------------------------------------------------------
r18476 | raarts | 2009-09-22 10:11:17 +0200 (Tue, 22 Sep 2009) | 2 lines

Protect the database queries against string values with single quotes in them.

------------------------------------------------------------------------
r18420 | raarts | 2009-09-11 09:59:34 +0200 (Fri, 11 Sep 2009) | 2 lines

Internationalize answer phone number before copying to anser field.

------------------------------------------------------------------------
r18386 | nico | 2009-09-09 15:58:58 +0200 (Wed, 09 Sep 2009) | 2 lines

added comment on important redirect from SB

------------------------------------------------------------------------
r18385 | nico | 2009-09-09 15:31:37 +0200 (Wed, 09 Sep 2009) | 4 lines

When SB dials outside line and then calls colleage and transfers the call the reporting and recording was incorrect.

Together with a small change in SB and setting the sessionid correctly it's now fixed

------------------------------------------------------------------------
r18375 | nico | 2009-09-09 12:05:37 +0200 (Wed, 09 Sep 2009) | 7 lines

1) When a call is transferred via switchboard the other party is put in the hold, this can intereferes with the recording settings
   Do when a queue is called do not (re)set the recording fields

2) small fix in duplicated statement!

3) when NewState of a phone line is changed, set the connect time to now!

------------------------------------------------------------------------
r18372 | raarts | 2009-09-09 11:03:19 +0200 (Wed, 09 Sep 2009) | 2 lines

On first time astiumd installation, add default /etc/sysconfig/astiumd

------------------------------------------------------------------------
r18371 | raarts | 2009-09-09 10:25:49 +0200 (Wed, 09 Sep 2009) | 2 lines

astiumd requires glib2 >= 2.14

------------------------------------------------------------------------
r18354 | raarts | 2009-09-08 17:57:11 +0200 (Tue, 08 Sep 2009) | 2 lines

Fix for previous fix: only update the answer field if no_cdr is not active..

------------------------------------------------------------------------
r18353 | nico | 2009-09-08 17:02:24 +0200 (Tue, 08 Sep 2009) | 5 lines

r18101 copies always the destination to the ans field, but if the call was already answered the field is overwritten and it looks like a queue has answered the call. 

Check if the ans field isn't allready filled, if so ignore the change.
This helps the reporting and actions like email the recorded call.

------------------------------------------------------------------------
r18314 | nico | 2009-09-08 10:38:56 +0200 (Tue, 08 Sep 2009) | 4 lines

transferring via switchboard doesn't copy recording fields.

On the Bridgeprep also copy the recording settings

------------------------------------------------------------------------
r18311 | nico | 2009-09-08 10:21:10 +0200 (Tue, 08 Sep 2009) | 4 lines

error in reporting for recorded conversations.

The CALLCOMPLETE records can be written out of order into the callhist

------------------------------------------------------------------------
r18294 | nico | 2009-09-07 14:46:27 +0200 (Mon, 07 Sep 2009) | 4 lines

SB does not always receive astchannel events when the line is a trunk. Only when the company is known the event is forwarded to SB.

Now always the astchannel events are sent to the subscriber list when a channel is unkown.

------------------------------------------------------------------------
r18287 | nico | 2009-09-07 09:36:45 +0200 (Mon, 07 Sep 2009) | 2 lines

Add "PAGE: " callerID prefix for phonetype 130, so even IAX phones can auto-answer.

------------------------------------------------------------------------
r18284 | raarts | 2009-09-04 22:45:39 +0200 (Fri, 04 Sep 2009) | 2 lines

New parameter for astiumd.conf: bindaddr, to allowing binding to an IP alias, so that XML pushes seem to be cmoing from the SIP registrar.

------------------------------------------------------------------------
r18283 | nico | 2009-09-04 18:19:02 +0200 (Fri, 04 Sep 2009) | 4 lines

Status on SB when transferring to conference is not changed to connect.

A mohstop from asterisk is not send, changedd the status to UP.

------------------------------------------------------------------------
r18275 | nico | 2009-09-04 14:26:16 +0200 (Fri, 04 Sep 2009) | 4 lines

Dial colleage via SB, display on phone of operator onle shows phone nr

Now the phone also display the name of the colleage.

------------------------------------------------------------------------
r18274 | nico | 2009-09-04 12:21:35 +0200 (Fri, 04 Sep 2009) | 5 lines

When a call is transfered via the SB but just before the transfer the operator switched to the first callee
(both calls were initiated by the operator, the callerid is not copied from the originating channel.

Fixed, callerid in the phone display is now correct

------------------------------------------------------------------------
r18272 | nico | 2009-09-04 11:45:48 +0200 (Fri, 04 Sep 2009) | 4 lines

In astiumcdr with honour follow on an agent the order of hangup of local channel influence the report.

Change the search order for CallerID event until the end of the session.

------------------------------------------------------------------------
r18258 | nico | 2009-09-03 17:06:04 +0200 (Thu, 03 Sep 2009) | 4 lines

prevent redirect error from switchboard.

Just reset the blind redirect if it is one!

------------------------------------------------------------------------
r18255 | nico | 2009-09-03 16:21:50 +0200 (Thu, 03 Sep 2009) | 4 lines

CMS125603 Recording *3 with honour forwarding on in a queue on the specified agent is fixed

Function to search for the other local channel is generated and when the other pair is a trunc the Monitor command is issued

------------------------------------------------------------------------
r18251 | nico | 2009-09-03 12:34:31 +0200 (Thu, 03 Sep 2009) | 12 lines

CMS125098 display callerid when transfer is done via switchboard

A new manager function is created to send an update on the callerid from astiumd.
Sipcalldisplay will update the name (if provided) and the number of the other side.

In the CALLHIST a small change was added to interped the Which id

Releasenotes: Callerid will also be displayed on the phone when transferred via the SB


!!!!!!! info in log switched R18250 with this one !!!!!!!

------------------------------------------------------------------------
r18250 | nico | 2009-09-03 12:20:47 +0200 (Thu, 03 Sep 2009) | 4 lines

Calleridname is wrong on a assisted caller transfer

Copy the Calleridname from the originating channel

------------------------------------------------------------------------
r18221 | raarts | 2009-09-01 17:08:26 +0200 (Tue, 01 Sep 2009) | 2 lines

Fixed core dump caused by my recent voicemail/MWI commit.

------------------------------------------------------------------------
r18220 | raarts | 2009-09-01 17:04:35 +0200 (Tue, 01 Sep 2009) | 2 lines

Sorry, forgot to add the voicemail sources.

------------------------------------------------------------------------
r18218 | raarts | 2009-09-01 16:55:10 +0200 (Tue, 01 Sep 2009) | 7 lines

When you delete all voicemails from the GUI, they are deleted on disk. That as fixed in a previous patch.
Only thing remaining was to switch off the voicemail indicator on the phoneset when this happened.
This is now fixed as well. Had to make a rather large patch, because in the process I discovered that
Del messages weren't being send to the switchboard in many cases when a record was changed in the GUI.
So, that's now fixed too. This should fix a longstanding bug where deleting a user from the GUI
didn't delete that user in the switchboard, but I didn't test that yet.

------------------------------------------------------------------------
r18215 | nico | 2009-09-01 15:37:23 +0200 (Tue, 01 Sep 2009) | 2 lines

sent an extra astchannel event to SB when a transfer to a conference box is done.

------------------------------------------------------------------------
r18197 | nico | 2009-08-31 12:23:11 +0200 (Mon, 31 Aug 2009) | 4 lines

Only on the last CDR record of a session a activate record was generated. 

Code is changed so that always on a CDR record an activate is generated.

------------------------------------------------------------------------
r18196 | nico | 2009-08-31 12:08:06 +0200 (Mon, 31 Aug 2009) | 4 lines

Call_flags remembered all recorded conversations.

The necessity to remember all recordings isn't necessary with the change in writing all CDR events.

------------------------------------------------------------------------
r18193 | nico | 2009-08-31 11:11:12 +0200 (Mon, 31 Aug 2009) | 4 lines

In case of Callee Transfer(type  1) caller should not be set.

With a Callee transfer the channels added as parameters are the origianl channels from the first call. And not in case of type 3 where the channels are: one of the first call and one of the second call. So only the data dial and ans should be set!

------------------------------------------------------------------------
r18187 | nico | 2009-08-28 16:55:24 +0200 (Fri, 28 Aug 2009) | 4 lines

Double MEETMEJOIN in callhist. One removed.

Releasenotes: No impact.

------------------------------------------------------------------------
r18183 | nico | 2009-08-28 14:25:24 +0200 (Fri, 28 Aug 2009) | 4 lines

session members removal changed to a function.

Releasenotes: none - internal change!

------------------------------------------------------------------------
r18178 | nico | 2009-08-28 09:49:30 +0200 (Fri, 28 Aug 2009) | 2 lines

added comment for Agent Connect situation

------------------------------------------------------------------------
r18175 | raarts | 2009-08-27 19:14:37 +0200 (Thu, 27 Aug 2009) | 3 lines

Fix for local channels. You'll normally get 2 asterisk Link events. Only
generate an CALLEVENT_LINK for one of them.

------------------------------------------------------------------------
r18174 | nico | 2009-08-27 17:38:13 +0200 (Thu, 27 Aug 2009) | 4 lines

Update on 18171.

Changed the agent_connect to the link

------------------------------------------------------------------------
r18171 | nico | 2009-08-27 16:49:30 +0200 (Thu, 27 Aug 2009) | 2 lines

Update for 18169. Try copy the dial parameter.

------------------------------------------------------------------------
r18170 | nico | 2009-08-27 15:42:05 +0200 (Thu, 27 Aug 2009) | 6 lines

When an agent in a queue honours forwarding reporting and recording is wrong.

In this case two local channels are created and the call goes through these channels. 
In case an agent connects and the channel is a local then search for the other end and move parameters to the frontend.
Also the session needs to be corrected.

------------------------------------------------------------------------
r18167 | nico | 2009-08-27 12:06:01 +0200 (Thu, 27 Aug 2009) | 4 lines

Own fix: When channel is added to a phone first check if the channel was already added.

No Impact!

------------------------------------------------------------------------
r18166 | nico | 2009-08-27 11:37:53 +0200 (Thu, 27 Aug 2009) | 4 lines

Merge hotfix when Sip call comes in and trunk cannot be found. Retrieve the trunkid from the dialplan parameter.

Fix is aprtially done with r18164. Remove extra debug function!

------------------------------------------------------------------------
r18164 | nico | 2009-08-27 11:18:18 +0200 (Thu, 27 Aug 2009) | 4 lines

CMS 125049 SB IsCaller parameter to put call in hold and change the iscaller indication.

When SB calls another when previous call is put into the hold queue the iscaller indication needs to be changed so it looks like after the transfer that the first call is calling the second one. And the first callee is displayed on the SB on the right side.

------------------------------------------------------------------------
r18159 | raarts | 2009-08-26 21:47:13 +0200 (Wed, 26 Aug 2009) | 2 lines

Small fix in prepay processing: only touch the contacts' credit balance, when it's above zero.

------------------------------------------------------------------------
r18150 | raarts | 2009-08-26 10:57:59 +0200 (Wed, 26 Aug 2009) | 2 lines

In the CLI command show phoneline also show recording status.

------------------------------------------------------------------------
r18142 | raarts | 2009-08-26 09:36:43 +0200 (Wed, 26 Aug 2009) | 3 lines

When creating an callhist or astiumcdr query honour the maximum width
of some columns in the database.

------------------------------------------------------------------------
r18141 | raarts | 2009-08-26 09:35:24 +0200 (Wed, 26 Aug 2009) | 2 lines

Support CustomerName in CALLOWNER event.

------------------------------------------------------------------------
r18131 | nico | 2009-08-25 10:37:58 +0200 (Tue, 25 Aug 2009) | 5 lines

CMS 125047 : SB pushes call into Hold queue, sessions and phones were lost

Minor changes were done to administer the correct phone on the session.
Be carefull 4 days of work !!! 6 lines changed!

------------------------------------------------------------------------
r18106 | raarts | 2009-08-21 16:00:00 +0200 (Fri, 21 Aug 2009) | 2 lines

Further improvement in CallerID handling.

------------------------------------------------------------------------
r18105 | raarts | 2009-08-21 15:54:09 +0200 (Fri, 21 Aug 2009) | 2 lines

When the CallerID or CallerIDName supplied by asterisk are 'unknown', replace that with empty strings.

------------------------------------------------------------------------
r18101 | raarts | 2009-08-21 15:20:49 +0200 (Fri, 21 Aug 2009) | 3 lines

Addedd more info to the callhist so now we can alsos show incoming
calls being hung up in IVR's and queues, Also read plugin extensions into memory.

------------------------------------------------------------------------
r18097 | raarts | 2009-08-21 12:43:20 +0200 (Fri, 21 Aug 2009) | 2 lines

Fixed warning: passing argument 1 of ‘table_reload’ discards qualifiers from pointer target type

------------------------------------------------------------------------
r18096 | raarts | 2009-08-21 12:41:48 +0200 (Fri, 21 Aug 2009) | 2 lines

Fix for sometimes using the wrong countryprefix on click2Dial.

------------------------------------------------------------------------
r18095 | raarts | 2009-08-21 12:38:44 +0200 (Fri, 21 Aug 2009) | 2 lines

Fix for recording faxes even though they were set to NO.

------------------------------------------------------------------------
r18065 | nico | 2009-08-19 13:24:08 +0200 (Wed, 19 Aug 2009) | 2 lines

merge from 1.6 : redo 18062 : %.40s for NULLS

------------------------------------------------------------------------
r18063 | nico | 2009-08-19 13:06:01 +0200 (Wed, 19 Aug 2009) | 2 lines

merge from 1.6 r  18062 : callhist parm fields should not exceed 40 bytes

------------------------------------------------------------------------
r18055 | raarts | 2009-08-19 11:39:35 +0200 (Wed, 19 Aug 2009) | 2 lines

Add commandline switch to disable Ping/Pong to asterisk.

------------------------------------------------------------------------
r18032 | nico | 2009-08-18 10:13:16 +0200 (Tue, 18 Aug 2009) | 2 lines

Forward to 2.0 svn 18025 from 1.6: Write the call end reason to the callhist and astiumcdr for all calls.

------------------------------------------------------------------------
r18016 | raarts | 2009-08-17 14:06:31 +0200 (Mon, 17 Aug 2009) | 2 lines

Building now requires asterisk-devel, because of causes.h

------------------------------------------------------------------------
r18010 | raarts | 2009-08-16 23:05:32 +0200 (Sun, 16 Aug 2009) | 11 lines

With prepay processing, take the department and company credit into
account. Basically when a person does not have anough credit to make a call,
let the department or the company pay for it. If the department and/or
company do not have anough credit, subtract it from the contact's credit balance
so afterwards you can tell who made that bloody call that wore the companies
balance out!

This code is only ever used when someone activates prepay processing on an 
Astium, (Nemop is the only one who does that), so I can safely add it
without being afraid it affects other customers.

------------------------------------------------------------------------
r17997 | nico | 2009-08-14 15:05:07 +0200 (Fri, 14 Aug 2009) | 4 lines

When a SIP/trunc is calling in and the name is set to the PEER name the trunc is unknown

In case we have a Local channel, we assume a click to dial.

------------------------------------------------------------------------
r17984 | nico | 2009-08-13 12:50:29 +0200 (Thu, 13 Aug 2009) | 7 lines

Merge from 1.6
Fix : Agentconnect will overwrite the dial field. Not neccesary!
lines removed.

release notes : reporting will have correct fields now.


------------------------------------------------------------------------
r17981 | nico | 2009-08-13 12:37:41 +0200 (Thu, 13 Aug 2009) | 4 lines

Fix on record on demand.

Wrong channel was used with mixmon, asterisk uses correct channel!

------------------------------------------------------------------------
r17974 | nico | 2009-08-13 10:11:30 +0200 (Thu, 13 Aug 2009) | 2 lines

compiler error fixed

------------------------------------------------------------------------
r17971 | nico | 2009-08-13 09:46:41 +0200 (Thu, 13 Aug 2009) | 6 lines

Now wit *3 or the record buttonn it's possible to start recording a call on demand.
Recording in astiumcfd should be set to off. And only external conversations are allowed to be recorded.
Asterisk will send Monitor Start events to start/stop recording.

Release Notes: Recording on demand!

------------------------------------------------------------------------
r17932 | nico | 2009-08-10 15:39:57 +0200 (Mon, 10 Aug 2009) | 2 lines

debug printf removed

------------------------------------------------------------------------
r17931 | nico | 2009-08-10 15:33:42 +0200 (Mon, 10 Aug 2009) | 2 lines

error in -r17929 fixed by checking Source

------------------------------------------------------------------------
r17930 | nico | 2009-08-10 14:40:30 +0200 (Mon, 10 Aug 2009) | 6 lines

merge r17929 from astiumd/nico/cms88434/src

Click to dial in switchboard fix. From SB the destphoneline is filled and now we know the correct calleridname.
And by setting the originale caller id with the fix in SB -r17927
Display on the phone and display in SB are now correct.

------------------------------------------------------------------------
r17902 | raarts | 2009-08-06 17:51:51 +0200 (Thu, 06 Aug 2009) | 2 lines

Set Full Caller ID on originate calls.

------------------------------------------------------------------------
r17901 | raarts | 2009-08-06 17:31:44 +0200 (Thu, 06 Aug 2009) | 5 lines

Use Async flag when Originating to asterisk, othewise,
the system might get stuck when the call isn't answered.
Also Now the SB shows click-to-dial calls properly and
SB originated calls as well.

------------------------------------------------------------------------
r17899 | raarts | 2009-08-06 16:17:52 +0200 (Thu, 06 Aug 2009) | 5 lines

When a record is re-read from the phonelinetable, copy
some extra fields from the phoneline memory structure,
or the system forgets to which asterisk a phoneline is
registered, and things like Originate do not work any more.

------------------------------------------------------------------------
r17884 | raarts | 2009-08-04 17:29:30 +0200 (Tue, 04 Aug 2009) | 2 lines

Allow setting 'Callhist: 0' when requesting a list of astchannels.

------------------------------------------------------------------------
r17883 | raarts | 2009-08-04 17:13:29 +0200 (Tue, 04 Aug 2009) | 2 lines

Always send CallerID and CallerIDName fields in the astchannel records.

------------------------------------------------------------------------
r17872 | raarts | 2009-08-04 11:13:07 +0200 (Tue, 04 Aug 2009) | 11 lines

Scenario: 
A calls the operator queue, operator answers, and blind transfers A to B (who is busy on the phone)
A gets placed in the busy-wait queue (waiting for B to hang up).
Now, A falls back to the operator parking queue (because B won't stop talking).
The operator pulls A out of the parking queue. But while the operator is talking to A,
B hangs up. Now in this case A was still on the waiting_callers list of B, so astiumd
pulls A out of the conversation with the operator, and connects A to B!!.

Fixed this. Now every time two channels are linked, both channels are removed from
waiting_callers lists.

------------------------------------------------------------------------
r17866 | raarts | 2009-08-03 16:45:12 +0200 (Mon, 03 Aug 2009) | 2 lines

Send the extension length value in the Company record.

------------------------------------------------------------------------
r17857 | raarts | 2009-08-03 15:05:30 +0200 (Mon, 03 Aug 2009) | 2 lines

For each contact also send the mobile phone number to subscribers (switchboard).

------------------------------------------------------------------------
r17839 | nico | 2009-07-30 16:52:45 +0200 (Thu, 30 Jul 2009) | 4 lines

Typo in QueueComplete fixed
comment for nocdr in astchannel.h changed
releasenotes:none

------------------------------------------------------------------------
r17837 | nico | 2009-07-30 15:49:10 +0200 (Thu, 30 Jul 2009) | 6 lines

transfer via switchboard als neccessary for type 2 for "cloning" sessions.

For transfer type = 2 add the channel to the operator phone when the party is set on hold.

releasenotes:none

------------------------------------------------------------------------
r17829 | nico | 2009-07-30 12:38:06 +0200 (Thu, 30 Jul 2009) | 15 lines

-- r17827 2009-07-30 12:27:29 +0200 (Thu, 30 Jul 2009)

Change to CDR for transfer via switchboard
redirtype changed to int
releasenotes:none

-- r17814 2009-07-29 17:32:16 +0200 (Wed, 29 Jul 2009)

logging of conversations via switchboard fix

When a second call is made and the first one is pushed to the hold queue the first is added to the phone queue.
This fix needs an extra option in swithboard that on every Redirect to the hold queue an extra parameter Redirtype: Hold
is added.


------------------------------------------------------------------------
r17823 | nico | 2009-07-30 12:01:55 +0200 (Thu, 30 Jul 2009) | 3 lines

Prevent possible crach in phone add channel.
releasenotes: none

------------------------------------------------------------------------
r17822 | nico | 2009-07-30 11:58:14 +0200 (Thu, 30 Jul 2009) | 5 lines

Fix transfering outside line via switchboard
when a redirect via switchboard is done the company is set in asterisk for dialplan

releasenotes: fix

------------------------------------------------------------------------
r17707 | nico | 2009-07-03 14:36:00 +0200 (Fri, 03 Jul 2009) | 2 lines

fix for forwarding call from ivr menu to "dummy" extension, correct dial number was overwritten in CALLDATA (Dial)

------------------------------------------------------------------------
r17689 | nico | 2009-07-01 12:26:40 +0200 (Wed, 01 Jul 2009) | 3 lines

merge from 1.6
added CALLEVENT_ID in MeetmeJoin for transferd conversation.

------------------------------------------------------------------------
r17684 | nico | 2009-07-01 10:16:44 +0200 (Wed, 01 Jul 2009) | 2 lines

fprintf debug statement removed

------------------------------------------------------------------------
r17682 | nico | 2009-07-01 10:12:41 +0200 (Wed, 01 Jul 2009) | 4 lines

merge from 1.6 r17681
astiumcdr changed so all call wil be logged instead of just one line.
update on conference call, sessionid set correctly for forwarded calls.

------------------------------------------------------------------------
r17646 | nico | 2009-06-29 14:58:17 +0200 (Mon, 29 Jun 2009) | 14 lines

Merge from 1.6
------------------------------------------------------------------------
r17643 -------
conference recording and transfer to conference are both recorded now with seperate session-ids

r17584 -------
prevent crash in transfer to conference


r17579 -------
recording of conferencing now controlled by astiumd
from asterisk the meetmejoin event is send to astium where a session is started for the conference.
until the last participant has left all records including astiumcdr are written

------------------------------------------------------------------------
r17638 | raarts | 2009-06-29 11:37:29 +0200 (Mon, 29 Jun 2009) | 3 lines

Ensure the forward-by-phone record is written to the callhist
as expected by list-callhist.php.

------------------------------------------------------------------------
r17635 | raarts | 2009-06-29 11:03:49 +0200 (Mon, 29 Jun 2009) | 2 lines

Re-add forwarded-by-phone history settings.

------------------------------------------------------------------------
r17611 | raarts | 2009-06-26 10:50:28 +0200 (Fri, 26 Jun 2009) | 2 lines

Fix not sending the correct tablename in ListComplete messages.

------------------------------------------------------------------------
r17580 | raarts | 2009-06-24 11:26:22 +0200 (Wed, 24 Jun 2009) | 2 lines

Fix Agent connect crash, when the original UniqueID could not be found.

------------------------------------------------------------------------
r17578 | raarts | 2009-06-24 11:14:04 +0200 (Wed, 24 Jun 2009) | 3 lines

For Local channels *only* determine the company where they belong to
so the Astchannel messages will be sent to all end users.

------------------------------------------------------------------------
r17577 | raarts | 2009-06-24 09:14:45 +0200 (Wed, 24 Jun 2009) | 2 lines

Improved decoding channelname.

------------------------------------------------------------------------
r17576 | raarts | 2009-06-23 17:39:24 +0200 (Tue, 23 Jun 2009) | 2 lines

Fix stupid coding error.

------------------------------------------------------------------------
r17574 | raarts | 2009-06-23 17:05:43 +0200 (Tue, 23 Jun 2009) | 1 line

make the fallback variable hard-transferable
------------------------------------------------------------------------
r17573 | raarts | 2009-06-23 17:05:12 +0200 (Tue, 23 Jun 2009) | 1 line

don't crash when asterisk disconnects
------------------------------------------------------------------------
r17544 | raarts | 2009-06-22 11:39:50 +0200 (Mon, 22 Jun 2009) | 4 lines

Set the outplan variable on Originate Actions, so the dialplan
knows where to send outgoing calls. Fixes the bug where the
switchboard could not dial external numbers.

------------------------------------------------------------------------
r17528 | nico | 2009-06-19 11:51:10 +0200 (Fri, 19 Jun 2009) | 8 lines

click to dial extra info in callhist
Too many events were logged in the callhist when click to dial is used.
A check is added to compare the channel name if it starts with "Local/" and several events are not logged anymore.

Also the call_flags are updated in the CALLCOMPLETE record to indicate a click to dial was used to start the call. C2D_FLAG (1 << 2)!

Rework of r17511. On Callee transfer to new extension the CallerID and Name are copied fot Event Astchannel

------------------------------------------------------------------------
r17508 | raarts | 2009-06-18 11:41:49 +0200 (Thu, 18 Jun 2009) | 3 lines

Do not take the values in phoneline.contact seriously any more.
This column will be dropped in the future.

------------------------------------------------------------------------
r17507 | nico | 2009-06-18 10:49:52 +0200 (Thu, 18 Jun 2009) | 4 lines

Click to Dial reporting fixed. The 2 calls from the queue to the extension and the required phone number are now added with a transfer event t
ype 4 from asterisk.
Also calling a queue and forwarding to an external line is now added with a transfer type 4 event.

------------------------------------------------------------------------
r17489 | raarts | 2009-06-17 08:15:40 +0200 (Wed, 17 Jun 2009) | 3 lines

In fact do not sync at all. This is ever only useful
if the entire system crashes unexpectedly.

------------------------------------------------------------------------
r17488 | raarts | 2009-06-17 08:13:14 +0200 (Wed, 17 Jun 2009) | 3 lines

Try to throttle flushing and syncing on the trace file,
so it won't clog up the system.

------------------------------------------------------------------------
r17479 | raarts | 2009-06-16 08:51:32 +0200 (Tue, 16 Jun 2009) | 2 lines

Removed extraneous format option in the 'astchannel show' command.

------------------------------------------------------------------------
r17437 | nico | 2009-06-10 15:17:51 +0200 (Wed, 10 Jun 2009) | 2 lines

merge from 1.6 CMS117492 

------------------------------------------------------------------------
r17430 | raarts | 2009-06-10 12:46:29 +0200 (Wed, 10 Jun 2009) | 2 lines

First try at decoding the owner data of a local channel.

------------------------------------------------------------------------
r17428 | raarts | 2009-06-10 11:50:02 +0200 (Wed, 10 Jun 2009) | 3 lines

When inserting an astiumcdr record, also insert an activate record,
so the recording may be mailed by astcfgd.

------------------------------------------------------------------------
r17420 | nico | 2009-06-09 16:10:58 +0200 (Tue, 09 Jun 2009) | 2 lines

merge from 1.6 CMS117492 r17388

------------------------------------------------------------------------
r17405 | raarts | 2009-06-09 13:05:41 +0200 (Tue, 09 Jun 2009) | 3 lines

Put in extra warnings for misuse of the astchannel_set_* functions.
Empty the subscriber queue in one go.

------------------------------------------------------------------------
r17391 | raarts | 2009-06-09 09:53:14 +0200 (Tue, 09 Jun 2009) | 3 lines

Try to ensure that libevent functions are  only called from the main thread,
Throttle sync'ing of error logging a bit, so it doen't slow down too much.

------------------------------------------------------------------------
r17384 | raarts | 2009-06-08 16:58:18 +0200 (Mon, 08 Jun 2009) | 15 lines

When a new activate record is found, changes should be read, and
updates should be send to subscribed clients. Problem is that reading rthe
database is handled bvy a separate thread, and that thread cannot send
data to subscribers (because that is handled thourgh libevent, which is running
in another thread). That's why a new mechanism is now put in place:
Whenever a nenw record is read from theh database, the id of that record, 
plus a pointer to a function is pushed onto an AsyncQueue. 
That queue will be emptied by a timer in the main thread, and the
function will be called, with the record id as parameter. This function
should send the upudates the the clients.

This update prevents somme crashes and lock-ups in astiumd, that
happened occasionally. It also fixes loggin in/out from queues initiated
by the switchboard. (Because previously, these occasionally crashed astiumd).

------------------------------------------------------------------------
r17376 | nico | 2009-06-08 15:02:24 +0200 (Mon, 08 Jun 2009) | 2 lines

Merge from 1.6 17295-17367 

------------------------------------------------------------------------
r17360 | raarts | 2009-06-05 14:27:05 +0200 (Fri, 05 Jun 2009) | 5 lines

Merged from 1.6:

Fix another instance where libevent was accessed from another thread.
This should never happen, it will crash or lockup astiumd.

------------------------------------------------------------------------
r17352 | raarts | 2009-06-05 12:16:10 +0200 (Fri, 05 Jun 2009) | 2 lines

Fix compile problem.

------------------------------------------------------------------------
r17307 | nico | 2009-05-28 17:09:04 +0200 (Thu, 28 May 2009) | 2 lines

Merge from 1.6 (recording flag off when no answer)

------------------------------------------------------------------------
r17297 | nico | 2009-05-28 16:15:53 +0200 (Thu, 28 May 2009) | 2 lines

Merge from 1.6 

------------------------------------------------------------------------
r17275 | nico | 2009-05-27 16:59:18 +0200 (Wed, 27 May 2009) | 2 lines

Use the correct column for recording settings

------------------------------------------------------------------------
r17267 | nico | 2009-05-27 16:05:05 +0200 (Wed, 27 May 2009) | 2 lines

Merge the astiumcdr work from 1.6 into 2.0.

------------------------------------------------------------------------
r17192 | raarts | 2009-05-18 12:24:00 +0200 (Mon, 18 May 2009) | 31 lines

Merge the following from nico/cms115874:

------------------------------------------------------------------------
r17135 | nico | 2009-05-12 14:00:52 +0200 (Tue, 12 May 2009) | 1 line

base for cms 115874
------------------------------------------------------------------------
r17152 | nico | 2009-05-13 12:04:05 +0200 (Wed, 13 May 2009) | 5 lines

Rename of astchannel field dst to ans. The destination is already in dial field and ans means now the phone that answers the call.
Small confusion corrected -> dst buffer renamed to destbuf.
Fixed charge info on a callee assisted call.
Cause on a caller assisted call fixed.

------------------------------------------------------------------------
r17162 | nico | 2009-05-14 15:11:19 +0200 (Thu, 14 May 2009) | 2 lines

Bug created in astchannel->other on rename or transfer action fixed!

------------------------------------------------------------------------
r17178 | nico | 2009-05-15 12:18:04 +0200 (Fri, 15 May 2009) | 2 lines

part 1 of Switchboard error: transfer conversation was not updated in receiving phone (int call)

------------------------------------------------------------------------
r17188 | nico | 2009-05-18 11:01:20 +0200 (Mon, 18 May 2009) | 2 lines

part 2 of transfer error on SB, if transferred the old channel has to be removed with delastchannel in SB

------------------------------------------------------------------------

------------------------------------------------------------------------
r17176 | raarts | 2009-05-15 11:22:15 +0200 (Fri, 15 May 2009) | 2 lines

Added licensing option to astiumd.

------------------------------------------------------------------------
r17171 | raarts | 2009-05-14 22:43:14 +0200 (Thu, 14 May 2009) | 13 lines

Merged some fixes from 1.6:

------------------------------------------------------------------------
r17157 | raarts | 2009-05-13 21:16:48 +0200 (Wed, 13 May 2009) | 2 lines

Try to escape single quotes in Action: History

------------------------------------------------------------------------
r17156 | raarts | 2009-05-13 21:02:54 +0200 (Wed, 13 May 2009) | 2 lines

Add Action: History for clients.


------------------------------------------------------------------------
r17170 | raarts | 2009-05-14 22:37:01 +0200 (Thu, 14 May 2009) | 8 lines

Merged recording fix from 1.6:

------------------------------------------------------------------------
r17133 | nico | 2009-05-12 13:27:05 +0200 (Tue, 12 May 2009) | 2 lines

Merged cms115562: Recording has issues.


------------------------------------------------------------------------
r17169 | raarts | 2009-05-14 22:35:35 +0200 (Thu, 14 May 2009) | 8 lines

Merged below fix from 1.6:

------------------------------------------------------------------------
r17070 | raarts | 2009-05-08 11:08:14 +0200 (Fri, 08 May 2009) | 2 lines

Fixed astiumd crash.


------------------------------------------------------------------------
r17168 | raarts | 2009-05-14 22:34:42 +0200 (Thu, 14 May 2009) | 11 lines

Merged Calvi fixes from 1.6:

------------------------------------------------------------------------
r17035 | nico | 2009-05-04 16:27:51 +0200 (Mon, 04 May 2009) | 5 lines

Fix for Calvi CDR. A call from external resulted in
the answered field containing the callerid of the caller.
Added DEBUG preprocessor value.
Added some DUMP_EVENT() calls.


------------------------------------------------------------------------
r17083 | raarts | 2009-05-08 13:13:06 +0200 (Fri, 08 May 2009) | 2 lines

Print the amount of callbacks in 'astchannel show'.

------------------------------------------------------------------------
r17061 | raarts | 2009-05-07 20:40:30 +0200 (Thu, 07 May 2009) | 2 lines

Moved a lot of code around to implement press-5-to-callback.

------------------------------------------------------------------------
r17060 | raarts | 2009-05-07 20:38:38 +0200 (Thu, 07 May 2009) | 3 lines

Greatly improved communication with asterisk. No more multithreading
errors, and use Ping/Pong to test the connection, and restart it.

------------------------------------------------------------------------
r17031 | raarts | 2009-05-03 08:37:09 +0200 (Sun, 03 May 2009) | 8 lines

Merged Calvi fixes from 1.6:

r17020 | nico | 2009-05-01 14:55:21 +0200 (Fri, 01 May 2009) | 4 lines

Fixes for Calvi support. 
Corrected Answer time, was calculated from 'now' instead of the channel start time
Fixed Assisted Transfer, Origin and Clone channels were inconsistent.

------------------------------------------------------------------------
r17030 | raarts | 2009-05-03 08:35:35 +0200 (Sun, 03 May 2009) | 7 lines

Merged login/logout fix from 1.6:

r16997 | raarts | 2009-04-28 17:16:39 +0200 (Tue, 28 Apr 2009) | 3 lines

Fix bug where user logins and logouts were not being
noticed by astiumd. 

------------------------------------------------------------------------
r16959 | raarts | 2009-04-24 21:54:05 +0200 (Fri, 24 Apr 2009) | 2 lines

Merge latest astiumd fixes from 1.6 to 2.0. 

------------------------------------------------------------------------
r16868 | raarts | 2009-04-20 10:20:41 +0200 (Mon, 20 Apr 2009) | 3 lines

A lot of work was done since we branched astiumd into a 2.0 version.
Merging forward all those changes into 2.0 again.

------------------------------------------------------------------------
r16529 | raarts | 2009-03-15 00:24:48 +0100 (Sun, 15 Mar 2009) | 2 lines

Send Phone status changes to subscribers.

------------------------------------------------------------------------
r16528 | raarts | 2009-03-14 22:12:18 +0100 (Sat, 14 Mar 2009) | 2 lines

removed some debug messages.

------------------------------------------------------------------------
r15854 | raarts | 2008-12-31 12:01:14 +0100 (Wed, 31 Dec 2008) | 2 lines

Fixes crash because of missing next_record() function calls.

------------------------------------------------------------------------
r15846 | raarts | 2008-12-30 16:22:16 +0100 (Tue, 30 Dec 2008) | 2 lines

Starting at Astium 2.0, astiumd requires libdbi plus drivers.

------------------------------------------------------------------------
r15550 | raarts | 2008-11-24 09:00:27 +0100 (Mon, 24 Nov 2008) | 2 lines

set all versions to 2.0 for astiumd

------------------------------------------------------------------------
r15532 | raarts | 2008-11-20 23:00:03 +0100 (Thu, 20 Nov 2008) | 2 lines

Add libdbi dependency to the specfile.

------------------------------------------------------------------------
r15531 | raarts | 2008-11-20 22:57:06 +0100 (Thu, 20 Nov 2008) | 2 lines

Adapted astiumd to use libdbi for database independence.

------------------------------------------------------------------------
r15530 | nnrelman | 2008-11-20 22:18:40 +0100 (Thu, 20 Nov 2008) | 1 line

start 2.0 from 1.6
------------------------------------------------------------------------
r15488 | raarts | 2008-11-14 16:35:23 +0100 (Fri, 14 Nov 2008) | 2 lines

Fix query error: only consider 'active' companies.

------------------------------------------------------------------------
r15478 | raarts | 2008-11-14 11:26:12 +0100 (Fri, 14 Nov 2008) | 3 lines

Renamed the status varialbe in the phone structure to 'state',
because that's what it's called in the database.

------------------------------------------------------------------------
r15476 | raarts | 2008-11-14 11:12:02 +0100 (Fri, 14 Nov 2008) | 2 lines

Add extra info to the Building Event. Needed by the Switchboard.

------------------------------------------------------------------------
r15464 | raarts | 2008-11-13 11:13:58 +0100 (Thu, 13 Nov 2008) | 2 lines

Add Subnet, Network, Building to Astchannel Events.

------------------------------------------------------------------------
r15436 | raarts | 2008-11-07 14:06:31 +0100 (Fri, 07 Nov 2008) | 3 lines

Not only keep a record of the total agents per queue,
but also of the number of agents that are actually logged on.

------------------------------------------------------------------------
r15390 | raarts | 2008-11-03 10:52:30 +0100 (Mon, 03 Nov 2008) | 2 lines

Remove status field reference from query, this column does not exist any more.

------------------------------------------------------------------------
r15378 | raarts | 2008-10-31 16:51:20 +0100 (Fri, 31 Oct 2008) | 2 lines

Fix a problem where queue agaent counts were not correct in the Switchboard.

------------------------------------------------------------------------
r15328 | raarts | 2008-10-28 16:58:31 +0100 (Tue, 28 Oct 2008) | 2 lines

Only load queue contact  records which have not been deleted. CMS:90494

------------------------------------------------------------------------
r15254 | james | 2008-10-17 17:06:35 +0200 (Fri, 17 Oct 2008) | 2 lines

When "Action: ShowAstchannels" is sent to the astiumd manager interface, follow each displayed astchannel record with all of the call history records on that channel (now with the time stamps included)

------------------------------------------------------------------------
r15231 | raarts | 2008-10-13 19:56:17 +0200 (Mon, 13 Oct 2008) | 3 lines

We only bill on destination channels, so carry over
the billuser flag to the destination channel.

------------------------------------------------------------------------
r15230 | raarts | 2008-10-12 17:14:42 +0200 (Sun, 12 Oct 2008) | 2 lines

Allow a CALLDATA flag to prevent the user being billed for a call.

------------------------------------------------------------------------
r15229 | raarts | 2008-10-12 12:18:04 +0200 (Sun, 12 Oct 2008) | 2 lines

Remove superfluous printf

------------------------------------------------------------------------
r15228 | raarts | 2008-10-12 12:15:42 +0200 (Sun, 12 Oct 2008) | 3 lines

Fix bug where the timewindow '0' would be searched instead of timewindow '1'.
Add feature to allow adding wildcard to a rate (the dot '.' character).

------------------------------------------------------------------------
r15212 | james | 2008-10-09 10:58:39 +0200 (Thu, 09 Oct 2008) | 3 lines

Repaired the call timeline (and brought peace to the Galaxy)
Use start of call setup for timestamp on CDR. Added Link event history record to indicate time of call connection. 

------------------------------------------------------------------------
r15204 | james | 2008-10-08 17:09:49 +0200 (Wed, 08 Oct 2008) | 5 lines

Ongoing reporting work
Fix to queue counts in the case of a caller being picked up out of the queue
Do not assume a masquerade implies a pickup - could be a transfer, so move transfer message to asterisk


------------------------------------------------------------------------
r15147 | raarts | 2008-09-23 11:17:29 +0200 (Tue, 23 Sep 2008) | 4 lines

To prevent astiumd eternally coredumping because
another one is running, kill off all other astiumd's
before starting a new one.

------------------------------------------------------------------------
r15139 | james | 2008-09-20 19:02:26 +0200 (Sat, 20 Sep 2008) | 2 lines

memory leak

------------------------------------------------------------------------
r15122 | james | 2008-09-18 16:48:47 +0200 (Thu, 18 Sep 2008) | 8 lines

Added the *5 (callback when free) functionality. Current only tested via
Action: Callback
Phoneline: <busy phoneline id>
Number: <Number to call back when free)

Code to be called from the dial plan exists bust not tested yet.


------------------------------------------------------------------------
r15121 | james | 2008-09-18 13:43:10 +0200 (Thu, 18 Sep 2008) | 2 lines

Revert to using company of switchboard client (Still no need for the switchboard to provide this)

------------------------------------------------------------------------
r15120 | james | 2008-09-18 13:02:00 +0200 (Thu, 18 Sep 2008) | 10 lines

Commit of first version of busy-queue and busy-callback features to allow switchbord to test the busy-queue part (busy-callback incomplete)
Redirect Needs:

Action: Redirect
Channel: <id of calling channel)
Number: <number to call when not busy>
ViaQueue: <extension of queue to use if busy>

Note, no Company any more

------------------------------------------------------------------------
r15100 | james | 2008-09-17 12:30:01 +0200 (Wed, 17 Sep 2008) | 2 lines

Fixed typo...

------------------------------------------------------------------------
r15095 | james | 2008-09-17 12:14:56 +0200 (Wed, 17 Sep 2008) | 3 lines

CMS: 86318
Fixed (again!) display of peer names during an assisted transfer

------------------------------------------------------------------------
r14989 | raarts | 2008-09-05 13:30:28 +0200 (Fri, 05 Sep 2008) | 3 lines

Add isocode variable to Originated channels. Need it to jump to
the proper dialplan.

------------------------------------------------------------------------
r14937 | raarts | 2008-08-29 16:56:44 +0200 (Fri, 29 Aug 2008) | 2 lines

Kill -9 all astiumd when doing service astiumd stop

------------------------------------------------------------------------
r14924 | raarts | 2008-08-27 21:57:32 +0200 (Wed, 27 Aug 2008) | 2 lines

Remove debug from asterisk_action().

------------------------------------------------------------------------
r14897 | raarts | 2008-08-26 16:31:24 +0200 (Tue, 26 Aug 2008) | 5 lines

When the Switchboard redirects a call that is currently in the queue, asterisk
does not send a MusiconHold False event. This results in an erroneous status for
that channel being sent to the switchboards.
We solve this by always resetting the moh flag when two channels are linked.

------------------------------------------------------------------------
r14890 | raarts | 2008-08-25 17:41:57 +0200 (Mon, 25 Aug 2008) | 3 lines

Add Contact Action for clients, so they can update contacts.
Currently only the Queue Pause status.

------------------------------------------------------------------------
r14889 | raarts | 2008-08-25 10:37:37 +0200 (Mon, 25 Aug 2008) | 2 lines

Send Pause along with the contact record.

------------------------------------------------------------------------
r14845 | james | 2008-08-20 10:44:32 +0200 (Wed, 20 Aug 2008) | 2 lines

Corrected position of astchannel_commit for astchannel - needs to be after the astchannel_call which writes to its buffer

------------------------------------------------------------------------
r14844 | nnrelman | 2008-08-20 10:17:05 +0200 (Wed, 20 Aug 2008) | 1 line

fixed the astiumd BuildRPMS script. No more mail boms when it failes to compile.
------------------------------------------------------------------------
r14842 | raarts | 2008-08-20 07:24:27 +0200 (Wed, 20 Aug 2008) | 2 lines

Fix compile error.

------------------------------------------------------------------------
r14841 | raarts | 2008-08-19 22:46:09 +0200 (Tue, 19 Aug 2008) | 2 lines

Removed the status field.

------------------------------------------------------------------------
r14768 | raarts | 2008-08-12 17:24:56 +0200 (Tue, 12 Aug 2008) | 6 lines

Don't copy the contact of a calling channel into the called channel.
The reports use this field to show a contact name.

Discussing this lead us to the security model in general within
astiumd, improving that has been postponed for now ;-)

------------------------------------------------------------------------
r14759 | raarts | 2008-08-12 00:10:22 +0200 (Tue, 12 Aug 2008) | 2 lines

Make astiumd log the amount of data (and size) it reads from the database.

------------------------------------------------------------------------
r14758 | raarts | 2008-08-11 22:02:25 +0200 (Mon, 11 Aug 2008) | 2 lines

Fixed NULL assertion when the database was not there at startup.

------------------------------------------------------------------------
r14757 | james | 2008-08-11 17:28:52 +0200 (Mon, 11 Aug 2008) | 2 lines

I didn't really want the XML changes - not until they are working anyway!

------------------------------------------------------------------------
r14756 | james | 2008-08-11 17:27:21 +0200 (Mon, 11 Aug 2008) | 2 lines

Corrrected situation where call is not linked (either the link event never reaches astiumd due to network problem or astiumd being down) or because call not answered. Previously two CDRs were generated, one with start date = 0.

------------------------------------------------------------------------
r14739 | raarts | 2008-08-07 22:36:29 +0200 (Thu, 07 Aug 2008) | 6 lines

Renamed variables to clarify their function, improved debug messages,
and finally fixed a bug with computing costs for 0900-xxxx and 0800-xxxx
numbers. Erik did many tests with rating the CDR's, and finally gave 
his approval. Some problems with rounding still exist, but these
show up at 5 digits after the comma only, so we'll fix that later.

------------------------------------------------------------------------
r14693 | raarts | 2008-08-05 23:57:41 +0200 (Tue, 05 Aug 2008) | 8 lines

In billing processing:
- initialize timewindow to 1 if none found
- replace all float with double for more precision
- copy all used facilities from the calling channel
  to the outgoing channel, because this will be the one
  generating a CDR. This could be improved further, for
  example keeping separate billsec values per facility..

------------------------------------------------------------------------
r14665 | raarts | 2008-08-02 22:37:20 +0200 (Sat, 02 Aug 2008) | 2 lines

Prevent Critical glib errors in case a table is empty or not loaded yet.

------------------------------------------------------------------------
r14664 | raarts | 2008-08-02 22:23:59 +0200 (Sat, 02 Aug 2008) | 3 lines

If a channel calls out on a trunk, notify trunk subscribers,
because the owner info might have been changed.

------------------------------------------------------------------------
r14662 | raarts | 2008-08-02 21:41:40 +0200 (Sat, 02 Aug 2008) | 2 lines

When the owner of a channel changes, inform trunk subscribers as well.

------------------------------------------------------------------------
r14603 | raarts | 2008-07-29 15:18:30 +0200 (Tue, 29 Jul 2008) | 2 lines

Add a history event when a phone is auto-forwarding calls.

------------------------------------------------------------------------
r14591 | raarts | 2008-07-28 22:17:32 +0200 (Mon, 28 Jul 2008) | 2 lines

Ensure that the iscaller flag is properly set in all cases.

------------------------------------------------------------------------
r14572 | raarts | 2008-07-24 15:24:50 +0200 (Thu, 24 Jul 2008) | 2 lines

Don't load deleted records.

------------------------------------------------------------------------
r14571 | raarts | 2008-07-24 15:10:32 +0200 (Thu, 24 Jul 2008) | 2 lines

Do not load deleted inbound records.

------------------------------------------------------------------------
r14570 | raarts | 2008-07-24 14:21:22 +0200 (Thu, 24 Jul 2008) | 2 lines

Send company along with inbound record.

------------------------------------------------------------------------
r14567 | raarts | 2008-07-24 07:37:47 +0200 (Thu, 24 Jul 2008) | 2 lines

Fix small bugs in astchannel_call that caused valgrind to barf.

------------------------------------------------------------------------
r14566 | raarts | 2008-07-23 23:41:35 +0200 (Wed, 23 Jul 2008) | 2 lines

Fix setting the rest of the forwarding options by the client.

------------------------------------------------------------------------
r14563 | raarts | 2008-07-23 22:35:57 +0200 (Wed, 23 Jul 2008) | 3 lines

Forgot to add table-profile.c to the Makefile.am
Fix atoi() errors.

------------------------------------------------------------------------
r14562 | raarts | 2008-07-23 22:21:47 +0200 (Wed, 23 Jul 2008) | 3 lines

Add table profile.
Add Action: PhonelineForwarding

------------------------------------------------------------------------
r14561 | raarts | 2008-07-23 17:21:02 +0200 (Wed, 23 Jul 2008) | 2 lines

Improved CLI output of 'contacttype show'.

------------------------------------------------------------------------
r14560 | raarts | 2008-07-23 17:15:52 +0200 (Wed, 23 Jul 2008) | 2 lines

Added phoneline_forwarding table.

------------------------------------------------------------------------
r14559 | raarts | 2008-07-23 17:13:20 +0200 (Wed, 23 Jul 2008) | 2 lines

Forget to add the sourcefiles for the contacttype table.

------------------------------------------------------------------------
r14555 | raarts | 2008-07-23 16:08:46 +0200 (Wed, 23 Jul 2008) | 2 lines

Fix putting wrong variable into phoneline field in an ivr.

------------------------------------------------------------------------
r14554 | raarts | 2008-07-23 15:52:51 +0200 (Wed, 23 Jul 2008) | 2 lines

Add contacttype table.

------------------------------------------------------------------------
r14545 | raarts | 2008-07-22 23:52:03 +0200 (Tue, 22 Jul 2008) | 2 lines

Added the ListScreenpos command.

------------------------------------------------------------------------
r14543 | raarts | 2008-07-22 23:24:21 +0200 (Tue, 22 Jul 2008) | 2 lines

Add screenpos table to astiumd.

------------------------------------------------------------------------
r14542 | raarts | 2008-07-22 23:08:34 +0200 (Tue, 22 Jul 2008) | 2 lines

Add new client action: Screenpos for use by the switchboard.

------------------------------------------------------------------------
r14534 | raarts | 2008-07-22 16:10:58 +0200 (Tue, 22 Jul 2008) | 2 lines

Do not transfer the handsfree option to the called channel.

------------------------------------------------------------------------
r14501 | raarts | 2008-07-18 15:51:56 +0200 (Fri, 18 Jul 2008) | 5 lines

Fixed DDI, IsCaller settings to make StartOnConnect/StartOnRing working
again in the switchboard. Also use new_astchannel_event() function for
generating all Astchannel Events instead of having to maintain that
code in two places.

------------------------------------------------------------------------
r14489 | raarts | 2008-07-17 13:14:31 +0200 (Thu, 17 Jul 2008) | 4 lines

Changed some processing as a result of removing the macro's in the dialplan.
Removed the extra parameters for indicating the caller on ringing or connect.
It's just as easily available in the other's astchannel structure.

------------------------------------------------------------------------
r14465 | james | 2008-07-14 15:17:53 +0200 (Mon, 14 Jul 2008) | 2 lines

Added support for new tables for use by the new dialplan switchboard application.

------------------------------------------------------------------------
r14459 | raarts | 2008-07-11 11:10:05 +0200 (Fri, 11 Jul 2008) | 3 lines

Send callhist records in raw format to the clients instead
of trying to make them readable. Only add a short text description.

------------------------------------------------------------------------
r14454 | raarts | 2008-07-09 20:43:46 +0200 (Wed, 09 Jul 2008) | 2 lines

Added extra test, and prevented core dump.

------------------------------------------------------------------------
r14407 | james | 2008-06-30 16:49:17 +0200 (Mon, 30 Jun 2008) | 2 lines

Not needed as astchannel_rename does this (when needed)

------------------------------------------------------------------------
r14397 | raarts | 2008-06-29 17:12:20 +0200 (Sun, 29 Jun 2008) | 4 lines

Assign a more readable id to channels. Use the last part of the unique id assigned
by asterisk. This currently works for when there is only one asterisk connected.
Should be fixed for multiple asterisks later I guess.

------------------------------------------------------------------------
r14396 | raarts | 2008-06-29 15:20:53 +0200 (Sun, 29 Jun 2008) | 2 lines

Fix phonelines being read incorrectly for contacts.

------------------------------------------------------------------------
r14395 | raarts | 2008-06-29 14:54:43 +0200 (Sun, 29 Jun 2008) | 3 lines

Fix Handsfree option for Originate Action, by adding SIP headers
to the variable list.

------------------------------------------------------------------------
r14385 | james | 2008-06-27 10:08:03 +0200 (Fri, 27 Jun 2008) | 2 lines

Added handsfree option to "Originate" request from client

------------------------------------------------------------------------
r14384 | raarts | 2008-06-26 22:47:03 +0200 (Thu, 26 Jun 2008) | 2 lines

Automatically restart astiumd whenever it exits.

------------------------------------------------------------------------
r14383 | james | 2008-06-26 15:42:30 +0200 (Thu, 26 Jun 2008) | 2 lines

Added astchannel event to Rename event handler

------------------------------------------------------------------------
r14381 | james | 2008-06-26 10:30:52 +0200 (Thu, 26 Jun 2008) | 3 lines

Ignore deleted departments when getting contact details (prevents empty department field on the switchboard). Redundant contact_department reco
rds will need to be deleetd also.

------------------------------------------------------------------------
r14380 | james | 2008-06-25 17:04:06 +0200 (Wed, 25 Jun 2008) | 2 lines

Added extra messages for channel link and unlink events

------------------------------------------------------------------------
r14375 | james | 2008-06-25 14:25:44 +0200 (Wed, 25 Jun 2008) | 2 lines

Missed the channel record when adding extra security - broke the switchboard's call monitoring

------------------------------------------------------------------------
r14372 | james | 2008-06-24 15:22:29 +0200 (Tue, 24 Jun 2008) | 2 lines

Improved hangup function behaviour. Changed disconnect reason code to 16 when unknown.

------------------------------------------------------------------------
r14369 | james | 2008-06-24 10:52:13 +0200 (Tue, 24 Jun 2008) | 3 lines

Fixed removal of dead channels after an asterisk connection outage
Added the maximum known billing duration and call history to dead channel CDRs 

------------------------------------------------------------------------
r14358 | james | 2008-06-23 11:20:58 +0200 (Mon, 23 Jun 2008) | 4 lines

Populate table-network company field valia the building table to extend security fix
Pickup event handler to suppress initial CDR before pickup and generate history for reports
Removed some unused queue status code

------------------------------------------------------------------------
r14344 | james | 2008-06-19 17:07:53 +0200 (Thu, 19 Jun 2008) | 2 lines

Enhancement to security to try to fix CMS:78647

------------------------------------------------------------------------
r14334 | james | 2008-06-19 12:20:41 +0200 (Thu, 19 Jun 2008) | 2 lines

removed unnecessary (and faulty!) queue pause display status update at startup

------------------------------------------------------------------------
r14324 | james | 2008-06-17 13:15:46 +0200 (Tue, 17 Jun 2008) | 2 lines

Restored the test for Aaastra phone

------------------------------------------------------------------------
r14323 | james | 2008-06-17 12:48:02 +0200 (Tue, 17 Jun 2008) | 2 lines

Oops - I was using contact id instead of phone id (happened to to be the same in my testing so I didn't notice)

------------------------------------------------------------------------
r14321 | james | 2008-06-17 12:33:29 +0200 (Tue, 17 Jun 2008) | 2 lines

Added queue pause indication reset at startup.

------------------------------------------------------------------------
r14320 | james | 2008-06-17 09:52:10 +0200 (Tue, 17 Jun 2008) | 3 lines

Support for queue pause indication on Aastra


------------------------------------------------------------------------
r14319 | james | 2008-06-17 09:50:45 +0200 (Tue, 17 Jun 2008) | 3 lines

Support for queue pause indication on Aastra


------------------------------------------------------------------------
r14318 | james | 2008-06-17 09:48:09 +0200 (Tue, 17 Jun 2008) | 3 lines

Support for queue pause indication on Aastra


------------------------------------------------------------------------
r14317 | james | 2008-06-17 09:46:07 +0200 (Tue, 17 Jun 2008) | 3 lines

table-contact.c


------------------------------------------------------------------------
r14316 | james | 2008-06-17 09:43:55 +0200 (Tue, 17 Jun 2008) | 3 lines

Support for queue pause indication on Aastra


------------------------------------------------------------------------
r14315 | james | 2008-06-17 09:42:21 +0200 (Tue, 17 Jun 2008) | 2 lines

Support for queue pause indication on Aastra

------------------------------------------------------------------------
r14312 | james | 2008-06-16 16:57:40 +0200 (Mon, 16 Jun 2008) | 2 lines

Bug fix. Need to set queue agent counts at startup

------------------------------------------------------------------------
r14274 | james | 2008-06-09 09:37:47 +0200 (Mon, 09 Jun 2008) | 4 lines

Reverse changes in previous commit (queue pause on aastra, 
let xml_push use lib_event, and nightly queue stats reset),
they were meant for another branch.

------------------------------------------------------------------------
r14254 | james | 2008-06-06 16:25:23 +0200 (Fri, 06 Jun 2008) | 4 lines

Added queue-pause indication for Aastra phones
Changed xml_push to use libevent not threads
Fix to nightly queue stats reset

------------------------------------------------------------------------
r14229 | james | 2008-06-05 13:32:09 +0200 (Thu, 05 Jun 2008) | 3 lines

Restored some queue event handling stuff that didn't make it through the last commit
Fixed so that /usr/local/astium/cron/astium.maint will reset queue statistics and will notify any switch boards

------------------------------------------------------------------------
r14214 | james | 2008-06-02 15:35:02 +0200 (Mon, 02 Jun 2008) | 2 lines

Added missing function queue_get_phoneline()

------------------------------------------------------------------------
r14211 | james | 2008-06-02 14:49:57 +0200 (Mon, 02 Jun 2008) | 2 lines

Bring in missing client action code for logging in and out of agent into queues.

------------------------------------------------------------------------
r14208 | james | 2008-06-02 14:06:59 +0200 (Mon, 02 Jun 2008) | 2 lines

Commit adding/removing contacts to queues by the switchboard.

------------------------------------------------------------------------
r14147 | james | 2008-05-15 17:13:08 +0200 (Thu, 15 May 2008) | 2 lines

For failed queued calls no real dest channel is created. Astiumd creates a fake one but this needs to have the company of the destination queue for reporting of such calls to work.

------------------------------------------------------------------------
r14071 | raarts | 2008-04-21 12:37:02 +0200 (Mon, 21 Apr 2008) | 2 lines

Also send the max # of incoming and the max # of outgoing calls with trunk info.

------------------------------------------------------------------------
r14060 | raarts | 2008-04-18 23:44:04 +0200 (Fri, 18 Apr 2008) | 2 lines

Better test for trunk.

------------------------------------------------------------------------
r14059 | raarts | 2008-04-18 23:32:25 +0200 (Fri, 18 Apr 2008) | 3 lines

Give warning when we can't determine if a SIP IAX channel 
is a trunk or a phoneline.

------------------------------------------------------------------------
r14037 | raarts | 2008-04-16 17:38:20 +0200 (Wed, 16 Apr 2008) | 2 lines

Send the server time with every pong reply.

------------------------------------------------------------------------
r14030 | raarts | 2008-04-16 13:25:14 +0200 (Wed, 16 Apr 2008) | 3 lines

In the Pong response, note the server time, so the client can
relate received times to that time.

------------------------------------------------------------------------
r13990 | raarts | 2008-04-14 16:13:04 +0200 (Mon, 14 Apr 2008) | 2 lines

Fix for crash.

------------------------------------------------------------------------
r13985 | raarts | 2008-04-13 22:07:46 +0200 (Sun, 13 Apr 2008) | 2 lines

Fix compile error.

------------------------------------------------------------------------
r13983 | raarts | 2008-04-13 09:09:03 +0200 (Sun, 13 Apr 2008) | 3 lines

Restore the function of the duration field. this is not the total billable seconds,
but the total duration of the call (including ringing, moh etc).

------------------------------------------------------------------------
r13975 | raarts | 2008-04-12 18:05:19 +0200 (Sat, 12 Apr 2008) | 8 lines

Removed UserEventINBOUND. It's function is now taken over by UserEventCALLDATA.
Remember Position and Count when a user enters a queue.
Add DDI to CALLDATA, so itwill be written to the astium CDR.
Improved more logging messages, removed unused code,
The 'astchannel show' command on the astiumd CLI now displays all phonenumbers involved.
When computing billing seconds for a call, take into account that a caller might be
coonnected and disconnected to multiple parties in one call.

------------------------------------------------------------------------
r13973 | raarts | 2008-04-12 15:49:54 +0200 (Sat, 12 Apr 2008) | 2 lines

Improved error messages. Support Large files (>2GB).

------------------------------------------------------------------------
r13970 | raarts | 2008-04-11 16:24:54 +0200 (Fri, 11 Apr 2008) | 2 lines

Moved fork before event_init(). I hope this will improve stability.

------------------------------------------------------------------------
r13905 | ivar | 2008-04-06 23:50:11 +0200 (Sun, 06 Apr 2008) | 4 lines

When a phone registers, and we set the subnet where it is located, 
skip subnets in the database with invalid values for ipaddress, netmask.
Solves the problem where phones change location after rebooting.

------------------------------------------------------------------------
r13890 | raarts | 2008-04-06 00:22:19 +0200 (Sun, 06 Apr 2008) | 2 lines

Fix query error in subquery.

------------------------------------------------------------------------
r13889 | raarts | 2008-04-05 23:36:55 +0200 (Sat, 05 Apr 2008) | 4 lines

Queue events were not showing up in the reports. True. 
Queues are not really phone or trunk channels. So now
I create 'fake' channels to ensure we have CDR.

------------------------------------------------------------------------
r13887 | raarts | 2008-04-05 20:46:30 +0200 (Sat, 05 Apr 2008) | 2 lines

Removed call.c and call.h. Code moved to astchannel.c.

------------------------------------------------------------------------
r13882 | raarts | 2008-04-05 13:26:41 +0200 (Sat, 05 Apr 2008) | 2 lines

When a call was being recorded it didn't show up in the CDR. Fixed.

------------------------------------------------------------------------
r13855 | raarts | 2008-03-31 18:00:25 +0200 (Mon, 31 Mar 2008) | 3 lines

Copy the monitoring and recording status to the destination channel,
so the astium_cdr can set the 'recorded' flag to true if necessary.

------------------------------------------------------------------------
r13854 | raarts | 2008-03-31 17:49:02 +0200 (Mon, 31 Mar 2008) | 3 lines

Revert James' changes. James please break up the change into smaller
pieces, so we can test them separately.

------------------------------------------------------------------------
r13847 | james | 2008-03-28 15:10:16 +0100 (Fri, 28 Mar 2008) | 3 lines

Added dummy trunks to aid with reporting. Fixed a number of bugs


------------------------------------------------------------------------
r13843 | raarts | 2008-03-27 22:36:34 +0100 (Thu, 27 Mar 2008) | 2 lines

Fix Call forwarding settings that are set by the client.

------------------------------------------------------------------------
r13813 | james | 2008-03-25 15:39:40 +0100 (Tue, 25 Mar 2008) | 3 lines

Added (partial) support for QueueStatus on the client interface


------------------------------------------------------------------------
r13770 | raarts | 2008-03-17 16:37:09 +0100 (Mon, 17 Mar 2008) | 3 lines

When an agent is being called from the queue, copy over the src, via, dst variables
from the calling channel into the callee channel.

------------------------------------------------------------------------
r13764 | raarts | 2008-03-15 22:45:07 +0100 (Sat, 15 Mar 2008) | 2 lines

Send correct queue and trunk info to the client.

------------------------------------------------------------------------
r13763 | raarts | 2008-03-15 16:39:00 +0100 (Sat, 15 Mar 2008) | 3 lines

Only update the astiumdaid value in astglobals
when necessary.

------------------------------------------------------------------------
r13735 | james | 2008-03-12 13:13:38 +0100 (Wed, 12 Mar 2008) | 2 lines

Added channel CLI utility to display calls

------------------------------------------------------------------------
r13725 | james | 2008-03-12 10:19:07 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13724 | james | 2008-03-12 10:18:57 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13723 | james | 2008-03-12 10:18:48 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13722 | james | 2008-03-12 10:18:37 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13721 | james | 2008-03-12 10:18:29 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13720 | james | 2008-03-12 10:18:16 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13719 | james | 2008-03-12 10:18:07 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13718 | james | 2008-03-12 10:17:54 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13717 | james | 2008-03-12 10:17:44 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13716 | james | 2008-03-12 10:17:35 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13715 | james | 2008-03-12 10:17:26 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13714 | james | 2008-03-12 10:17:17 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13713 | james | 2008-03-12 10:17:02 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13712 | james | 2008-03-12 10:16:51 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13711 | james | 2008-03-12 10:16:40 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13710 | james | 2008-03-12 10:16:28 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13709 | james | 2008-03-12 10:16:15 +0100 (Wed, 12 Mar 2008) | 1 line

Numerous changes, especially to CDRs/rating, and the removal of the call structure
------------------------------------------------------------------------
r13708 | james | 2008-03-12 10:14:56 +0100 (Wed, 12 Mar 2008) | 2 lines

Numerous changes, especially to CDRs/rating, and the removal of the call structure

------------------------------------------------------------------------
r13670 | raarts | 2008-03-10 12:21:50 +0100 (Mon, 10 Mar 2008) | 2 lines

Upgrading to astiumd also obsoletes astmanproxy.

------------------------------------------------------------------------
r13660 | raarts | 2008-03-07 00:29:59 +0100 (Fri, 07 Mar 2008) | 2 lines

Fixed bug that created duplicate channels.

------------------------------------------------------------------------
r13658 | raarts | 2008-03-06 21:49:21 +0100 (Thu, 06 Mar 2008) | 2 lines

Implemented Bridge Action.

------------------------------------------------------------------------
r13456 | nnrelman | 2008-02-19 11:50:11 +0100 (Tue, 19 Feb 2008) | 1 line

Added BuildRequires to the astiumd specfile.
------------------------------------------------------------------------
r13435 | raarts | 2008-02-18 12:12:31 +0100 (Mon, 18 Feb 2008) | 2 lines

Added trace option. 

------------------------------------------------------------------------
r13189 | raarts | 2008-01-27 23:47:38 +0100 (Sun, 27 Jan 2008) | 2 lines

Fix crash.

------------------------------------------------------------------------
r13123 | raarts | 2008-01-22 10:33:37 +0100 (Tue, 22 Jan 2008) | 2 lines

It's really convenient if source actually compiles...

------------------------------------------------------------------------
r13122 | raarts | 2008-01-22 10:08:39 +0100 (Tue, 22 Jan 2008) | 5 lines

Added Action: PutOnHold and Action: ReturnFromHold.
Fixed SIGPIPE crashes.
Added field to each Event: ListComplete to indicate
which list we are talking about.

------------------------------------------------------------------------
r13111 | raarts | 2008-01-19 01:55:47 +0100 (Sat, 19 Jan 2008) | 3 lines

Added the option IsCaller to AST channels, to let channels know 
if they are calling or being called.

------------------------------------------------------------------------
r13105 | raarts | 2008-01-18 18:01:48 +0100 (Fri, 18 Jan 2008) | 2 lines

Fixes to set correct callerdata values (source, via, dial, dest).

------------------------------------------------------------------------
r13077 | raarts | 2008-01-16 23:47:34 +0100 (Wed, 16 Jan 2008) | 2 lines

Now generates CDR records again. Still needs testing though.

------------------------------------------------------------------------
r13056 | raarts | 2008-01-15 23:03:25 +0100 (Tue, 15 Jan 2008) | 3 lines

Use the proper context for Redirect.
Process activate record with which = 0 as table reloads.

------------------------------------------------------------------------
r13031 | raarts | 2008-01-13 23:44:08 +0100 (Sun, 13 Jan 2008) | 2 lines

Remove channel from queue when transferring.

------------------------------------------------------------------------
r13030 | raarts | 2008-01-13 23:24:51 +0100 (Sun, 13 Jan 2008) | 2 lines

Remove a tranfered call from its queu.

------------------------------------------------------------------------
r13024 | raarts | 2008-01-13 16:19:20 +0100 (Sun, 13 Jan 2008) | 6 lines

Ensure all clients always receive records with id=1
Implement Action: Redirect, so clients can transfer channels.
Implement Action: Hangup, so clients are able to hangup channels
Ensure no CDR is generated on calls initiated by a Queue, even when 
the phone is unreachable.

------------------------------------------------------------------------
r13016 | raarts | 2008-01-11 15:10:44 +0100 (Fri, 11 Jan 2008) | 2 lines

Deleted a line too many in the previous fix

------------------------------------------------------------------------
r13015 | raarts | 2008-01-11 15:02:58 +0100 (Fri, 11 Jan 2008) | 2 lines

Don't crash when trying to delete a non-existing record.

------------------------------------------------------------------------
r13008 | raarts | 2008-01-11 09:04:07 +0100 (Fri, 11 Jan 2008) | 2 lines

Fix compile error

------------------------------------------------------------------------
r13007 | raarts | 2008-01-11 09:01:57 +0100 (Fri, 11 Jan 2008) | 2 lines

Fix compile error on some gcc versions.

------------------------------------------------------------------------
r13006 | raarts | 2008-01-11 08:47:00 +0100 (Fri, 11 Jan 2008) | 2 lines

Update Queue and Queuecontact stats.

------------------------------------------------------------------------
r12983 | raarts | 2008-01-10 01:20:42 +0100 (Thu, 10 Jan 2008) | 4 lines

Fix QueueStatus when connecting to asterisk.
Fix adding calls to queue.
fix disappearing ast channels

------------------------------------------------------------------------
r12979 | raarts | 2008-01-09 12:16:26 +0100 (Wed, 09 Jan 2008) | 5 lines

Fixed two crashes.
When add a channel to a trunk of phoneline, first check if it's already there
Show asterisk server in CLI 'astchannel show' output
Add More info to astchannel response.

------------------------------------------------------------------------
r12974 | raarts | 2008-01-09 08:28:17 +0100 (Wed, 09 Jan 2008) | 5 lines

(Re)registration of a phone now correctly points the phoneline
record to the correct asterisk server.
When logging in a client, send important indicators, so client
software will know what NOT to display.

------------------------------------------------------------------------
r12972 | raarts | 2008-01-08 17:57:02 +0100 (Tue, 08 Jan 2008) | 3 lines

Big update, so we can now call colleagues from the OSB.
Also, we now know on which asterisk a phoneline is registered.

------------------------------------------------------------------------
r12912 | raarts | 2007-12-28 20:57:21 +0100 (Fri, 28 Dec 2007) | 2 lines

Support in astiumd for setting forwarding options from the OSB.

------------------------------------------------------------------------
r12909 | raarts | 2007-12-28 17:11:51 +0100 (Fri, 28 Dec 2007) | 2 lines

Astiumd requires libevent, glib2 and postgresql

------------------------------------------------------------------------
r12908 | raarts | 2007-12-28 16:47:03 +0100 (Fri, 28 Dec 2007) | 3 lines

Fix disappearing calls when forwarded by a phone.
Added handling of Forward Event. Still incomplete though..

------------------------------------------------------------------------
r12899 | raarts | 2007-12-27 17:25:55 +0100 (Thu, 27 Dec 2007) | 5 lines

Added doc on phone-forwarded calls.
Fix callhist layout bug.
Calls that are forwarded by CFWD settings on phones
disappear in the OSB. Make a start solving that.

------------------------------------------------------------------------
r12897 | raarts | 2007-12-27 15:37:27 +0100 (Thu, 27 Dec 2007) | 2 lines

Finally, attended callee transfers work, and show up in the OSB correctly!

------------------------------------------------------------------------
r12894 | raarts | 2007-12-27 12:24:38 +0100 (Thu, 27 Dec 2007) | 3 lines

Fixed lots of bugs. Make sure phonelines only know about calls and not 
channels. Make queue calls working again in the OSB.

------------------------------------------------------------------------
r12875 | raarts | 2007-12-21 21:47:49 +0100 (Fri, 21 Dec 2007) | 2 lines

Fix phoneline query.

------------------------------------------------------------------------
r12859 | raarts | 2007-12-21 08:57:45 +0100 (Fri, 21 Dec 2007) | 3 lines

Ignore SIGPIPE or the program crashes.
Add first part of log events for the OSB log windows

------------------------------------------------------------------------
r12810 | raarts | 2007-12-18 21:03:09 +0100 (Tue, 18 Dec 2007) | 2 lines

Fix queue processing in astiumd, and displaying status in astium-osb.

------------------------------------------------------------------------
r12809 | raarts | 2007-12-18 19:57:57 +0100 (Tue, 18 Dec 2007) | 3 lines

Rewrote channel/call processing to be easier
to understand, and to work with. It's still not *that* easy though..

------------------------------------------------------------------------
r12678 | raarts | 2007-12-07 11:52:39 +0100 (Fri, 07 Dec 2007) | 2 lines

Document asterisk manager interface messages for specific user actions.

------------------------------------------------------------------------
r12675 | raarts | 2007-12-07 11:28:30 +0100 (Fri, 07 Dec 2007) | 7 lines

This was a tough one: Call Transfer. This works as follows. There are
basically 2 calls right before a call transfer. The caller info from
the first call is copied over the caller info from the second call.
The first call is hung up without leaving a CDR behind.
To the subscribers the second call is hung up, and a new call is sent,
with the same Uniqueid.

------------------------------------------------------------------------
r12672 | raarts | 2007-12-06 23:34:32 +0100 (Thu, 06 Dec 2007) | 2 lines

Add email to the contact record, so the OSB client has email addresses available.

------------------------------------------------------------------------
r12666 | raarts | 2007-12-05 16:05:15 +0100 (Wed, 05 Dec 2007) | 3 lines

When a call is connected through a queue, remember that in
the call data.

------------------------------------------------------------------------
r12631 | raarts | 2007-12-02 23:03:03 +0100 (Sun, 02 Dec 2007) | 3 lines

Now keep two states in a call, for source and destination.
Also fixed calls to work with queues.

------------------------------------------------------------------------
r12628 | raarts | 2007-11-30 17:52:21 +0100 (Fri, 30 Nov 2007) | 2 lines

Fix losing volatile data after processing an activate record.

------------------------------------------------------------------------
r12627 | raarts | 2007-11-30 17:04:45 +0100 (Fri, 30 Nov 2007) | 4 lines

Support Oldest: giving the time the oldest caller
entered a queue. All This to facilitate the display
of 'longest waiting' in the OSB.

------------------------------------------------------------------------
r12624 | raarts | 2007-11-30 00:52:20 +0100 (Fri, 30 Nov 2007) | 2 lines

Added more queue stats. the only thing left is longest waiting..

------------------------------------------------------------------------
r12623 | raarts | 2007-11-29 23:29:43 +0100 (Thu, 29 Nov 2007) | 4 lines

Added table-network for display employee location.
Added queue statistics
Small housekeeping.

------------------------------------------------------------------------
r12622 | raarts | 2007-11-29 23:15:08 +0100 (Thu, 29 Nov 2007) | 2 lines

Added statistics to Queue table.

------------------------------------------------------------------------
r12616 | raarts | 2007-11-28 22:08:10 +0100 (Wed, 28 Nov 2007) | 16 lines

A call goes like this: As soon as a person dials, a channel is
created and the channel enters the dialplan. when the dialplan
reaches the asterisk Dial() command, another channel is created,
and asterisk sends an Event: Newchannel. (astiumd will create
a new call, because he cannot know if this is just a channel
for a new call, or the second channel for a Dial()).
Immediately after that, an Event: Call is sent. Now astiumd
knows that the just created channel was in fact the second
leg for the first call. The Call is deleted, and an Event: DelCall
is sent. the destination data of the first call will be filled
in with the source data of the to-be-deleted call, and an update
is sent for the first call. 

Previously all this work was done when linking two channels, but
that is too late.

------------------------------------------------------------------------
r12600 | raarts | 2007-11-26 00:24:40 +0100 (Mon, 26 Nov 2007) | 4 lines

Lots of work con creating Call Events, CallHist events, 
creating virtual contacts for the duration of a call
CDR improvement work etcetera.

------------------------------------------------------------------------
r12595 | raarts | 2007-11-23 20:56:10 +0100 (Fri, 23 Nov 2007) | 2 lines

Forgot to add these files in the previous commit

------------------------------------------------------------------------
r12594 | raarts | 2007-11-23 16:24:40 +0100 (Fri, 23 Nov 2007) | 6 lines

Integrate astchannel.c with asterisk.c, this is where it belongs.
Create 'call' table. This exists only in memory, contains
records of active calls. Removed the call information from
the astchannel, and put that into the call record.
Created ways to simplify sending updates of events to clients.

------------------------------------------------------------------------
r12561 | raarts | 2007-11-19 12:51:50 +0100 (Mon, 19 Nov 2007) | 2 lines

Terminate all Events sent to clients with an extra \r\n, of course.

------------------------------------------------------------------------
r12560 | raarts | 2007-11-19 12:49:19 +0100 (Mon, 19 Nov 2007) | 2 lines

Forgot to process a couple of client actions

------------------------------------------------------------------------
r12559 | raarts | 2007-11-19 12:47:28 +0100 (Mon, 19 Nov 2007) | 3 lines

This solves a crash, where a client disconnected, but 
his subscriptions were not being deleted.

------------------------------------------------------------------------
r12550 | raarts | 2007-11-17 16:44:02 +0100 (Sat, 17 Nov 2007) | 2 lines

Notify clients if a record is added or deleted in some table.

------------------------------------------------------------------------
r12477 | raarts | 2007-11-10 23:54:01 +0100 (Sat, 10 Nov 2007) | 5 lines

when you exec valgrind on a program, you always find more bugs. Like:
- don't use the *_insert() functions from glib, but use *_replace() instead
- Don't mix the g_slice*() with the malloc() functions.
- Check if records are found in the postgresql query, before processing them

------------------------------------------------------------------------
r12429 | raarts | 2007-11-04 22:24:08 +0100 (Sun, 04 Nov 2007) | 2 lines

Porcess musiconhold events in astiumd

------------------------------------------------------------------------
r12419 | raarts | 2007-11-04 16:32:46 +0100 (Sun, 04 Nov 2007) | 2 lines

changed some code around for better UserEvent processing from the dialplan.

------------------------------------------------------------------------
r12412 | raarts | 2007-11-02 13:18:31 +0100 (Fri, 02 Nov 2007) | 4 lines

Now use one UserEvent for history logging: UserEventCALLHIST.
Look at the dialplan to see how it must be used.
Look in list-callhist.php to see what all codes mean.

------------------------------------------------------------------------
r12399 | raarts | 2007-11-01 20:50:51 +0100 (Thu, 01 Nov 2007) | 2 lines

Don't set options when id = 1, don't even search when id = 1.

------------------------------------------------------------------------
r12396 | raarts | 2007-11-01 12:37:17 +0100 (Thu, 01 Nov 2007) | 5 lines

Only generate callhist, when a corresponding CDR has been generated, 
and clean them up always.
Reason should start with an 'R' , not an 'r'.
Use last queue id in callhist when wrinting a LEAVE record.

------------------------------------------------------------------------
r12392 | raarts | 2007-11-01 00:31:27 +0100 (Thu, 01 Nov 2007) | 2 lines

Nog generates queue event records in the callhist table.

------------------------------------------------------------------------
r12390 | raarts | 2007-10-31 22:21:57 +0100 (Wed, 31 Oct 2007) | 2 lines

Process the first four UserEvents: CFWD & friends.

------------------------------------------------------------------------
r12384 | raarts | 2007-10-31 19:42:05 +0100 (Wed, 31 Oct 2007) | 3 lines

Lock the database when processing, so table reloads from the CLI
don't interfere with processing in the database thread

------------------------------------------------------------------------
r12348 | raarts | 2007-10-28 09:34:31 +0100 (Sun, 28 Oct 2007) | 2 lines

astiumd can now replace astmand. Astmand has been dropped as of now.

------------------------------------------------------------------------
r12347 | raarts | 2007-10-28 09:05:12 +0100 (Sun, 28 Oct 2007) | 6 lines

Introduced -v commandline option, split the 'log' command in the CLI
into 'debug' and 'verbose' commands. Made some preparation for 
introducing a 'subscribe' command to the CLI. This will enable us to
only look at relevant live logging information instead of having to wade
through thousands and thousands of loglines....

------------------------------------------------------------------------
r12346 | raarts | 2007-10-27 23:54:48 +0200 (Sat, 27 Oct 2007) | 5 lines

Now all tables are updated when an activate record is found.
Exception are rateplans, on any change all rateplans are
totally refreshed. This because rateplans are complicated
and I am lazy.

------------------------------------------------------------------------
r12345 | raarts | 2007-10-27 18:20:01 +0200 (Sat, 27 Oct 2007) | 11 lines

Contacts are now automatically added/modified/deleted in
memory, when the webinterface deletes them in teh database,
Now the rest of the tables...
--This line, those below, will be ignored--

M    src/cli.c
M    src/database.c
M    src/table-contact.c
M    src/table.c
M    src/table.h

------------------------------------------------------------------------
r12341 | raarts | 2007-10-27 14:47:41 +0200 (Sat, 27 Oct 2007) | 2 lines

Don't generated a CDR for calls initiated by the queue application.

------------------------------------------------------------------------
r12317 | raarts | 2007-10-26 00:28:15 +0200 (Fri, 26 Oct 2007) | 2 lines

Process DDI UserEvents from the dialplan.

------------------------------------------------------------------------
r12316 | raarts | 2007-10-26 00:06:10 +0200 (Fri, 26 Oct 2007) | 3 lines

Process UserEvents from the dialplan that a channel is
being recorded.

------------------------------------------------------------------------
r12315 | raarts | 2007-10-25 23:53:04 +0200 (Thu, 25 Oct 2007) | 2 lines

Billing works properly now, though corner cases have still not yet been tested.

------------------------------------------------------------------------
r12299 | hugo | 2007-10-23 23:12:20 +0200 (Tue, 23 Oct 2007) | 3 lines

Changed using arrays into using pointer arrays, fixing
a crash in the process.

------------------------------------------------------------------------
r12292 | raarts | 2007-10-22 23:36:11 +0200 (Mon, 22 Oct 2007) | 3 lines

Added command 'rateplan rate' to compute the cost of a call from the CLI.
Fixed double free-ing the callhist queue.

------------------------------------------------------------------------
r12291 | raarts | 2007-10-21 18:00:56 +0200 (Sun, 21 Oct 2007) | 2 lines

Fix crash. You cannot free g_slice() alloc'ed memory using g_free().

------------------------------------------------------------------------
r12290 | raarts | 2007-10-21 16:27:35 +0200 (Sun, 21 Oct 2007) | 9 lines

Big update:
- Implemented reload command for tables.
- From now on use g_slice instead of g_malloc for speed.
- Added all billing functionality, except for the actual
  price computation function.
- Added new table: building.
- Load rates, and schedules into the rateplan mem database.
- Only allocate subscriber array memory when needed.

------------------------------------------------------------------------
r12254 | raarts | 2007-10-17 00:32:46 +0200 (Wed, 17 Oct 2007) | 2 lines

Okay, also need the rateplanschedule table for billing.

------------------------------------------------------------------------
r12253 | raarts | 2007-10-16 22:46:38 +0200 (Tue, 16 Oct 2007) | 3 lines

Added reading the country and rate tables. Prepare for
billing stuff.

------------------------------------------------------------------------
r12252 | raarts | 2007-10-16 21:26:08 +0200 (Tue, 16 Oct 2007) | 3 lines

Fixed CDR processing to the new astium_cdr table.
Started with callhistory support.

------------------------------------------------------------------------
r12245 | raarts | 2007-10-15 22:57:09 +0200 (Mon, 15 Oct 2007) | 2 lines

Set version to 1.6

------------------------------------------------------------------------
r12232 | raarts | 2007-10-14 20:25:02 +0200 (Sun, 14 Oct 2007) | 3 lines

Make working rpm.
Generate records in CDR table now.

------------------------------------------------------------------------
r12221 | raarts | 2007-10-14 01:57:34 +0200 (Sun, 14 Oct 2007) | 3 lines

First cut at generating CDR records, instead of letting asterisk do that.
Hopefully we can add more info to the CDR this way.

------------------------------------------------------------------------
r12220 | raarts | 2007-10-13 22:58:25 +0200 (Sat, 13 Oct 2007) | 3 lines

Improved logging system.
Do not store pointers to astchannel in tables, but the channel names.

------------------------------------------------------------------------
r12215 | raarts | 2007-10-12 00:34:26 +0200 (Fri, 12 Oct 2007) | 2 lines

Fix CallerIDName problem (erroneous Unknown shown)

------------------------------------------------------------------------
r12214 | raarts | 2007-10-11 23:50:54 +0200 (Thu, 11 Oct 2007) | 2 lines

Added rateplan support. Rate support started.

------------------------------------------------------------------------
r12213 | raarts | 2007-10-10 22:56:42 +0200 (Wed, 10 Oct 2007) | 4 lines

Add company, department, contact, phoneline, phone fields to the channel table.
This enables us to easier find this data for created channels.
Make a start with CDR processing.

------------------------------------------------------------------------
r12210 | raarts | 2007-10-09 21:31:06 +0200 (Tue, 09 Oct 2007) | 5 lines

Add ExtensionStatus and QueueMemberStatus handling.
Fix some core dumps.
Fix phoneline not set correctly on astchannel
Now LinkPhoneline and LinkTrunk Events really work.

------------------------------------------------------------------------
r12209 | raarts | 2007-10-09 21:29:24 +0200 (Tue, 09 Oct 2007) | 2 lines

Added command `asterisk channel detail`

------------------------------------------------------------------------
r12206 | raarts | 2007-10-08 23:38:09 +0200 (Mon, 08 Oct 2007) | 3 lines

Added more status changes for phonelines.
Create the /tmp/dump-events.txt file

------------------------------------------------------------------------
r12205 | raarts | 2007-10-08 23:34:15 +0200 (Mon, 08 Oct 2007) | 2 lines

Add CallerIDName to the callerid in the channel overview.

------------------------------------------------------------------------
r12204 | raarts | 2007-10-08 20:09:20 +0200 (Mon, 08 Oct 2007) | 2 lines

Improve output formatting.

------------------------------------------------------------------------
r12200 | raarts | 2007-10-04 23:55:05 +0200 (Thu, 04 Oct 2007) | 2 lines

Fix crash when the first command on the CLI was a single dot.

------------------------------------------------------------------------
r12188 | raarts | 2007-10-03 20:16:18 +0200 (Wed, 03 Oct 2007) | 2 lines

Fix crash when State was an unexpected one.

------------------------------------------------------------------------
r12184 | raarts | 2007-10-02 22:58:25 +0200 (Tue, 02 Oct 2007) | 2 lines

You can now use a single dot on the CLI to repeat the previous command.

------------------------------------------------------------------------
r12183 | raarts | 2007-10-02 22:46:24 +0200 (Tue, 02 Oct 2007) | 3 lines

Compute channel info from the channel name.
Send notifiers for contact, department, company, phone, phoneline, and trunk changes.

------------------------------------------------------------------------
r12178 | raarts | 2007-09-29 18:02:58 +0200 (Sat, 29 Sep 2007) | 2 lines

Retry when logging in to the asterisk manager failed.

------------------------------------------------------------------------
r12177 | raarts | 2007-09-29 18:01:55 +0200 (Sat, 29 Sep 2007) | 2 lines

forgot to commit this.

------------------------------------------------------------------------
r12176 | raarts | 2007-09-29 18:01:36 +0200 (Sat, 29 Sep 2007) | 3 lines

Record when a channel was answered. This will be used to 
compute billsec later in the new CDR.

------------------------------------------------------------------------
r12166 | raarts | 2007-09-27 23:07:38 +0200 (Thu, 27 Sep 2007) | 2 lines

Fix command `contact_department show` not working.

------------------------------------------------------------------------
r12159 | raarts | 2007-09-26 23:58:29 +0200 (Wed, 26 Sep 2007) | 2 lines

Fixed deriving trunkid from channel name.

------------------------------------------------------------------------
r12158 | raarts | 2007-09-26 23:21:11 +0200 (Wed, 26 Sep 2007) | 2 lines

More logging improvements for when multiple asterisk servers are monitored.

------------------------------------------------------------------------
r12157 | raarts | 2007-09-26 23:01:55 +0200 (Wed, 26 Sep 2007) | 2 lines

Added queue_contact table. Various formatting fixes.

------------------------------------------------------------------------
r12156 | raarts | 2007-09-26 22:25:21 +0200 (Wed, 26 Sep 2007) | 3 lines

Automatically start logging asterisk events when debug is on at startup.
Print start of conversation on `asterisk channel show`.

------------------------------------------------------------------------
r12147 | raarts | 2007-09-21 00:01:54 +0200 (Fri, 21 Sep 2007) | 3 lines

Added some dicumentation about the internal workings
of this program.

------------------------------------------------------------------------
r12146 | raarts | 2007-09-20 23:11:10 +0200 (Thu, 20 Sep 2007) | 2 lines

Added check for OpenSSL and PostgreSQL.

------------------------------------------------------------------------
r12145 | raarts | 2007-09-20 23:10:01 +0200 (Thu, 20 Sep 2007) | 2 lines

Forgot to add these source files.

------------------------------------------------------------------------
r12144 | raarts | 2007-09-20 23:08:45 +0200 (Thu, 20 Sep 2007) | 2 lines

fixed some formatting errors. Added queue list.

------------------------------------------------------------------------
r11629 | raarts | 2007-07-16 12:54:03 +0200 (Mon, 16 Jul 2007) | 4 lines

Ok, when someone makes a call, everybody subscribed to
this contact now gets a message.
Also the channel is now removed on hangup. Still lots more to do.

------------------------------------------------------------------------
r11585 | raarts | 2007-07-15 22:21:07 +0200 (Sun, 15 Jul 2007) | 3 lines

Log starting and stopping threads. Quit the write thread too
when asterisk connection is lost.

------------------------------------------------------------------------
r11526 | raarts | 2007-07-08 23:31:32 +0200 (Sun, 08 Jul 2007) | 2 lines

Some more debug messages.

------------------------------------------------------------------------
r11506 | raarts | 2007-07-06 00:34:45 +0200 (Fri, 06 Jul 2007) | 2 lines

Fix ListComplete.

------------------------------------------------------------------------
r11457 | raarts | 2007-07-01 23:00:47 +0200 (Sun, 01 Jul 2007) | 4 lines

Finalize command 'asterisk log' to log all asterisk communication.
A separate thread is created for this, because we need to do file I/O
and that is not allowed in the main thread.

------------------------------------------------------------------------
r11456 | raarts | 2007-06-30 23:51:57 +0200 (Sat, 30 Jun 2007) | 6 lines

Hide the struct _cli from other modules. Add date/time to messages in CLI,
only update statuses when they really changed.
Added shutdown Event handler.
Added first step in 'asterisk log' command.
Finalized subscriber architecture.

------------------------------------------------------------------------
r11426 | raarts | 2007-06-26 23:56:24 +0200 (Tue, 26 Jun 2007) | 4 lines

Implemented Ping/Pong.
Improved debug output.
Fix Zap Alarms, and a SQL error.

------------------------------------------------------------------------
r11409 | hugo | 2007-06-25 22:25:06 +0200 (Mon, 25 Jun 2007) | 2 lines

Add check for PostgreSQL in configure.

------------------------------------------------------------------------
r11408 | raarts | 2007-06-25 21:59:55 +0200 (Mon, 25 Jun 2007) | 7 lines

Rewrote the subscription system to be more generic.
All records should (in memory) start with an integer id,
and with a pointer to an array of subscribers.
You can subscribe to one or all records of a table.
Also extended the help system: allow 'phone subscribers' so
you can list who is subscribed to a phone.

------------------------------------------------------------------------
r11404 | raarts | 2007-06-23 12:04:49 +0200 (Sat, 23 Jun 2007) | 2 lines

Added Copyright Notice and Legal Warning to all source files.

------------------------------------------------------------------------
r11403 | raarts | 2007-06-23 11:42:17 +0200 (Sat, 23 Jun 2007) | 4 lines

Renamed source file that handle database records so
they start with table-. This is only to easy editing
them as a group (vi table-*.c).

------------------------------------------------------------------------
r11402 | raarts | 2007-06-23 11:37:43 +0200 (Sat, 23 Jun 2007) | 5 lines

When the database is reloaded (refreshed) the new copy needs
to be completed with some transient information that is
only kept in memory, for example statuses like 'On the phone'. 
Added code to make this possible.

------------------------------------------------------------------------
r11401 | raarts | 2007-06-22 22:34:13 +0200 (Fri, 22 Jun 2007) | 2 lines

Clients can now request all relevant tables.

------------------------------------------------------------------------
r11393 | raarts | 2007-06-22 00:05:16 +0200 (Fri, 22 Jun 2007) | 2 lines

Implementing logoff, ad listing departments.

------------------------------------------------------------------------
r11392 | raarts | 2007-06-21 23:45:36 +0200 (Thu, 21 Jun 2007) | 4 lines

Clients can now ask for a list of companies, and receive it as a series
of Events. Also implemented authorisation, i.e. normal users only get
their own company.

------------------------------------------------------------------------
r11378 | raarts | 2007-06-21 09:22:46 +0200 (Thu, 21 Jun 2007) | 2 lines

You can now get a list of all connected clients.

------------------------------------------------------------------------
r11377 | raarts | 2007-06-21 08:46:45 +0200 (Thu, 21 Jun 2007) | 3 lines

Clients can now connect and authenticate.
Protocol is just like the asterisk protocol.

------------------------------------------------------------------------
r11376 | raarts | 2007-06-20 23:30:10 +0200 (Wed, 20 Jun 2007) | 2 lines

Non-functional first cut at adding the client support.

------------------------------------------------------------------------
r11375 | raarts | 2007-06-20 22:54:34 +0200 (Wed, 20 Jun 2007) | 4 lines

Implented new comands: 'stop' and 'stop now' (which waits for
all database queries to be written).
Also 'asterisk channel show' which shows all active channels.

------------------------------------------------------------------------
r11346 | raarts | 2007-06-19 23:22:51 +0200 (Tue, 19 Jun 2007) | 20 lines

Implemented logging to all connected CLI clients.
Also implemented the following commands:

asterisk             show       Show all connected asterisk servers
channel              show       Show one or all channels
company              show       Show one or all companies
contact              show       Show one or all contacts
contact_department   show       Show one or all contact_departments
database             debug      Set database debug level
database             show       Show all connected databases
department           show       Show one or all departments
phone                show       Show one or all phones
phoneline            show       Show one or all phonelines
subnet               show       Show one or all subnets
trunk                show       Show one or all trunks
zap_channel          show       Show one or all zap_channels
quit                            quit and disconnect from command mode
help                            show a list of commands


------------------------------------------------------------------------
r11343 | raarts | 2007-06-19 00:07:55 +0200 (Tue, 19 Jun 2007) | 5 lines

Improved infrastructure for processing CLI commands
Create beprintf() function
Fix the 'address already in use' crash.
Finalized 'contact show xxx' command.

------------------------------------------------------------------------
r11342 | raarts | 2007-06-18 17:59:49 +0200 (Mon, 18 Jun 2007) | 2 lines

Added more infrastructure for CLI processing.

------------------------------------------------------------------------
r11341 | raarts | 2007-06-18 16:16:28 +0200 (Mon, 18 Jun 2007) | 4 lines

Added Command Line Interface to examine internal data structures.
Fix race condition where Event were being processed, but the 
database cache was still empty.

------------------------------------------------------------------------
r11334 | raarts | 2007-06-17 23:52:17 +0200 (Sun, 17 Jun 2007) | 4 lines

Process New Channel events, and Action: Status reponses.
For doing this I needed a copy of the zap_channel table, so add
that as well. Put more comments in the code in asterisk.c

------------------------------------------------------------------------
r11333 | raarts | 2007-06-17 09:42:14 +0200 (Sun, 17 Jun 2007) | 10 lines

Moved lots of functions around. Moved all asterisk management stuff
into asterisk, and the actual events into asterisk-events.c
Same with database functions. Moved all cruft out of config.c.

When this daemon starts, it not only needs to read the database,
but also query asterisk about any active channels. Built infrastructure
to send Action requests to one or all asterisk instances.

Needs more docs and some more restructuring..

------------------------------------------------------------------------
r11332 | raarts | 2007-06-16 17:29:22 +0200 (Sat, 16 Jun 2007) | 3 lines

Added subnet cache. Rewrote channel registration to handle it ourselves
instead of by a database function.

------------------------------------------------------------------------
r11324 | raarts | 2007-06-15 07:13:13 +0200 (Fri, 15 Jun 2007) | 2 lines

Added channel and phone tables.

------------------------------------------------------------------------
r11323 | raarts | 2007-06-14 23:54:34 +0200 (Thu, 14 Jun 2007) | 7 lines

Split up sourcefiles to be a little more object oriented ;-)
Try another approach: keep a memory cache of what's in the database.
Built infrastructure to allow reloading parts of the database without
interfering with client messages.
Now on every Asterisk Manager Event, we first update the in-memory 
cache, then post queries to update the database itself.

------------------------------------------------------------------------
r11289 | raarts | 2007-06-12 21:03:41 +0200 (Tue, 12 Jun 2007) | 2 lines

Properly decode asterisk events. Add debug statements to check.

------------------------------------------------------------------------
r11240 | raarts | 2007-06-08 09:19:35 +0200 (Fri, 08 Jun 2007) | 3 lines

Handle Registry, PeerStatus, Alarm and AlarmClear messages.
Fix memory leak (forgot to PGClear()).

------------------------------------------------------------------------
r11239 | raarts | 2007-06-07 23:09:46 +0200 (Thu, 07 Jun 2007) | 3 lines

First version of the userdata. Fill it with records from the database.
Create global var to force reloading of the database.

------------------------------------------------------------------------
r11206 | raarts | 2007-06-05 22:03:37 +0200 (Tue, 05 Jun 2007) | 2 lines

Add function to write queued queries to the database.

------------------------------------------------------------------------
r11205 | raarts | 2007-06-05 20:54:58 +0200 (Tue, 05 Jun 2007) | 2 lines

Read the database config from the configurationfile as well.

------------------------------------------------------------------------
r11186 | raarts | 2007-06-04 22:47:10 +0200 (Mon, 04 Jun 2007) | 2 lines

Renamed pgdb to database

------------------------------------------------------------------------
r11155 | raarts | 2007-06-03 23:32:05 +0200 (Sun, 03 Jun 2007) | 2 lines

Read configfile. Connect to given asterisk boxes.

------------------------------------------------------------------------
r11148 | raarts | 2007-06-02 18:03:07 +0200 (Sat, 02 Jun 2007) | 3 lines

Added -Wall. Fixed some compiler bugs as a result of this.
Add initial code to read configuration file.

------------------------------------------------------------------------
r11145 | raarts | 2007-06-02 13:35:48 +0200 (Sat, 02 Jun 2007) | 3 lines

Parse command line options.
Enable forking to the background, and killing through SIGTERM.

------------------------------------------------------------------------
r11144 | raarts | 2007-06-02 13:11:10 +0200 (Sat, 02 Jun 2007) | 2 lines

Add logging system.

------------------------------------------------------------------------
r11142 | raarts | 2007-06-02 08:53:35 +0200 (Sat, 02 Jun 2007) | 2 lines

Create database thread and fake processing queries

------------------------------------------------------------------------
r11141 | raarts | 2007-06-01 23:52:57 +0200 (Fri, 01 Jun 2007) | 2 lines

Barebones eventhandler, caches signals, and does a timer every second.

------------------------------------------------------------------------
r11045 | raarts | 2007-05-23 22:34:01 +0200 (Wed, 23 May 2007) | 2 lines

First version that actually compiles and runs though it does nothing yet.

------------------------------------------------------------------------
r11044 | raarts | 2007-05-23 21:47:13 +0200 (Wed, 23 May 2007) | 2 lines

Import first version of astiumd.

------------------------------------------------------------------------
