Commit Graph

339 Commits

Author SHA1 Message Date
Mathieu Parent e318e3eb91 Skinny: update profile IP address if changed during socket creation 2011-02-25 21:06:21 +01:00
Mathieu Parent c18835d3f9 Skinny: Allow to listen on ipv6
also allow to specify a blank ip which means: all
2011-02-25 01:53:05 +01:00
Mathieu Parent 2148d81d74 Skinny: avoid crash when loading config with blank soft-key-set value 2011-02-25 00:05:56 +01:00
Mathieu Parent c9aab94aa4 Skinny: use a const for SKINNY_KEY_SET_IN_USE_HINT 2011-02-25 00:05:56 +01:00
Mathieu Parent 0a14839bf9 Skinny: mark ring ready 2011-02-23 01:07:54 +01:00
Mathieu Parent e7a8189b2b Skinny: centralized registration 2011-02-23 01:07:54 +01:00
Mathieu Parent 33848eb01c Skinny: handle Enbloc messages 2011-02-01 08:56:26 +01:00
Mathieu Parent 9b70d9a7a5 Revert perl's Net::Skinny test 2010-12-19 22:20:09 +01:00
Mathieu Parent 709c4e5f97 Skinny: Event skinny::xml_alarm 2010-12-19 22:16:40 +01:00
Mathieu Parent 1c4c84fc0f Perl's Net::Skinny : update to current handle PACKED structs 2010-12-19 22:16:40 +01:00
Anthony Minessale 93cc3dc556 normalize tests for outbound channels to use switch_channel_direction instead of testing for CF_OUTBOUND 2010-12-15 20:59:42 -06:00
Mathieu Parent 715d250e17 Skinny: handle new XMLAlarmMessage
This add support for new SCCP Firmware 9.1

(part of FS-2912)
2010-12-15 21:29:52 +01:00
Mathieu Parent a95af70323 Skinny: set max message size to 2048 for now
(part of FS-2912)
2010-12-15 19:44:38 +01:00
Mathieu Parent 85b0e1b9c9 Skinny: Adds unimplemented send_data(), correct formats
- send_data() (only defined in .h-file - never implemented)
- Adds correct formats when adding message body.

Thanks to Peter Olsson for spotting this in FS-2737
2010-09-27 18:49:11 +02:00
Mathieu Parent d018fa489a Skinny: send proper USER_TO_DEVICE_DATA_MESSAGE 2010-09-25 10:49:13 +02:00
Mathieu Parent b2fd42ef09 Skinny: Windows build fix
MS compiler doesn't have strncpy, we need another method to
ensure that the body is null-terminated
2010-09-25 10:49:12 +02:00
Mathieu Parent 25ddef504d Skinny: add support to DeviceToUser and UserToDevice messages 2010-09-24 01:55:54 +02:00
Mathieu Parent f5e7284d39 Skinny: struct for 6 more messages
DeviceToUserDataMessage
DeviceToUserDataResponseMessage
DeviceToUserDataVersion1Message
DeviceToUserDataResponseVersion1Message
UserToDeviceDataMessage
UserToDeviceDataVersion1Message
2010-09-24 01:55:54 +02:00
Mathieu Parent 9fc6b2087a Skinny: no need for heartbeat event to handle keepalive timeout 2010-09-23 19:51:14 +02:00
Mathieu Parent ba3a6ad6c8 Skinny: Rename skinny-default-soft-key-set-set to skinny-soft-key-set-set 2010-09-04 10:14:22 +02:00
Mathieu Parent 07c3c94d7a Skinny: allow skinny-default-soft-key-set-set per device 2010-09-04 10:06:07 +02:00
Mathieu Parent f5a6831ffc Skinny: allow configuration of softkeys via xml
- enhance conf/skinny_profiles/internal.xml
- Sanity checks
  + softKeySet id < 16
  + less than 16 buttons per softKeySet
  + at least the default soft-key-set to load the profile
  + at least one profile to load mod_skinny
- Lower some ERRORs to WARNINGs as they don't prevent module loading
- Default skinny_str2soft_key_event to 0
2010-09-04 09:35:43 +02:00
Mathieu Parent 690ae1b313 Skinny: avoid "-ERR no reply" when using API commands from CLI 2010-09-04 09:35:42 +02:00
Mathieu Parent 8381a4f3cf Skinny: adding tables for soft_key_events 2010-09-04 09:35:42 +02:00
Mathieu Parent 461db7573e Skinny: Better IP change handling
- Respawn only if ip or port is changed
- Properly handle timeout
2010-09-03 23:34:19 +02:00
Mathieu Parent b762a0aa7f Skinny: block socket to decrease CPU usage
non-blocking mode can still be used by setting MOD_SKINNY_NONBLOCK
2010-09-03 19:08:41 +02:00
Mathieu Parent a5cd2df89a Skinny: Handle network-address-change trap event
- add auto-restart param to each profile (if true, ip is automaticaly changed)
- some cleaning (unused args in flush_listener, better logs)
2010-09-03 00:09:10 +02:00
Jeff Lenk 3e2056833b add windows x64 build support for mod_skinny 2010-08-31 09:53:22 -05:00
Mathieu Parent ce352bccc5 Skinny: stop media on early media hangup (ring-out) 2010-08-31 08:40:37 +02:00
Jeff Lenk 3be9460406 fix build 2010-08-26 14:08:42 -05:00
Anthony Minessale 46c6650a94 pass originate flags into session_request so we can selectivly skip throttling 2010-08-26 12:19:49 -05:00
Mathieu Parent 83a5342bfa Skinny: fix autocompletion
"skinny profile internal device <tab>" now works
2010-08-24 23:53:10 +02:00
Mathieu Parent 8921675668 Skinny: switch to new cache_db abstraction 2010-08-24 23:35:52 +02:00
Mathieu Parent 2aac00ef81 Skinny: MODSKINNY-14 The Cisco 7910 phone is no tone when I try to make a call and hang up.
Thanks to Sergio
2010-08-24 22:38:57 +02:00
Mathieu Parent f34b76c5e6 Skinny: MODSKINNY-12 (Cisco phone 7910 transfer button will not work) 2010-08-24 22:13:44 +02:00
Mathieu Parent b80eb9fb13 Skinny: realign after x86_64 commit 2010-07-28 23:57:27 +02:00
Mathieu Parent 59e197584c Skinny: more on device types
- print device type name when doing skinny status profile internal device ...
- add 7962 and 7965
- use base10 number
2010-07-28 22:17:54 +02:00
Mathieu Parent b062eef12e Skinny: pack data in mem to fix 64bit
On 64bit, fields are aligned which cause Skinny to fail
2010-07-28 21:43:55 +02:00
Mathieu Parent 7eec05736a Skinny: more API
- allow to set most settings at runtime (all but ip, port and odbc-dsn)
- little rewrite of the config load
- don't print Keepalive and KeepaliveAck messages unless profile debug is >=10
- print usage when incorrect parameters
2010-07-28 19:42:59 +02:00
Mathieu Parent 0a04ecb8dd Skinny: ring tone on dialing side 2010-07-28 00:31:52 +02:00
Mathieu Parent 53f75e9c94 Skinny: blind transfer MODSKINNY-10 2010-07-27 23:50:56 +02:00
Mathieu Parent 2d1c5c8dfa Skinny: don't hangup remote calls 2010-07-27 23:48:21 +02:00
Mathieu Parent 165140e076 Skinny: ib_calls stats 2010-07-27 23:48:21 +02:00
Mathieu Parent b40804a5e3 Skinny: corrected early media
This is part of MODSKINNY-8
2010-07-22 23:30:15 +02:00
Mathieu Parent db1289dfaf Skinny: avoid crash with autocompletion when skinny is unloaded 2010-07-22 21:04:18 +02:00
Mathieu Parent 5e07bd336c Skinny: hangup and hold calls in PROCEED state
as those CONNECTED
2010-07-20 22:43:56 +02:00
Jeff Lenk a87429ac87 Add initial support for VS2010 2010-06-28 15:49:19 -05:00
Mathieu Parent 20194286a4 Skinny: correct early media and answer
- SWITCH_MESSAGE_INDICATE_DISPLAY was missing a "break" statement
- handle not responding device (cancels early media or answer)
- don't send messages when listener is not ready (fix rare crashes)
2010-06-25 18:25:12 +02:00
Jeff Lenk 4010911db9 sync express to limit changes + add skinny 2010-06-20 12:07:11 -06:00
Mathieu Parent 5017869399 Skinny: handle early media
See MODSKINNY-8 (switch_core_io.c:121
SKINNY/internal/SEP002699438FB6:0/1 has no read codec when using early
media)
2010-06-17 07:44:33 +02:00
Mathieu Parent df92a3ca07 Skinny: Remove unused flags 2010-06-17 07:05:28 +02:00
Mathieu Parent 2629a570c7 Skinny: MWI improvement: allow domain name <> profile name 2010-06-16 22:42:15 +02:00
Mathieu Parent 1d7d014612 Skinny: Basic MWI
With following limitations:
- only first line is handled
- only works well when domain name = profile name
2010-06-16 22:42:15 +02:00
Mathieu Parent 2fc09235b7 Skinny: split event handlers 2010-06-10 08:35:05 +02:00
Anthony Minessale bc6334a610 FSCORE-617 2010-06-07 16:47:35 -05:00
Mathieu Parent 48c7bb320e Skinny: correct define_time_date
The 'day' field is the month day (and not year day).

Fix MODSKINNY-4 and MODSKINNY-7
2010-05-27 11:55:09 +02:00
Mathieu Parent 7566575523 Skinny: simplify header inclusions
thanks to Frank Seesink on MODSKINNY-6
2010-05-26 10:45:52 +02:00
Mathieu Parent 96a630e454 Skinny: fix compilation on OS X
declaring some variables "extern" thanks to Peter Olsson

Fix MODSKINNY-6: Build still fails on OS X (even after last changes)
2010-05-26 10:40:38 +02:00
Mathieu Parent a2ceff1471 Skinny: size_t has different sizes on different platforms
Resolve (shouldn't) MODSKINNY-5: Compiling mod_skinny on Mac OS X 10.6.3 fails
with error message about format mismatch of 'long unsigned int'
2010-05-25 09:29:01 +02:00
Michael Jerris f89cbdd644 add mod_skinny vcproj file for windows build (MODSKINNY-3) 2010-05-22 19:18:35 -04:00
Mathieu Parent 1632f82a1a Skinny: typo 2010-05-21 15:53:15 +02:00
Mathieu Parent 0cb6af2f5a Skinny: One more for MODSKINNY-1: (soft_key_event) 2010-05-21 15:52:30 +02:00
Mathieu Parent 18a7657332 Skinny: one more for MODSKINNY-1 (keypad_button) 2010-05-21 15:47:57 +02:00
Mathieu Parent 2e2d587e7b Skinny: one more fix for MODSKINNY-1 (on_hook) 2010-05-21 15:41:41 +02:00
Mathieu Parent 2cb595c71c Skinny: Avoid message too short for off_hook
Resolve MODSKINNY-1:  FreeSwitch stops working when I use a cisco 7910
phone - FREESWITCH 1.0.6
2010-05-21 15:36:01 +02:00
Mathieu Parent f1b636aaf7 Skinny: fix crash with outgoing channel without remote session 2010-05-21 10:18:22 +02:00
Mathieu Parent 9682599b6b Skinny: fix unhold 2010-05-21 02:22:32 +02:00
Mathieu Parent 14fee6c798 Skinny: set BOND variable early to have call info during ring
This is hackish
2010-05-21 02:09:09 +02:00
Mathieu Parent 5bdf8bcc16 Skinny: More channel variables 2010-05-21 01:12:40 +02:00
Mathieu Parent bfb6a8b1f5 Skinny: Initial Windows support
Thanks to Peter Olsson

Closes: MODSKINNY-3
2010-05-20 23:19:10 +02:00
Mathieu Parent 8bdd2f2dc2 Skinny: add message type in too short warning 2010-05-20 20:51:18 +02:00
Mathieu Parent a1f9cc1efa Skinny: pass remote session to ring_lines because BOND is not set yet 2010-05-20 18:45:25 +02:00
Mathieu Parent d172e9febb Skinny: send the call state when requested
This solves incorrect display on the phone.

BUT: this creates a delta because the SQL value and the value known by
the phone. I hope this doesn't break other things.

(NB: the original problem here was the unability to do an UPDATE inside
a SELECT callback)
2010-05-20 17:29:25 +02:00
Mathieu Parent 924683a73c Skinny: handle SWITCH_MESSAGE_INDICATE_DISPLAY
- send SWITCH_MESSAGE_INDICATE_DISPLAY when ringing (after knowing calle
  info
- send call info when receiving SWITCH_MESSAGE_INDICATE_DISPLAY

The send SWITCH_MESSAGE_INDICATE_DISPLAY part doesn't work yet, because
partner channel is locked (have to find out why)
2010-05-20 17:14:49 +02:00
Mathieu Parent 23b09b4593 Skinny: Correct state handling
- wait for media before marking channel as answered
- set effective_caller_{id,name} before sending call info
2010-05-20 16:34:38 +02:00
Mathieu Parent 8ec0b7f4c7 Skinny: fix redial button, and all nested "bridge" 2010-05-20 15:36:26 +02:00
Mathieu Parent 8cc89ab042 Skinny: rewrite of the skinny state machine
- for incoming calls, go CS_ROUTING only when number is dialed.
  CS_HIBERNATE before
- start media when both side have answered

Also:
- send tone for UNALLOCATED_NUMBER and USER_BUSY
- if channel variables are not sufficent to set call info, ask the
  partner channel
2010-05-20 15:16:08 +02:00
Mathieu Parent 03d07b4cb6 Skinny: slightly better call info 2010-05-19 09:52:03 +02:00
Mathieu Parent 32b8bdb990 Skinny: display destination number if callee is not set 2010-05-18 18:14:27 +02:00
Mathieu Parent e66e9fa878 Skinny: called is named callee 2010-05-18 13:48:16 +02:00
Mathieu Parent 0bc11afa73 Skinny: split out server part
And try to keep each file below 2000 lines
2010-05-18 10:49:01 +02:00
Mathieu Parent 51f1ad5072 Skinny: Send hangup cause to device (busy, unknown number) 2010-05-18 10:49:01 +02:00
Mathieu Parent 800918ab14 SKinny: use of labels, step2 2010-05-18 10:49:00 +02:00
Mathieu Parent 60090a8602 Skinny: using labels for display text
Based on chan-sccp-b (file src/sccp_labels.h)
2010-05-18 10:49:00 +02:00
Mathieu Parent 295f39c158 Skinny: renamed improper skinny_create_ingoing_session to _incoming_ 2010-05-18 10:49:00 +02:00
Mathieu Parent 3b0f1711ba Skinny: corrections to call info:
- channel vars are caller_ and not callee_
- inbound/outbound are reversed from the skinny POV
- use displayname
2010-05-12 21:02:14 +02:00
Mathieu Parent 194e57268a Skinny: tuple profile, device_name, device_instance is unique 2010-05-10 18:19:58 +02:00
Mathieu Parent bd6f7e73c0 perl-Skinny: don't launch thread if socket can't be created 2010-05-10 18:19:58 +02:00
Mathieu Parent 74e14f0dfb Skinny: fix the build 2010-05-10 18:19:58 +02:00
Mathieu Parent 8806bb2da1 Skinny: better call info 2010-05-10 18:19:57 +02:00
Mathieu Parent 6a29e56301 Skinny: tiny change (comment) 2010-05-10 18:19:57 +02:00
Anthony Minessale a5f7461ee2 fix null pointer deref code path 2010-05-05 11:01:32 -05:00
Mathieu Parent dcb9c0ca52 Skinny: Initial patterns dialplan implementation.
More info on mod_skinny wiki page
2010-04-20 22:40:21 +02:00
Mathieu Parent 9a689a45fc Skinny: correct transfer 2010-04-16 18:01:19 +02:00
Mathieu Parent 03f91afd34 Skinny: VersionMessage per device type 2010-04-16 18:01:19 +02:00
Mathieu Parent deb2277936 Skinny: allow firmware version per device 2010-04-16 15:16:27 +02:00
Mathieu Parent 4263dda2de Skinny: Initial implementation of VersionReq
And reordering
2010-04-16 15:03:37 +02:00
Mathieu Parent 00b2622350 Skinny: initial transfer support
and some re-indentation
2010-04-16 11:59:58 +02:00
Mathieu Parent 3a8d9a04dc Skinny: reordering message types 2010-04-15 15:24:04 +02:00
Mathieu Parent e7a5420b31 Skinny: handle Hold stimulus 2010-04-15 15:05:34 +02:00
Mathieu Parent 764b435d7c Skinny: correct backspace handling, and behave more like CCM 2010-04-15 14:47:01 +02:00
Mathieu Parent 93db4451d1 Skinny: fix previous commit, define current time on hangup 2010-04-15 11:11:05 +02:00
Mathieu Parent d41f32356c Skinny: calling shared lines 2010-04-15 11:07:45 +02:00
Mathieu Parent e44d79192f Skinny: Handle backspace 2010-04-15 10:54:01 +02:00
Mathieu Parent befd41c829 SKinny: handle hold corner cases
- try to re-use existing OffHook session
- hold active lines before: newcall, resume
- allow endcall on: offHook, afterFirstDigit
- allow newcall on: connected, ringin
2010-04-09 18:02:14 +02:00
Mathieu Parent 555b205344 Skinny: handle backspace 2010-04-09 16:54:29 +02:00
Mathieu Parent a1952b8636 Skinny: implement hold/resume
Also rework a bit softkey sets
2010-04-09 16:12:58 +02:00
Mathieu Parent 7e3c29c600 Skinny: manage shared lines from the calling POV
Called POV already implemented
2010-04-09 14:59:18 +02:00
Mathieu Parent 924e960d0a perl-skinny: enhance test
- Use thread for: keepalive, receive and send
- Run indefinitevly
2010-04-09 14:40:33 +02:00
Mathieu Parent adcb11f3d3 Skinny: fix calls without media
If party_id is 0, the phone will not properly release media
2010-04-09 11:13:22 +02:00
Mathieu Parent bec8d75ef6 Skinny: don't double unlock on keypad
double unlock is same as locking :P
2010-04-08 23:17:13 +02:00
Mathieu Parent c15e163b88 Skinny: avoid non-set profile name 2010-04-08 23:16:44 +02:00
Mathieu Parent d3d50e6eb3 Skinny: release XML config
Fixes: reloadxml blocked
2010-04-08 22:59:31 +02:00
Mathieu Parent ca8ec66ed3 Skinny: avoid crash on shutdown
Because of uninstancied listener
2010-04-08 22:48:36 +02:00
Mathieu Parent 58595bdaec Skinny: solve deadlocks and more
- Solve deadlock:
  + associate all skinny_profile_find_session with the corresponding
    switch_core_session_rwunlock
  + lock the newly created session in skinny_create_ingoing_session
  + enhance rwlocks debugging
- Shared lines:
  + Inform shared lines on answering
  + Answering line has info after other shared lines
2010-04-08 22:38:24 +02:00
Mathieu Parent 9c4767456a Skinny: Hook the proper line 2010-04-02 15:12:06 +02:00
Mathieu Parent 5a4fbd414e Skinny: unused variable 2010-04-02 14:50:11 +02:00
Mathieu Parent 9cf882566f Skinny: security
- Avoid writing outside of fields
- tab ident
2010-04-02 14:47:37 +02:00
Mathieu Parent 8950d00b1f Skinny: Fix the build 2010-04-02 14:25:16 +02:00
Mathieu Parent c216c722af perl-skinny: Add call test
- more verbose when incomplete message
- guess hostname
- do a basic call to Voicemail:
  + Newcall softkey, wait 5
  + Voicemail button, wait 20
  + EndCall softkey
2010-04-02 12:21:47 +02:00
Mathieu Parent 63f3948d83 Skinny:
- don't force session location (not needed)
- Correct Skinny-Station-Instance event header and log if profile or
  device is not found
2010-04-02 12:15:33 +02:00
Mathieu Parent 5ce2759e70 Skinny: Add the missing api files 2010-04-02 12:14:41 +02:00
Mathieu Parent 54e73c774f Skinny: Check for socket to see if listener is alive
also, use tab to indent
2010-04-01 19:50:55 +02:00
Mathieu Parent 59bb764ff9 Skinny: avoid some crashes
- move api to own file
- really allow several profiles (one thread per profile)
- global pool
- pool per profile
- Remove unused globals.calls
- Check for closed listener before sending data
- use mutex for hashes
2010-04-01 19:41:48 +02:00
Mathieu Parent b8ac781c05 Skinny: Implement shared lines and more
- Shared lines (same line on several phones)
  + Active lines stored in db
- Separate SQL mutex per profile
- New event skinny::call_state
- Clean port_message
- More protocol understanding:
  + stimulus may have call_id
  + off_hook may have call_id
  + set_ringer may have call_id and line_instance
  + New DisplayPriNotifyMessage
- Use Cisco terms for Call state
  + Congestion -> LineInUse
  + CallRemoteMultiline -> InUseRemotely
- Add line_instance to Lines table (relative position contrary to
  absolute position)
- Less assertions as FS already does some
2010-04-01 14:08:12 +02:00
Mathieu Parent 39c9065e87 perl-skinny: enhance the Testsuite
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17128 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-29 07:44:25 +00:00
Mathieu Parent 868530fc05 Skinny: split the test into perl lib + bin
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17124 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-27 22:43:18 +00:00
Mathieu Parent b769233b76 Skinny: Split ou tables
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@17022 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-17 12:52:08 +00:00
Mathieu Parent 869c221f3a Skinny: more portable printf for sizeof (thanks to bkw)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16961 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-10 17:04:00 +00:00
Mathieu Parent fa92f47bd1 Skinny: solve compilation on amd64
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16960 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-10 14:37:14 +00:00
Mathieu Parent 3731c4ab91 Skinny:
- allow several instances of the same device on different sockets
- move lines to table skinny_lines, as they need more params
- various small changes



git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16959 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-10 13:49:53 +00:00
Mathieu Parent 54510a372a Skinny: off_hook_message doesn't include call_id on older phones
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16876 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-03 07:49:59 +00:00
Mathieu Parent 76be99c801 Skinny: avoid stack overflow by lowering button_template_helper size
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16875 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-03 07:48:42 +00:00
Mathieu Parent 3fe4d7a3d8 Skinny: test: put config on top
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16850 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-03-01 11:06:47 +00:00
Mathieu Parent 7491bd639c Skinny: sleep to lower CPU consomption
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16825 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-25 18:26:23 +00:00
Mathieu Parent 05048ba11f Skinny: handle ServiceUrl
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16823 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-25 17:36:45 +00:00
Mathieu Parent adde57cb24 Skinny: handle UnregisterMessage and properly flush listener
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16820 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-25 15:23:11 +00:00
Mathieu Parent c84d664c6b Skinny: add send Reset/Restart
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16819 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-25 14:34:43 +00:00
Mathieu Parent 3c36d26988 Skinny: answer FeatureStatReqMessage with FeatureStatMessage
'#buggy version!'

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16796 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:58 +00:00
Mathieu Parent 32565f50f5 Skinny: previous commit was incomplete
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16795 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:47 +00:00
Mathieu Parent 1b988b2267 Skinny: config cleaning and refactorisation
- removed unused globals: codecèprefs, codec_master, codec_rates
- moved global debug to profile
- store button type as id in DB (avoid case-sensitivity problem)
-

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16794 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:36 +00:00
Mathieu Parent 9f870bd311 Skinny: API commands (autocompletion included!)
skinny profile <profile_name> device <device_name> send SetRingerMessage <ring_type> <ring_mode>
skinny profile <profile_name> device <device_name> send SetLampMessage <stimulus> <instance> <lamp_mode>
skinny profile <profile_name> device <device_name> send SetSpeakerModeMessage <speaker_mode>
skinny profile <profile_name> device <device_name> send CallState <call_state> <line_instance> <call_id>

Also:
- Correct sended line displayname
- Re-use the line on SoftKey
- Handle Answer SoftKey

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16793 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:25 +00:00
Mathieu Parent a65c6c902d Skinny: avoid some wired scenarii
- Close all sessions without B-leg
- Hold sessions with B-leg
- Currently hold is same as hang up
- Try to guess the best line to choose (use an existing one)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16792 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:16 +00:00
Mathieu Parent 0151d20c97 Skinny: redial
- Allow redial from softKey or stimulus
- Add redial, newcall to on_hook softkeys
- Add endcall to ringing and connected softkeys

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16791 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:06:06 +00:00
Mathieu Parent 139291f917 Skinny: Rework of buttons
- Refactorize line/speed-dial info (with getters)
- Set calling/called party when known
- Don't recreate session on existing
- Lower some debug messages (SQL, messages send/received)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16790 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:56 +00:00
Mathieu Parent 900c50fd91 Skinny: Corrections
- Construct call_id based on simple increment per profile
- close RTP only if needed
- now hanging up while there is no other leg works
- better steps: create_session -> process_dest -> answer

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16789 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:45 +00:00
Mathieu Parent 834a28ff7f Skinny: House cleaning
- Print message types and softkey states instead of their code
- Show line number of calling function
- Replace the remaining send_select_soft_keys by skinny_line_set_state (to keep proper state)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16788 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:34 +00:00
Mathieu Parent afbab7bc7b Skinny: Line state
Avoid the use of TFLAG_WAITING_DEST an replace by a line_state corresponding to the softkey events

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16787 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:26 +00:00
Mathieu Parent 99ce7a4b01 Skinny:
- correct speed-dial and line label
- hangup when receiving EndDial softkey

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16786 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:16 +00:00
Mathieu Parent 5ca2516bea Skinny: M3: Calls management: handle OffHook then compose
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16785 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:05:06 +00:00
Mathieu Parent a977bda2e9 Skinny: Split the code
- mod_skinny.c: module, profile, listener, channels
- skinny_protocol.c: skinny messages

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16784 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:56 +00:00
Mathieu Parent 8fd52217d9 Skinny: moving to autotools
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16783 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:44 +00:00
Mathieu Parent 902991fea8 Skinny: M3: Calls management: ingoing call
Following scenario:
- offhook a specific line
- compose 4 digits

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16782 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:36 +00:00
Mathieu Parent a43f9cea19 Skinny: M3: Calls management: Each line has a session
- Each line as its session
- USER_BUSY if line is busy
- properly guess device and line to ring

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16781 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:25 +00:00
Mathieu Parent a68fef28be Skinny: Milestone 3: Calls management: handle DTMF
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16780 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:16 +00:00
Mathieu Parent 847c3a49bb Skinny: Milestone 3: Calls management
As of now, this is only proof of concept. How to test:
- only one phone registred
- call originate skinny/internal/7628 &delay_echo(100) from console
- answer
- test the echo
- hangup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16779 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:04:08 +00:00
Mathieu Parent 8bbbd88bd7 Skinny: Milestone 4: proper SoftkeyTemplateResMessage
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16778 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:03:59 +00:00
Mathieu Parent 02c092d03d Skinny: Milestone 8: answer ConfigStatReqmessage with ConfigStatMessage
also some cleanup

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16777 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:03:46 +00:00
Mathieu Parent 8850125676 Skinny: Add helper functions
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16776 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:03:04 +00:00
Mathieu Parent ecd86ec42c Skinny: Milestone 3: Calls management
- House cleaning

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16775 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:01:47 +00:00
Mathieu Parent 90063622cf Skinny: Milestone 8 (partial): TimeDate
- answer TimeDateReqMessage with DefineTimeDate

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16774 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:01:39 +00:00
Mathieu Parent 506517e9ac Milestone 3: Calls management: Add several messages structs
+ KeypadButtonMessage
+ StimulusMessage
+ OnHookMessage
+ OpenReceiveChannelAck
+ SoftKeyEventMessage
+ StartToneMessage
+ StopToneMessage
+ SetRingerMessage
+ SetLampMessage
+ SetSpeakerModeMessage
+ StartMediaTransmissionMessage
+ StopMediaTransmissionMessage
+ CallInfoMessage
+ OpenReceiveChannelMessage
+ SelectSoftKeysMessage
+ CallStateMessage
+ DisplayPromptStatusMessage
+ ClearPromptMessage
+ ActivateCallPlaneMessage
+ DialedNumberMessage

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16773 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:01:31 +00:00
Mathieu Parent ca3aa27976 Skinny: Milestone 8: Miscellaneous (handle HeadsetStatusMessage)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16772 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:01:21 +00:00
Mathieu Parent 6c7de2c721 Milestone 7: Alarm
- Custom events: skinny::alarm

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16771 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:01:13 +00:00
Mathieu Parent 829a711c72 Skinny: Milestone 5: Speed-dials
- answer SpeedDialStatReqMessage with SpeedDialStatMessage

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16770 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:55 +00:00
Mathieu Parent afc8e79655 Skinny: Milestone 4: Button template, Soft-key template and Soft-key sets
- buttons are now stored in the same table
- answer ButtonTemplateReqMessage with ButtonTemplateMessage: DONE
- answer SoftKeyTemplateReqMessage with SoftKeyTemplateResMessage: WIP (currently empty response)
- answer SoftKeySetReqMessage with SoftKeySetResMessage: WIP (currently empty response)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16769 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:45 +00:00
Mathieu Parent 48aaa884fd Skinny: Milestone 7: handle AlarmMessage
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16768 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:35 +00:00
Mathieu Parent 3ed58f15db Skinny: Sanity
- truncate tables on module load
- check for message length

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16767 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:28 +00:00
Mathieu Parent f1391f0eb8 Skinny: Milestone 0: avoid crash when closing sockets by using mutexes
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16766 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:19 +00:00
Mathieu Parent f02d6a5139 Skinny: Milestone 3: Parse calls coming to skinny
Also don't free profile members (managed via pools) to avoid crash on module unload

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16765 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:11 +00:00
Mathieu Parent 92bb098745 Skinny:
- don't free skinny messages as they are handled by pools
- correct devices autocompletion (inspired by switch_console_list_uuid in switch_console.c)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16764 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 12:00:04 +00:00
Mathieu Parent 5ad95379bf Skinny: SQL updates
- new switch_odbc_handle_exec argument
- add codec_string to device record
- minor changes

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16763 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:56 +00:00
Mathieu Parent c35f367d58 Skinny: moving to SQL
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16762 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:49 +00:00
Mathieu Parent a4d9fa2654 Skinny: helper script: test-skinny.pl
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16761 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:41 +00:00
Mathieu Parent bcf4a9277a Skinny: reorder
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16760 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:34 +00:00
Mathieu Parent 93b3aa7ff4 Skinny: Milestone 2: Line managements
- handle RegisterAvailableLinesMessage

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16759 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:25 +00:00
Mathieu Parent 2092e39d16 Skinny: Milestone 1: Devices management
- handle unregister message
- send skinny::unregister event
- send skinny::expire event

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16758 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:18 +00:00
Mathieu Parent a5dc87ce61 Skinny: one function per message type
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16757 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:10 +00:00
Mathieu Parent 4c1065f7b5 Skinny: Milestone 1 : device level (codec list)
- update codec list

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16756 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:59:02 +00:00
Mathieu Parent 0cdf84d35b Skinny: Milestone 1 : device level (register event)
- fire skinny::register events

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16755 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:54 +00:00
Mathieu Parent 84f500f0cc Skinny: Milestone 1 : device level (multiple replies)
- A request can call several replies

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16754 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:43 +00:00
Mathieu Parent bd480237b9 Skinny: Milestone 1 : device level (CapabilitiesReqMessage and CapabilitiesResMessage)
- send CapabilitiesReqMessage during registration
- handle CapabilitiesResMessage
- also correct sent length

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16753 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:36 +00:00
Mathieu Parent c813d03e97 Skinny: Milestone 1 : device level (PortMessage)
-Handle PortMessage

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16752 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:25 +00:00
Mathieu Parent ba1950a75d Skinny: Milestone 1 : device level (API)
skinny device *
skinny device <device_name>

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16751 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:15 +00:00
Mathieu Parent b78542299c Skinny: Milestone 1 : device level (timeout)
- handle keepalive message (expiration)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16750 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:07 +00:00
Mathieu Parent c6fbe03072 Skinny: Milestone 1 : device level (Register)
- handle RegisterMessage
- keep device infos (attached to listener)
- respond with RegisterAckMessage
- handle port message (do nothing)
- handle keepalive message (do nothing for now)

and:
- clean memory pools usage
- date_format is fixed length

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16749 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:58:00 +00:00
Mathieu Parent 0117bdd936 Skinny: Milestone 0 : no-op module (listeners and base skinny parsing)
Check for huge message

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16748 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:57:53 +00:00
Mathieu Parent bf64b0962b Skinny: Milestone 0 : no-op module (listeners and base skinny parsing)
Based on mod_event_socket.

- create listeners
- parse sccp header (length, reserved, type)
- don't listen to reloadxml event, as we don't reload listeners
- listen to heartbeat event to expire listeners

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16747 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:57:45 +00:00
Mathieu Parent 36e6d9548f Skinny: Milestone 0 : no-op module (conf and event)
Based on mod_reference.

- example conf files
- load configuration file conf/autoload_configs/skinny.conf.xml
- listen to reloadxml events

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16746 d0543943-73ff-0310-b7d9-9358b9ac24b2
2010-02-24 11:57:37 +00:00