Compare commits

...

286 Commits
1.10.1 ... v1.4

Author SHA1 Message Date
Anthony Minessale ca9207aa32 FS-6544 2016-02-05 11:58:53 -06:00
Anthony Minessale d8836fb213 FS-8802 #resolve [RTP stops sending audio when sent timestamp rolls over] 2016-02-01 16:24:31 -06:00
Anthony Minessale II c1a3a280c2 Merge pull request #672 in FS/freeswitch from ~WT123/freeswitch:bugfix/FS-8757-fix-variable-and-header-expansion-buffer-overflow to v1.4
* commit '28da36e3e004b37584acaa28e99c674bfa39842a':
  Buffer overflow in switch_channel_expand_variables_check and switch_event_expand_headers_check fixed (FS-8757)
2016-01-19 10:38:08 -06:00
Thomas Weber 28da36e3e0 Buffer overflow in switch_channel_expand_variables_check and switch_event_expand_headers_check fixed (FS-8757) 2016-01-19 14:50:38 +01:00
Chris Rienzo 5258338429 FS-8708 [mod_rayo] fix example configuration to map to correct DETECTED_TONE event from spandsp_start_tone_detect 2016-01-05 14:19:05 -05:00
Chris Rienzo dad8aba68b FS-8676 [mod_unimrcp] fix crash when an invalid voice-gender TTS param is attempted to be set 2015-12-22 16:04:38 -05:00
Chris Rienzo 563e336b49 FS-8662 [mod_http_cache] don't block http_tryget while another thread is fetching the URL 2015-12-15 14:43:29 -05:00
Ken Rice aba5892bdb FS-8582 #resolve make sure the URL being passed here is not null 2015-12-07 12:18:51 -05:00
Chris Rienzo 35e360f1e4 FS-8619 [mod_rayo] reply with conflict stanza error if bind is attempted with duplicate JID. Improve error handling when 'ready' callback fails. 2015-12-04 17:45:39 -05:00
Anthony Minessale 45534616c6 FS-8547 #resolve [Add error log into stats to log when quality impacting events begin and end] 2015-11-23 18:11:58 -06:00
Mark Lipscombe eb502e1d0f FS-8537: Passing nil to various lua functions causes segfault
Various functions exposed via lua do not check their parameters for null
causing freeswitch to segfault.

This change adds checking for null parameters and returns an error
instead of segfaulting.
2015-11-23 13:36:45 -05:00
Ken Rice 66cd7d6b1a bump rev 2015-11-19 14:48:04 -06:00
Anthony Minessale 4bdca8197a FS-8160 Additional vulnerability in json parsing malformed utf encoded chars discovered by Brian Martin - Tenable Security Response CVE-2015-7392 2015-11-19 13:44:55 -06:00
Mark Lipscombe 6d8edab59b FS-8413: Segfault calling session:getVariable(nil) in lua script
script calling session:getVariable() with a null variable
name will cause FreeSWITCH to segfault.

This change checks whether varname parameter to
switch_channel_get_variable_dup is non-NULL.
2015-11-09 16:02:14 -06:00
Brian West 0e551408d4 Merge pull request #576 in FS/freeswitch from ~NNEUL/freeswitch:bugfix/fs-8308 to v1.4
* commit 'aaddce34c0a036a7e527b35f100ab32391697020':
  FS-8308 need to double encode if urlencoding json that is already encoded
2015-11-04 07:18:17 -06:00
Nathan Neulinger aaddce34c0 FS-8308 need to double encode if urlencoding json that is already encoded 2015-11-03 09:11:20 -06:00
Mike Jerris 02dde638f5 FS-8378: [mod_esf] fix crash when using esf_page over loopback when transcoding 2015-10-29 13:18:24 -04:00
Michael Jerris 9fc9e8aef1 FS-8397: fix race condition inrementing event seq number 2015-10-29 10:29:14 -05:00
Ken Rice 9fcf3e0c9a FS-8335 #resolve fix small error check that results in error message not being displayed. 2015-10-23 11:21:55 -04:00
Anthony Minessale 2c1d7a2ba5 FS-8338 a few regressions that were relying on this bug to function properly in stereo situations 2015-10-23 11:21:40 -04:00
Chris Rienzo 61b8e6ee66 FS-8370 [mod_rayo] found another place in <prompt> where a message was freed after being queued for delivery. This resulted in a freed object being serialized, crashing FS. 2015-10-22 23:12:39 -04:00
Brian West 02d7baf79e FS-8354: #resolve [revert back ported patch for rate change detection it introducted a regression] 2015-10-16 15:47:56 -05:00
Anthony Minessale f90dd4b1c0 FS-8338 #resolve [Ringback does not work correctly on stereo channels] 2015-10-12 17:00:44 -05:00
Davide Colombo cd15a67789 FS-8246: use seconds as default value for delay param 2015-10-09 12:03:09 -05:00
Anthony Minessale d6910afa3b FS-8282 #resolve [sleep is not interrupted by uuid_transfer] 2015-10-09 12:02:57 -05:00
Anthony Minessale 4d2bc24a1f FS-8166 #resolve [Mute/unmute while shout is playing audio fails because the channel "has a media bug, hard mute not allowed"] 2015-10-09 12:02:40 -05:00
Michael Jerris 1665168d37 FS-8269: fix build 2015-10-01 14:31:59 -04:00
Brian West 070291b44d FS-8244 2015-09-30 16:04:09 -05:00
Anthony Minessale 8681d42167 FS-8215: MacOSX nanosleep is not super accurate, use scaling factor to get it closer to correct 2015-09-29 11:24:02 -04:00
Saumar Hajjar 4977f608fe FS-7673: [mod_v8] Fixed ODBC NULL value incorrectly evaluated 2015-09-29 11:23:36 -04:00
Anthony Minessale 2655c12e45 FS-8190: [mod_event_socket] When using nixevent, freeswitch stops sending us certain custom event that were NOT part of the nixevent command 2015-09-29 11:19:25 -04:00
Ken Rice 0405d1f980 Bump Version Number 2015-09-28 00:25:43 -05:00
Ken Rice aaef0e2987 bump version 2015-09-25 09:40:02 -05:00
Anthony Minessale 5f3de47a21 FS-7911: reduce pool memory allocation where not necessary
Conflicts:
	src/mod/endpoints/mod_sofia/mod_sofia.c
2015-09-25 08:46:18 -05:00
Anthony Minessale a2061df862 FS-7911 #resolve
Conflicts:
	src/mod/endpoints/mod_sofia/mod_sofia.c
2015-09-24 16:02:56 -05:00
Travis Cross e49f8c65f7 Remove explicit set of WorkingDirectory
In the systemd unit for FS/debian, if the WorkingDirectory is not set
then it defaults to '/'.  This is fine for FS, and is a common and
expected chdir choice for daemons.

We had previously set this to /run/freeswitch.  Due to Debian having
systemd-coredump(8) disabled, this was causing core files to be
written to /run/freeswitch, which is a bad place for them as it's
mounted on tmpfs.

It's better to leave FS as running on '/'.  This will prevent core
files from being written unless the user adjusts `sysctl
kernel.core_pattern`, which is a reasonable thing to expect if the
user wants these files.  Core files can be huge, and having them go
anywhere unexpectedly can be a problem.

When Debian adds the systemd-coredumps support this will all work
nicely and automatically.

ref: http://www.freedesktop.org/software/systemd/man/coredump.conf.html
ref: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=744964

FS-7909
2015-09-22 05:50:57 +00:00
Travis Cross 0aca2c714d Use systemd RuntimeDirectory for /run/freeswitch
This changes how we create the temporary directory /run/freeswitch
when starting FS with systemd.  The /run directory starts empty after
a system reboot, so we need to ensure this directory is present.

As part of systemd.exec(5), systemd provides a mechanism to
automatically manage these directories under /run and to bind their
lifetime to the lifetime of the process.

This commit moves to using the RuntimeDirectory= mechanism and removes
the obsolete ExecStartPre/mkdir code.

FS-7130
2015-09-22 05:50:41 +00:00
Michael Jerris cd4ebc67c4 FS-8042, FS-8182: add ping time (in ms) to sip_registrations table, displays as part of the show commands that show registration details, add force_ping=true user var to force options ping on individual registered endpoints 2015-09-21 17:46:35 -05:00
Michael Jerris 7dda9d01ea FS-8185: [core] Allow xml preprocessor to expand variables where the resulting value is much longer than the original size 2015-09-21 17:46:27 -05:00
Anthony Minessale 9936846e01 FS-8167 [mod_lua] Fixed a segfault caused by using api:execute or session:execute and not quoting the first argument like api:execute(log, “Second argument”) instead of api:execute(“log”, “Second argument”) 2015-09-21 17:46:13 -05:00
Anthony Minessale 5844c10fdd FS-8169 Fixed uuid_displace on stereo channels can lead to memory corruption causing a crash 2015-09-21 17:45:59 -05:00
Anthony Minessale 739ec596f0 FS-8175 #resolve [Add continue_on_answer_timeout variable to allow channel to proceed from a tripped answer timeout] 2015-09-16 18:14:42 -05:00
Michael Jerris f4ed3a27ff FS-8149: fix mod_xml_cdr curl dependency in makefile 2015-09-15 12:24:20 -04:00
Tamas Cseke a4e1d4c00a FS-8147: [mod_erlang_event] Fix process spawing segfault
Don't delete spawn reply because it can cause segfault in strncmp, check the flag instead
2015-09-15 12:23:10 -04:00
Artur Zaprzała 5257ee6521 FS-8140: [mod_sofia] Fix user_name typo in sofia_handle_sip_i_invite 2015-09-15 12:22:59 -04:00
Natanael Copa 8a8c8e943a FS-8131: [mod_voicemail] fix disallowed empty password set
Prevent users to change password to an empty password when
allow-empty-password-auth is set to true.
2015-09-15 12:21:34 -04:00
Natanael Copa d0010f6d83 FS-1772: [mod_voicemail] fix reset of voicemail greeting to default to allow entering 0 to restore the default greeting. 2015-09-15 12:20:25 -04:00
Michael Jerris 3c57190b79 FS-8160: properly handle malformed json when parsing json with \u at the end of a json string 2015-09-14 17:57:44 -04:00
Chris Rienzo 12b2880b06 FS-8143 #resolve #comment [mod_rayo] Fix crash caused by client disconnecting from mod_rayo while a message is being delivered to that client.
This is caused by the XMPP context's JID -> XMPP stream mapping not being cleaned up on XMPP stream destruction.
2015-09-09 17:05:58 -04:00
Anthony Minessale fab435479a FS-8127 #resolve [update codec when detecting rate change in mod_conference more often] 2015-09-09 14:12:46 -05:00
Peter Wu 02cc5bcd14 Restore LUA dialplan ACTIONS functionality
Since using SWIG 2.0 to generate the code, two new items have been
pushed on the stack. Use relative stack indices to avoid breakage.

FS-8099 #resolve
2015-09-09 14:00:10 -05:00
Anthony Minessale 6f503bdc98 FS-7486 #resolve update sofia 2015-09-09 12:38:00 -05:00
Anthony Minessale II e05a5c2cdf Merge pull request #243 in FS/freeswitch from ~ARTURZ/freeswitch:FS-7486-broken-sofia-request-queue to master
* commit '074b07f5458d8584c153a5810bfa2e4011def20c':
  FS-7486: Fix handling of queued requests in Sofia-SIP
2015-09-09 12:38:00 -05:00
Anthony Minessale 1613f145d6 FS-8142 minor formatting mod 2015-09-09 12:38:00 -05:00
Anthony Minessale II b72c89cd2c Merge pull request #475 in FS/freeswitch from ~ARTURZ/freeswitch:FS-8142-switch_core_session-thread-cache-races to master
* commit 'cd4c3188e4f715ff129dc4eea1a4ba50140c2a42':
  FS-8142 Fix a thread cache thread-safety and caching
2015-09-09 12:37:52 -05:00
Anthony Minessale II 4892f95216 Merge pull request #474 in FS/freeswitch from ~ARTURZ/freeswitch:FS-8141-add-apr_queue_term to master
* commit '9e29ea01b59280845f481f5b7b3743251c77dd50':
  FS-8141 Add support for apr_queue_term() to switch_apr.c
2015-09-09 12:27:24 -05:00
Mike Jerris a223dd0236 FS-7135: [mod_sofia] fix response to re-invite with duplicate sdp (such as we get from seesion refresh) when soa is disabled to include an sdp. Fixes t.38 fax failure on session refresh 2015-09-01 15:26:22 -05:00
Anthony Minessale d3d1a058ab FS-7903 #resolve [proxy_media gives Codec PROXY Exists but not at the desired implementation. 0hz 0ms 1ch] 2015-09-01 15:26:02 -05:00
Michael Jerris bad2250044 FS-8056: [mod_voicemail] fix segfault on vm_inject, regression from FS-7968 2015-09-01 15:23:03 -05:00
Joshua Gigg f9f5348bfa FS-7968: [mod_voicemail] fix verbose events
- Fix record-name event missing VM-Name-Path
 - Fix verbose events for mod_voicemail 'folder-summary'
 - Send change-password event in mod_voicemail
 - Fix verbose events for mod_voicemail 'leave-message'
2015-09-01 15:22:50 -05:00
Michael Jerris 15c5e01f6a FS-8055: [build] add confdir variable to freeswitch.pc 2015-09-01 15:20:36 -05:00
Mike Jerris 3acabb8e3c Merge pull request #447 in FS/freeswitch from bugfix/FS-7911-v1.4 to v1.4
* commit 'd5d451734047a7dd6f847f6bd875f4a73c0d011d':
  FS-7912: [mod_conference] fix for v1.4 branch to not allocate for conference cdr if conference cdr is disabled
2015-09-01 13:06:25 -05:00
Chris Rienzo 19233e4690 FS-8110 #resolve #comment [mod_rayo] prompt IQ error reply was being deleted after being sent for delivery. This is incorrect since message delivery thread will clean up the message. 2015-09-01 13:43:30 -04:00
Chris Rienzo c74264b942 FS-8082 #resolve #comment [mod_rayo] do not remove items from hash while iterating 2015-09-01 12:50:02 -04:00
Chris Rienzo 1b8814430e FS-8103 #resolve #comment [mod_rayo] handle <prompt> where <output> finishes unexpectedly before start event is received 2015-09-01 11:00:54 -04:00
Chris Rienzo 09a1c47548 FS-7752 [mod_rayo] increase maximum number of <tag> elements from 30 to 1024. This allows adhearsion to create large grammars to navigate IVR menus. 2015-08-31 09:46:55 -04:00
Anthony Minessale d9ea0f56d2 FS-8091 backport to 1.4 2015-08-28 14:48:52 -05:00
Michael Jerris d5d4517340 FS-7912: [mod_conference] fix for v1.4 branch to not allocate for conference cdr if conference cdr is disabled 2015-08-28 14:43:35 -05:00
Ken Rice 87a059bafc bump version numbers 2015-08-26 09:57:59 -05:00
Chris Rienzo c93ae16de2 FS-8054 #resolve #comment [mod_rayo] fix warning when building on Debian. 2015-08-26 10:53:14 -04:00
Michael Jerris 781959230b FS-8047: [build] fix build errors in mod_oreka, and mod_sangoma_codec due to using __FUNCTION__ on newer compilers 2015-08-26 09:32:27 -04:00
Michael Jerris 0d3c4870f3 FS-8047: [build] fix build error in mod_basic due to using __FUNCTION__ on newer compilers 2015-08-25 21:48:22 -04:00
Michael Jerris bdeadadc88 FS-8047: [build] fix build error in mod_basic due to using __FUNCTION__ on newer compilers 2015-08-25 17:36:46 -04:00
Anton Farygin b59ff25c71 FS-7043: [build] fixed apr1 unresolved symbols in libfreeswitch.so.1.0.0 2015-08-25 14:52:25 -05:00
Anthony Minessale da6997d771 FS-7985: [mod_voicemail] fails to compile on 32-bit PPC platform 2015-08-25 14:52:09 -05:00
Michael Jerris 5a8a37c955 rename debug trace 2015-08-25 14:52:05 -05:00
Moises Silva e105fc8450 OPENZAP-237: [freetdm] Use __FTDM_FUNC__ instead of __FUNCTION__ to comply with c99 in gcc 5.1 2015-08-25 14:51:34 -05:00
Moises Silva 4703bba8e5 OPENZAP-238: [freetdm] Fix gsm call id management hangup race, and some compilation errors 2015-08-25 14:50:27 -05:00
Anthony Minessale defab5ac22 FS-7962: [core] Invite/replaces fails about half the time when between 2 freeswitch servers 2015-08-25 14:49:49 -05:00
Anthony Minessale d7f3c5a721 FS-7969: Freeswitch segfaults due to pthread_setschedparam() on a thread that has exited] #comment please test this fix which was verified working 2015-08-25 14:49:26 -05:00
Joshua Gigg 23fbdcabfa FS-7975: [mod_voicemail] Fix record-greeting event missing VM-Greeting-Path 2015-08-25 14:49:05 -05:00
Michael Jerris bfa3128724 FS-7955: [mod_sofia] fix crash caused by invalid contact when using event to send a notify message 2015-08-25 14:48:58 -05:00
Brian West 30ffe287da FS-7917: [mod_sofia] Fixed default config, we really shouldn’t be setting ext-*-ip settings for ipv6 profiles 2015-08-25 14:48:42 -05:00
Michael Jerris 0fb2cbcece FS-7839: [webrtc] Fix interop with firefox > 38 to work with new EC dtls requirements 2015-08-25 14:47:59 -05:00
Anthony Minessale 447ae4634a FS-7891: [mod_spandsp] Allow spandsp dtmf detector to work on rates other than 8k 2015-08-25 14:47:40 -05:00
Anthony Minessale 8934b1cced FS-7891: [mod_spandsp] Allow spandsp dtmf detector to work on rates other than 8k 2015-08-25 14:47:15 -05:00
Michael Jerris 79a99dfc8a FS-7872: [mod_verto] handle attempting to transfer 1 legged call gracefully 2015-08-25 14:47:10 -05:00
Michael Jerris 730793be32 FS-7866: [core] fix crash when running incorrect var api expansion syntax "eval ${${external_sip_ip}:4}" 2015-08-25 14:46:51 -05:00
Hristo Trendev 06b05e3b7b FS-7685: [mod_say_nl] Fix Dutch numbers pronunciation
The Dutch number pronunciation is more like the German one. 21 is
pronounced as "one-and-twenty".

FS-7685 #resolve
2015-08-25 14:46:39 -05:00
Anton Lozovsky 33c18f9eac FS-7731: [mod_xml_cdr] url_index global pointer concurrent access fix, curl default connection timeout fix
- thread variable copy of url_index global pointer to prevent the concurrent access having wrong state change if the posting to the current http server was unsuccessfull;
- overriding the default curl connection timeout

Based on need to figure out the smallest block of code need to mutex, and that libcurl (and its wrapper) is definitely thread safe.
2015-08-25 14:46:19 -05:00
andywang1988 e696410a0d FS-7754: [freetdm] Fixed a bug relating to single digit dial-regex with analog devices 2015-08-25 14:46:06 -05:00
Mark Lipscombe fff773897c FS-7778: [mod_sofia] Fixed a bug causing a SQL statement to fail because of a double quote instead of a single quote
sofia_glue.c tries to issue an SQL "ALTER TABLE" statement to add the
ping_status column to sip_registrations, but fails because the default
is incorrectly quoted (double quotes vs single quotes).
2015-08-25 14:45:51 -05:00
Brian West e0d10da0fe FS-7767: [mod_sofia] Fixed a segfault caused by invalid arguments to sip_dig 2015-08-25 14:45:31 -05:00
Brian West ab85263386 FS-7761 [core] fix shutdown races running api commands during shutdown 2015-08-25 14:45:25 -05:00
Anthony Minessale 4fc6d2f732 FS-7721: [core] Fixed a segfault caused when using session:recordFile() and session:unsetInputCallback in a lua script 2015-08-25 14:44:28 -05:00
Davide Colombo b9eff3b09a FS-7732: [mod_commands] follow recording on other session
follow recording on other session
2015-08-25 14:44:16 -05:00
Brian West 776e8a501a FS-8037: zrtp-passthru shouldn't activate unless the zrtp-hash is in the SDP. 2015-08-25 14:43:56 -05:00
Anthony Minessale ad04a8d30c FS-8028: [mod_shout] fix random sockets being closed regression from FS-7621 2015-08-23 17:39:31 -05:00
Chris Rienzo dc85ef18e8 FS-7951 #resolve #comment completely clean up mod_rayo if it fails to load 2015-08-12 18:00:19 -04:00
Anthony Minessale 367848e07e FS-7447 #resolve 2015-07-30 12:31:12 -05:00
Anthony Minessale a88accaa30 FS-7760 add some more params 2015-07-29 15:53:54 -05:00
William King bf08a378cb FS-7654 build fix from part 3 2015-07-23 18:36:13 -07:00
Anthony Minessale 89b05c4a4f FS-7654 part 3 2015-07-23 20:22:47 -05:00
Anthony Minessale 18dd3634bd FS-7654 regression on eavesdropping on channels with unlike rates 2015-07-22 00:37:57 -05:00
Anthony Minessale de75d9fca6 FS-7654 regression on eavesdropping on channels playing a file because of channel count of 0 on write frame from stream_file 2015-07-22 00:29:36 -05:00
Anthony Minessale 71ee949431 add dial-prefix and absolute-dial-string to the nightmare xml 2015-07-15 16:57:28 -05:00
karl anderson 63c6d9c15f FS-7760: [mod_sofia]
added xml fetch for channels to externally support nightmare transfer
depends on channel-xml-fetch-on-nightmare-transfer profile param (default is disabled)
2015-07-15 16:30:40 -05:00
Anthony Minessale b95362f965 FS-7486 2015-07-03 11:42:15 -05:00
Anthony Minessale 39d0797abe FS-7750 #resolve 2015-07-01 12:55:16 -05:00
Ken Rice 0ae8ee7f8f Bump Version 2015-07-01 06:54:26 -05:00
Yossi Neiman d8e6c545a6 FS-7429: fix to output proper json 2015-06-30 14:08:43 -04:00
Sergey Safarov eb84d9cdf8 FS-7524: mod_callcenter - Fixing tiers, level and position should default to 1 instead of 0 2015-06-29 11:17:27 -04:00
Anthony Minessale a3ebbf46cc FS-7479 Fixed a crash caused by large RTP/PCMA packets and resampling 2015-06-29 11:15:38 -04:00
doancea ec801c25f8 FS-7597: [mod_codec2] Fixed encoded_data_len for MODE 2400, it should be 6 bytes. Also replaced 2550 bps bitrate (obsoleted operation mode) by 2400 2015-06-29 11:13:20 -04:00
Brian 014434bdb7 FS-7573 #resolve fix 80bit tag support 2015-06-29 11:09:56 -04:00
Anton Schur d098166dbf FS-7612: callflow section in json_cdr as array. 2015-06-26 16:04:37 -04:00
Michael Jerris 637cd993e0 FS-7650: #resolve [mod_verto] Fix crash when making a call from a verto user with profile-variables in their user profile 2015-06-26 16:01:23 -04:00
Alexander Traud 35551d1d62 Add Perfect Forward Secrecy (DHE PFS) to mod_sofia
Ephemeral ECDH (ECDHE) was supported already. This patch adds Ephemeral
DH (DHE). To enable it, add DH parameters into the private-key file of
your server (agent.pem). For example via:
openssl dhparam -out dh.pem 2048

FS-7561 #resolve
2015-06-26 15:48:26 -04:00
Travis Cross 979c94de37 FS-7708: Fix docs on enabling cert CN/SAN validation
The correct incantations to enable certification common name / subject
alternative name verification, per our code, are `subjects_all`,
`subjects_in`, and `subjects_out` in a Sofia profile's
`tls-verify-policy`.  What we've had in our examples and documentation
for years are `all_subjects`, `in_subjects`, and `out_subjects`.

The result of this is that we've almost certainly confused people into
using the incorrect forms.  Those poor people will believe that they
are verifying the CN/SAN of the received host certificate against the
list in `tls-verify-in-subjects` when in fact they are not.

One clear issue in this case was that the incorrect forms failed to
have any effect without providing any warning or error.  This issue
could not have persisted if we had made more noise about incorrect
input.

Given how long this has been broken, it's tempting to alias the
incorrect forms to the correct ones.  However this would certainly
break many existing installations that have, because of this error,
never actually tested their setup with CN/SAN validation enabled.

In this commit, we fix the examples and documentation, and add an
error-level log output when unknown values are passed to
`tls-verify-policy`.

Thanks-to: Andrew Patrikalakis <anrp+freeswitch@anrp.net>
2015-06-26 15:47:01 -04:00
Anthony Minessale 2aa1ee1dde FS-7489 #resolve 2015-06-24 16:52:30 -05:00
Italo Rossi d2fadd6993 FS-7467: mod_callcenter - Fixing uuid-standby agents. 2015-06-24 17:27:45 -03:00
Chris Rienzo 758409c794 FS-7720 improve play_and_detect_speech to set current_application_response channel variable as follows:
"USAGE ERROR": bad application arguments
    "GRAMMAR ERROR": speech recognizer failed to load grammar
    "ASR INIT ERROR": speech recognizer failed to allocate a session
    "ERROR": any other errors

  This is useful for determining that play_and_detect_speech failed because the recognizer is out of licenses
  giving the developer a chance to fall back to traditional DTMF menu navigation.
2015-06-24 12:40:24 -04:00
Anthony Minessale 73f45e3758 FS-7689 #resolve 2015-06-19 13:23:23 -05:00
Brian West afabc3cf5e FS-7297 sigh 2015-06-19 09:25:41 -05:00
Anthony Minessale 0e321de744 FS-7678 #resolve 2015-06-19 01:34:47 -05:00
Anthony Minessale d501bdc813 FS-7432 regression from 251c4ab439 don't count recovering channels 2015-06-18 13:34:12 -05:00
Brian West a5dfc5d488 fix perl swig patching to work with latest swig from debian jessie 2015-06-17 11:06:44 -05:00
Michael Jerris 91bce5f843 FS-7670: re-swig 2015-06-17 09:30:33 -05:00
Anthony Minessale 19a38bcec4 update verto-min 2015-06-15 13:29:04 -05:00
Anthony Minessale 15257ebe05 add missing verto assignment 2015-06-15 12:30:53 -05:00
Anthony Minessale 1cfe50716c FS-7654 #resolve (BACK PORT TO 1.4)
Conflicts:
	src/switch_core_io.c
	src/switch_ivr_async.c
2015-06-13 00:00:15 -05:00
Anthony Minessale f423b2d6d2 FS-7621 #resolve 2015-06-11 18:41:22 -05:00
William King 3d0cbb2812 FS-7623 Fix param name ordering bug in mod_amqp due to exposing these params 2015-06-11 12:33:42 -07:00
Michael Jerris 9d49966551 FS-7642: make sure that make install creates certsdir, cachedir, soundsdir, and storagedir 2015-06-11 13:47:03 -05:00
Brian West 4c3f504813 FS-7642 part 1 of verto defaults for v1.4 improvements 2015-06-11 12:30:55 -05:00
Anthony Minessale 2ca5394425 FS-7621 backport to 1.4 2015-06-11 10:40:26 -05:00
Anthony Minessale cdbf704667 FS-7636 #resolve 2015-06-10 16:19:01 -05:00
William King 63eca6112b FS-7623 allow for custom exchange name and type for mod_amqp producers 2015-06-08 21:18:41 -07:00
William King 7db5b178f6 FS-7622 make sure to close the connections on destroy. Currently the connection is malloc'd from the module pool, so there is nothing to destroy. 2015-06-08 21:18:26 -07:00
Anthony Minessale 5145746438 FS-7432 send actpass on re-invites 2015-06-08 16:22:44 -05:00
Ryan Lantzer dd64594c05 Updated SKINNY on-hook action to hang up all calls on a device, except those in a short list of call states (or perform a blind transfer).
Added a hook after completing the hangup operation to start ringing if there is an inbound call active on the device.

Signed-off-by: Nathan Neulinger <nneul@neulinger.org>
2015-06-05 17:36:51 -05:00
Ken Rice 6923953d45 FS-7607 #resolve #comment Update URLs to reflect https protocol on freeswitch.org websites and update additional URLs to avoid 301 redirects. 2015-06-05 11:33:05 -05:00
William King 828942137a Fix for emacs screen arrow key disease 2015-06-05 12:29:19 -04:00
Michael Jerris bb051500a1 FS-7610: fix gcc5 compilation issue 2015-06-05 11:41:37 -04:00
Brian 479c13ab47 FS-7297 Not sure anyone tested this 2015-06-05 09:48:47 -05:00
Anthony Minessale 09a28930f2 add a bit to 2db8f94ab6 2015-06-02 21:10:16 -05:00
Michael Jerris 436bb68dbb FS-7258, FS-7571: [mod_xml_cdr] properly encode xml cdr for post to web server 2015-06-02 18:56:07 -05:00
Anthony Minessale 797c0579ac FS-7604 #resolve 2015-06-02 15:06:48 -04:00
Chris Rienzo b881188c1c FS-7564 #resolve #comment [mod_rayo] Added new algorithms for offering calls to clients.
Two new params added to autoload_configs/rayo.conf.xml
     offer-algorithm
       all: offer to all clients (default and old behavior)
       first: offer to first client, fails over to next client in list
       random: offer to random client, fails over to next random client

     offer-timeout-ms
       0: disable
       > 0 and < 120000: time to wait for reply from offer.  On timeout, next client is offered call.
                         If no other clients available, call is rejected.  5000 is default.
2015-06-02 10:53:54 -04:00
William King b1caa619a2 FS-7426 shouuld not be disabled on all, only squeeze and wheezy 2015-06-01 17:49:32 -07:00
Nathan Neulinger fb02e34c5a FS-7593 --resolve add locking keyed on device name around any database updates adding/removing the device 2015-06-01 12:23:45 -05:00
Brian 9c41c1217e FS-7579 --resolve 2015-06-01 10:25:01 -05:00
Steve Underwood f4841ca1bd V.27ter modem modified to make it a little less tolerant of poor SNR, and a
little more tolerant of big timing errors between the symbols at the far end,
and as they are received by us.
2015-06-01 09:15:26 -05:00
Ken Rice ebf2df68fa make this work with bamboo and mock properly 2015-05-27 18:36:37 -05:00
Ken Rice 0f2e272f0f Merge branch 'master' into v1.4 2015-05-27 17:56:11 -05:00
Ken Rice e32f39382a part of the version bump 2015-05-27 17:55:07 -05:00
Ken Rice 9c76b9b485 Merge branch 'master' into v1.4 2015-05-27 12:34:12 -05:00
Ken Rice 9c3d33c67e Merge branch 'master' into v1.4 2015-05-26 09:58:13 -05:00
Ken Rice dc23337258 Bump Version Number 2015-05-26 01:17:07 -05:00
Ken Rice dfd91879c4 Merge branch 'master' into v1.4 2015-05-26 01:09:23 -05:00
Ken Rice 4eed221b69 version bump 2015-03-12 13:55:23 -05:00
Ken Rice c1ed0618fd Merge branch 'master' into v1.4 2015-03-12 13:53:07 -05:00
Ken Rice 4df2105a46 bump version 2015-03-12 13:52:19 -05:00
Ken Rice 5a650e4c2f Merge branch 'master' into v1.4
Conflicts:
	build/next-release.txt
2015-03-12 13:51:12 -05:00
Ken Rice 40e1d8f914 version bump 2015-03-12 13:49:45 -05:00
Ken Rice 0828caf695 Merge branch 'master' into v1.4 2015-03-12 13:49:00 -05:00
Ken Rice 507a0f22c5 Merge branch 'master' into v1.4
Conflicts:
	debian/bootstrap.sh
	debian/util.sh
	docs/SubmittingPatches
	src/mod/endpoints/mod_verto/mod_verto.c
2014-12-29 12:59:51 -06:00
Ken Rice c52df1d8e4 version bump 2014-12-24 21:26:15 -06:00
Ken Rice 0d5bd66c42 update URLs in this document 2014-12-24 10:40:08 -06:00
Seven Du f3d4c6e7b9 FS-7046 fix warning introduced from b341ff7 2014-12-24 10:40:08 -06:00
Seven Du 82b7f01692 FS-6984 set some default video rate 2014-12-24 10:40:08 -06:00
Michael Jerris b0fecc1844 FS-7100: make buffer for sub contact big enough 2014-12-24 10:40:07 -06:00
Jeff Lenk 7f3c90e110 FS-7046 fix some additional warnings 2014-12-24 10:40:07 -06:00
Anthony Minessale f33127db91 disable hard-mute when a session has a media bug attached 2014-12-24 10:40:07 -06:00
Brian West aae4a76f3a FS-7083: fix divide by zero 2014-12-24 10:40:07 -06:00
William King 26aba8de77 Build fix for gcc 4.9 fixing a variable set but not used error 2014-12-24 10:40:07 -06:00
Anthony Minessale 95bc5d2bef FS-7093 %FEATURE #resolve #comment added to master 2014-12-24 10:40:07 -06:00
Anthony Minessale b94eb0f7e2 FS-7083 #resolve #comment this should do it. The problem is linked to side-effects from the read thread being delayed by writing to the file handle. It was so much worse on mp3 because the shout encoder blocks while its churning the data and delays it more. This patch adds a dedicated thread for writing to the file and the channel_variable RECORD_USE_THREAD=false will disable it and sync may still be maintained at the cost of dropping more data from the audio signal. 2014-12-24 10:40:07 -06:00
Dmitriy N. Borisov 41b97031d7 invalid type cast correction 2014-12-24 10:40:07 -06:00
Dmitriy N. Borisov 65ca6ed024 list_users tipo correction 2014-12-24 10:40:07 -06:00
Brian West 01cbaa2809 chmod 2014-12-24 10:40:07 -06:00
Brian West 68fcf1916f update build deps for debian list 2014-12-24 10:40:07 -06:00
Anthony Minessale 07b4dbeea7 FS-7083 #comment patch to change mod_shout to use lame_encode_buffer_interleaved on stereo channels so we don't have to mess with the input data 2014-12-24 10:40:07 -06:00
Anthony Minessale 39ae68c3c6 FS-7095 #comment please test 2014-12-24 10:40:06 -06:00
Moises Silva c8ae02bba3 Fix timestamps in mod_bert broken by the cpu improvements refactoring 2014-12-24 10:40:06 -06:00
Anthony Minessale fa2133b60d FS-7092 #resolve #comment resolved in master 2014-12-24 10:40:06 -06:00
Chris Rienzo ffc6bba3ff FS-7091 #resolve #comment [mod_rayo] Removed unnecessary mutex lock inside input component's cleanup function since the input component won't be cleaned up unless all references have been released. This fixes a deadlock when output component is created at the same time an input component completes. 2014-12-24 10:40:06 -06:00
Anthony Minessale e1ebedf9ce set rtp_has_crypto for dtls calls 2014-12-24 10:40:06 -06:00
Jeff Lenk a887f02dca vs2010 unimrcp working build 2014-12-24 10:40:06 -06:00
Jeff Lenk cb71989ba5 vs2010 support for recent unimrcp changes 2014-12-24 10:40:06 -06:00
Jeff Lenk e2972ab75f vs2010 support for recent unimrcp changes 2014-12-24 10:40:06 -06:00
Jeff Lenk 63cd544998 fix windows build error 2014-12-24 10:40:06 -06:00
Moises Silva a04e3dd57a Add bert stats to mod_bert::lost_sync event
The following values can be read from the event:

sync_lost_percent - Error percentage within the analysis window
sync_lost_count - How many times sync has been lost
cng_count - Counter of confort noise packets
err_samples - Number of samples that did not match the sequence
2014-12-24 10:40:06 -06:00
Moises Silva c16d7b2285 Improve mod_bert cpu efficiency
* Use memmem() and memcmp() for pattern checks
* Use a static pre-built buffer for the write frame
2014-12-24 10:40:06 -06:00
Anthony Minessale 75711f47ec FS-7086 FS-6798 #resolve 2014-12-24 10:40:06 -06:00
Anthony Minessale e12ef5819f FS-6994 #resolve 2014-12-24 10:40:05 -06:00
Anthony Minessale 2bded497fd allow 10ms jb 2014-12-24 10:40:05 -06:00
Anthony Minessale 8261c75441 some changes to webrtc to make it work with iDoubs in rtcweb profile mode 2014-12-24 10:40:05 -06:00
Michael Jerris e9afb07512 FS-7078: fix sip_header_as_string to properly null_terminate on larger header strings 2014-12-24 10:40:05 -06:00
Jeff Lenk bb145be423 trivial fix for last commit 2014-12-24 10:40:05 -06:00
Jeff Lenk c84add31a9 windows force datatype conversion on uint64_t to switch_size_t for recent change. maybe we should change the structure to be uint64_t as well? 2014-12-24 10:40:05 -06:00
Anthony Minessale 6a71c82ab4 re-mark cur_payload as negotiated when detected as such by parser or the rtp could stop working on session re-invite 2014-12-24 10:40:05 -06:00
Italo Rossi 9eb1dda419 FS-7049 - Documentation for state optional paramenter in callcenter_config queue list and count 2014-12-24 10:40:05 -06:00
Anthony Minessale d61873bc39 FS-7015 #resolve #comment The code was not properly catching the 0.0.0.0 after changing it to work with ICE SDPs because it was looking in the wrong place for the 0.0.0.0 2014-12-24 10:40:05 -06:00
Anthony Minessale f779dc98e1 only negotiate codecs that were previously negotiated on re-invites unless its intentional to change codecs 2014-12-24 10:40:05 -06:00
Anthony Minessale 4c3c149d3d FS-6891 FS-7002 FS-7059 FS-7072 FS-7073 FS-7076 #close #comment All of these bugs are invalidated due to a botched revert -- commit 72c3df5ed3 was supposed to revert commit 1b612fecb6 but it only reverted part of it. commit 158c1f23da from the other day was erroneously created to work around the result of the botched revert so it is reverted. The result of this commit should be to bring it back to effectively properly revert 1b612fecb6 and now you can test and open new bugs if necessary. This includes the segfault in eavesdrop, and any media bug releated reports. Consider working together and only reporting one new bug if you still encounter any more problems and be sure to include details and make sure the jitter buffer is being used. 2014-12-24 10:40:05 -06:00
Chris Rienzo ebf4ab4a1e FS-7047 #resolve #comment [mod_rayo] arbitrary MRCP headers can now be sent to unimrcp output components 2014-12-24 10:40:05 -06:00
Chris Rienzo bd8e231969 FS-7047 #comment [mod_rayo] arbitrary MRCP headers can now be sent to unimrcp input components 2014-12-24 10:40:04 -06:00
Michael Jerris f542f71f2b FS-6688: don't update the contact when the original had fs_path, the new one doesnt, and the contact didn't change. This will fix the normal case of record route from a proxy without breaking normal changing of a contact 2014-12-24 10:40:04 -06:00
Anthony Minessale fc547335f9 use cached time to save cpu 2014-12-24 10:40:04 -06:00
Anthony Minessale cb941a3b0c factor channel count into flush len 2014-12-24 10:40:04 -06:00
Anthony Minessale bf2b425bb0 FS-7055 #resolve 2014-12-24 10:40:04 -06:00
Michael Jerris e5d351d0a1 FS-7062: [mod_sofia] on redirect, when uri are passed in without <> with multiple uris, automatically add the q= header param in decending order. This should make 300 Multiple Choices work well with devices that require the q param. If you would like to specify explicit q-values, please use the syntax of redirect where you specify the entire header using the <> 2014-12-24 10:40:04 -06:00
Anthony Minessale 5910f4de51 FS-7063 #resolve 2014-12-24 10:40:04 -06:00
Anthony Minessale 54a2979b01 FS-7002 #resolve #comment please verify 2014-12-24 10:40:04 -06:00
Paul Arnold 624b45a84f FS-7051: Preserve the annexb=no/yes status
As per RFC4856, Annex B mode for G.729 is disabled if the SDP contains a
fmtp parameter annexb=no and enabled if annexb=yes or the annexb parameter
is missing.

When responding to an offer mod_sangoma_codec always returns an answer
without a fmtp parameter. Even in response to a SDP offer which contains
one. This has the effect of responding to a request to disable Annex B
with an answer that only Annex B is supported.

With this change mod_sangoma_codec copies the fmtp parameter from the
offer to the answer fixing the problem.
2014-12-24 10:40:04 -06:00
Humberto Diógenes 0ef2b03ea1 Fix JIRA (FS-7018): mod_callcenter's longest-idle-agent strategy is unfair 2014-12-24 10:40:04 -06:00
Anthony Minessale ba623d0fa6 update gdb scripts for new hash format 2014-12-24 10:40:04 -06:00
sgutierrez 6705087d38 FS-7052 Moving jb queue swap operation out of the debug block.
Fixes a bug where the jitter buffer implementation wasn't discarding
old packets if debug mode was disabled.
2014-12-24 10:40:04 -06:00
Brian West fdb269c2d2 FS-7046 follow up on type change 2014-12-24 10:40:03 -06:00
Brian West d600a15681 FS-7046: fix some unreachable code warnings 2014-12-24 10:40:03 -06:00
Brian West aaeea2df86 FS-7046: fix data types and casting on some vars to silence windows build warnings 2014-12-24 10:40:03 -06:00
Chris Rienzo 459ccb019e FS-7045 #resolve #comment [mod_rayo] guarantee that dialed call can be joined when answered event is sent. 2014-12-24 10:40:03 -06:00
Brian West 982d386be2 FS-7030 #resolve 2014-12-24 10:40:03 -06:00
Dave Kompel 48a723ac9f Fix mrcp libraries to build right 2014-12-24 10:40:03 -06:00
François 9c7e5f761b FS-6766, fix verto caller ringback missing on conference bridge 2014-12-24 10:40:03 -06:00
Italo Rossi 0bc9010c64 fix FS-7049 - Count and list agents based on their state 2014-12-24 10:40:03 -06:00
Chris Rienzo 2e9c6b4fe0 FS-5816 #resolve #comment re-add completion cause to session record stop event 2014-12-24 10:40:03 -06:00
Brian West 785c5e2316 FS-7030 work in progress 2014-12-24 10:40:03 -06:00
Brian West 11ab74d684 FS-6980 #resolve don't crash when using native recording on recordstop the redo 2014-12-24 10:40:03 -06:00
Anthony Minessale eac1c64058 FS-6891 FS-6713 #comment revert 1b612fecb6 2014-12-24 10:40:02 -06:00
Hristo Trendev 3c0e57940e add timezone support to mod_say_{de,es,ja,nl,th,zh}
This is nothing more than a shameless copy/paste from another mod_say
module, which already had timezone support. It simply checks if the
timezone variable is set and if it contains a valid timezone, then this
timezone will be used when announcing times/dates.

FS-7048 #resolve
2014-12-24 10:40:02 -06:00
Anthony Minessale 59fd7c26db FS-7037 #resolve 2014-12-24 10:40:02 -06:00
Chris Rienzo eb71ff41c7 FS-7030 #comment [unimrcp] restore visual studio 2010/2012 project files added by FS project 2014-12-24 10:40:02 -06:00
Seven Du 56e14bce76 #comment FS-7025 fix compiler warning introduced from e55aee14 2014-12-24 10:40:02 -06:00
Anthony Minessale 42538ff8d5 FS-7025 %FEATURE #comment please test 2014-12-24 10:40:02 -06:00
Anthony Minessale f4714f4f7b FS-7015 #comment please test 2014-12-24 10:40:02 -06:00
matteo brancaleoni 1186414ea4 Use FTDM_UINT64_FMT macro to log uint64_t values, in order to not break x86 builds. 2014-12-24 10:40:02 -06:00
Chris Rienzo 22fb7a20ac FS-7031 #resolve #comment [unimrcp] update library again to pull in upstream fix for --with-sofia-sip=../sofia-sip 2014-12-24 10:40:02 -06:00
Chris Rienzo 5900ccf9c9 FS-7031 [unimrcp] update sofia-sip.m4 so that it can build when relative path is used in configure.gnu --with-sofia-sip 2014-12-24 10:40:02 -06:00
Chris Rienzo 5c93d15305 FS-7031 [unimrcp] revert configure.gnu change- doesn't work when using non-source build dir. 2014-12-24 10:40:02 -06:00
Anthony Minessale a5dadbe1ba missing deb 2014-12-24 10:40:02 -06:00
Steven Ayre 6b2a81b38c FS-7019 swap debian/ubuntu autodetection order 2014-12-24 10:40:01 -06:00
Steven Ayre d969a7b399 FS-7019 detect debian explicitly, error on unknown distribution 2014-12-24 10:40:01 -06:00
Steven Ayre a1ea64e4a7 FS-7019 add note on how to build on Ubuntu 2014-12-24 10:40:01 -06:00
Steven Ayre 378686cf9d FS-7019 full list of distributions to target based on distribution autodetection 2014-12-24 10:40:01 -06:00
Steven Ayre 9d1c252614 FS-7019 build error on utopic (lber_types.h: No such file or directory) 2014-12-24 10:40:01 -06:00
Steven Ayre 69bc6e19c8 FS-7019 add support for building on ubuntu trusty and utopic 2014-12-24 10:40:01 -06:00
Brian West f8970da873 FS-7021 #resolve 2014-12-24 10:40:01 -06:00
Tamas Cseke d349caf6a9 file_string write failover FS-4930 2014-12-24 10:40:01 -06:00
Ken Rice ca1d990cfc bump version number 2014-11-19 16:11:13 -06:00
Ken Rice af97a59956 Merge branch 'master' into v1.4 2014-11-19 16:09:14 -06:00
Ken Rice decb35332b Merge branch 'master' into v1.4 2014-11-18 10:18:40 -06:00
Ken Rice b942d0faa8 Rev Bump and fox some merge issues 2014-11-03 13:53:00 -06:00
Ken Rice ace49af950 Merge branch 'master' into v1.4 2014-11-03 13:51:39 -06:00
Ken Rice b33a86cd48 Bump rev 2014-10-10 16:16:02 -05:00
Ken Rice f79f6fafbe Merge branch 'master' into v1.4 2014-10-10 16:14:44 -05:00
Ken Rice 2aca57517a Bump rev 2014-10-10 14:40:17 -05:00
Ken Rice d18c45a5fd Merge branch 'master' into v1.4 2014-10-10 14:35:00 -05:00
Ken Rice bb506c393b Merge branch 'master' into v1.4 2014-10-09 13:40:39 -05:00
Ken Rice a4ef985bf5 Prep for v1.4.10, update version numbers in configure.ac and
Merge branch 'master' into v1.4

Conflicts:
	configure.ac
2014-10-09 10:55:28 -05:00
Ken Rice ae069dcca7 specfile another spot v2 2014-09-29 14:49:48 -05:00
Ken Rice 8834bc28fd specfile another spot 2014-09-29 12:56:21 -05:00
Ken Rice f1a575e074 Merge branch 'master' into v1.4 2014-09-29 12:04:10 -05:00
Ken Rice 2ded568068 bump rev 2014-09-29 10:22:12 -05:00
Ken Rice 2d89eca611 Merge branch 'master' into v1.4 2014-09-29 10:20:27 -05:00
Ken Rice 04789ae35f Merge branch 'master' into v1.4 2014-09-18 17:46:08 -05:00
Ken Rice 55d0aec559 Merge branch 'master' into v1.4
Conflicts:
	freeswitch.spec
2014-09-17 12:23:14 -05:00
Ken Rice 9f72b11892 Merge branch 'master' into v1.4 2014-09-10 13:11:55 -05:00
Ken Rice 5605274664 Merge branch 'master' into v1.4 2014-09-03 09:47:10 -05:00
Giovanni Maruzzelli 00451ed62d mod_spandsp: added SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE on application errors 2014-09-03 15:54:51 +02:00
Ken Rice 498f58677f Merge branch 'master' into v1.4 2014-08-25 11:34:46 -05:00
Giovanni Maruzzelli 1fe89f530f skypopen: new skype client in install/install.pl 2014-08-21 20:57:58 +02:00
Travis Cross 912c3652d2 Merge master into v1.4 2014-08-12 20:02:33 +00:00
Travis Cross 98168fad9f Fix line endings per .gitattributes 2014-08-12 20:00:54 +00:00
Ken Rice ac405bb132 Bumb Rev 2014-07-31 09:09:15 -05:00
Ken Rice 7a96fe57ba Merge branch 'master' into v1.4 2014-07-31 09:05:27 -05:00
Ken Rice 9d1c0f7f3d tweaks for 1.4.7 2014-07-25 03:05:06 +04:00
Ken Rice 59bdbecbd2 Merge branch 'master' into v1.4 and bump rev
Conflicts:
	configure.ac
2014-07-15 10:33:52 -05:00
Ken Rice 9479729340 bump revsions 2014-06-03 14:35:16 -05:00
Ken Rice 6d4fa0ea12 Merge branch 'master' into v1.4 2014-06-03 14:33:50 -05:00
Anthony Minessale 8f5c321714 chrome now requires longer ice password 2014-05-29 14:45:29 -05:00
Ken Rice db4d062318 new version YAY! 2014-05-29 14:39:47 -05:00
Ken Rice db111f6a29 Merge branch 'master' into v1.4 2014-05-29 14:38:46 -05:00
Ken Rice b58efb778f Merge branch 'master' into v1.4 2014-05-22 13:34:34 -05:00
Ken Rice a152e8e976 bump rev in configure.ac 2014-05-22 11:57:49 -05:00
202 changed files with 9299 additions and 6161 deletions

View File

@ -121,16 +121,16 @@ CORE_CFLAGS += -I$(switch_builddir)/libs/tiff-4.0.2/libtiff -I$(switch_srcdir)/l
APR_LIBS = $(AM_LIBAPU_LIBS) $(AM_LIBAPR_LIBS)
CORE_LIBS=
if SYSTEM_APR
CORE_LIBS += $(AM_LIBAPR_LINKLIBTOOL)
else
CORE_LIBS += libs/apr/libapr-1.la
endif
if SYSTEM_APRUTIL
CORE_LIBS += $(AM_LIBAPU_LINKLIBTOOL)
else
CORE_LIBS += libs/apr-util/libaprutil-1.la
endif
if SYSTEM_APR
CORE_LIBS += $(AM_LIBAPR_LINKLIBTOOL)
else
CORE_LIBS += libs/apr/libapr-1.la
endif
if ENABLE_SRTP
CORE_CFLAGS += -DENABLE_SRTP
@ -540,7 +540,7 @@ install-exec-local:
install-data-local:
@echo Installing $(NAME)
@for x in $(modulesdir) $(runtimedir) $(dbdir) $(logfiledir) $(logfiledir)/xml_cdr $(bindir) $(scriptdir) $(recordingsdir) $(grammardir); do \
@for x in $(modulesdir) $(runtimedir) $(dbdir) $(logfiledir) $(logfiledir)/xml_cdr $(bindir) $(scriptdir) $(recordingsdir) $(grammardir) $(certsdir) $(cachedir) $(soundsdir) $(storagedir); do \
$(mkinstalldirs) $(DESTDIR)$$x ; \
done
test -d $(DESTDIR)$(sysconfdir) || $(MAKE) samples-conf
@ -551,7 +551,7 @@ is-scm:
echo ; echo ; \
echo "*****************************************************************************************************" ; \
echo "You cannot update a release tarball without a git tree. Please clone FreeSWITCH as so: " ; \
echo " git clone https://stash.freeswitch.org/scm/fs/freeswitch.git " ; \
echo " git clone https://freeswitch.org/stash/scm/fs/freeswitch.git " ; \
echo "*****************************************************************************************************" ; \
echo ; echo ; \
exit 1; \

View File

@ -59,8 +59,8 @@ install:
@echo " + Additional resources: +"
@echo " + ---------------------------------- +"
@echo " + https://www.freeswitch.org +"
@echo " + https://confluence.freeswitch.org +"
@echo " + https://jira.freeswitch.org +"
@echo " + https://freeswitch.org/confluence +"
@echo " + https://freeswitch.org/jira +"
@echo " + http://lists.freeswitch.org +"
@echo " + +"
@echo " + irc.freenode.net / #freeswitch +"

View File

@ -7,6 +7,7 @@ modulesdir=@modulesdir@
runtimedir=@runtimedir@
logfiledir=@logfiledir@
sysconfdir=@sysconfdir@
confdir=@confdir@
dbdir=@dbdir@
htdocsdir=@htdocsdir@
localstatedir=@localstatedir@

View File

@ -1 +1 @@
1.5.16
1.4.26

View File

@ -8,6 +8,11 @@
<param name="mixer-conf-profile" value="sla"/>
<!-- if true, to attribute in offer uses URI instead of name/number -->
<param name="offer-uri" value="true"/>
<!-- how offers are distributed to clients (all, first, random). -->
<param name="offer-algorithm" value="all"/>
<!-- If offer is not answered after timeout, next client is offered (based on algorithm picked).
If no other clients are available, the call is rejected. Set to 0 to disable -->
<param name="offer-timeout-ms" value="5000"/>
<!-- if true, channel variables are added to rayo client offer -->
<param name="add-variables-to-offer" value="false"/>
<!-- if true, channel variables are added to offer, ringing, answered, and end events sent to rayo clients -->
@ -63,7 +68,7 @@
<start application="spandsp_start_tone_detect" data="1"/>
<stop application="spandsp_stop_tone_detect" data=""/>
<!-- map tone events to Rayo CPA signal type -->
<event class="CUSTOM" subclass="DETECTED_TONE" type-header="Detected-Tone">
<event class="DETECTED_TONE" type-header="Detected-Tone">
<signal-type header-value="SIT" value="sit"/>
<signal-type header-value="BUSY_TONE" value="busy"/>
<signal-type header-value="REORDER_TONE" value="congestion"/>

View File

@ -84,7 +84,7 @@
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>

View File

@ -44,6 +44,8 @@
<!-- <load module="mod_skinny"/> -->
<!-- <load module="mod_khomp"/> -->
<!-- <load module="mod_rtmp"/> -->
<load module="mod_rtc"/>
<load module="mod_verto"/>
<!-- Applications -->
<load module="mod_commands"/>

View File

@ -17,6 +17,7 @@
<param name="mcast-port" value="1337"/>
<param name="rtp-ip" value="$${local_ip_v4}"/>
<!-- <param name="ext-rtp-ip" value=""/> -->
<param name="force-register-domain" value="$${domain}"/>
<param name="local-network" value="localnet.auto"/>
<param name="outbound-codec-string" value="opus,vp8"/>
<param name="inbound-codec-string" value="opus,vp8"/>

View File

@ -63,8 +63,9 @@
-->
<param name="rtp-ip" value="$${local_ip_v6}"/>
<param name="sip-ip" value="$${local_ip_v6}"/>
<param name="ext-rtp-ip" value="auto-nat"/>
<param name="ext-sip-ip" value="auto-nat"/>
<!-- Shouldn't set these on IPv6 -->
<!--<param name="ext-rtp-ip" value="auto-nat"/>-->
<!--<param name="ext-sip-ip" value="auto-nat"/>-->
<param name="rtp-timeout-sec" value="300"/>
<param name="rtp-hold-timeout-sec" value="1800"/>
<!--<param name="enable-3pcc" value="true"/>-->
@ -84,7 +85,7 @@
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>

View File

@ -84,7 +84,7 @@
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>

View File

@ -96,6 +96,7 @@
<param name="auth-calls" value="$${internal_auth_calls}"/>
<!-- on authed calls, authenticate *all* the packets not just invite -->
<param name="auth-all-packets" value="false"/>
<!-- Shouldn't set these on IPv6 -->
<!-- <param name="ext-rtp-ip" value="$${external_rtp_ip}"/> -->
<!-- <param name="ext-sip-ip" value="$${external_sip_ip}"/> -->
<!-- rtp inactivity timeout -->

View File

@ -204,7 +204,7 @@
<!-- Verify the date on TLS certificates -->
<param name="tls-verify-date" value="true"/>
<!-- TLS verify policy, when registering/inviting gateways with other servers (outbound) or handling inbound registration/invite requests how should we verify their certificate -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'in_subjects', 'out_subjects' and 'all_subjects' for subject validation. Multiple policies can be split with a '|' pipe -->
<!-- set to 'in' to only verify incoming connections, 'out' to only verify outgoing connections, 'all' to verify all connections, also 'subjects_in', 'subjects_out' and 'subjects_all' for subject validation. Multiple policies can be split with a '|' pipe -->
<param name="tls-verify-policy" value="none"/>
<!-- Certificate max verify depth to use for validating peer TLS certificates when the verify policy is not none -->
<param name="tls-verify-depth" value="2"/>

View File

@ -413,8 +413,6 @@
openssl ciphers -v 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH'
Will show you what is available in your verion of openssl.
Freeswitch does not support non-Elliptic Curve Diffie Hellman key
exchange.
-->
<X-PRE-PROCESS cmd="set" data="sip_tls_ciphers=ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"/>

View File

@ -3,10 +3,10 @@
# Must change all of the below together
# For a release, set revision for that tagged release as well and uncomment
AC_INIT([freeswitch], [1.5.15b], bugs@freeswitch.org)
AC_INIT([freeswitch], [1.4.26], bugs@freeswitch.org)
AC_SUBST(SWITCH_VERSION_MAJOR, [1])
AC_SUBST(SWITCH_VERSION_MINOR, [5])
AC_SUBST(SWITCH_VERSION_MICRO, [15b])
AC_SUBST(SWITCH_VERSION_MINOR, [4])
AC_SUBST(SWITCH_VERSION_MICRO, [26])
AC_SUBST(SWITCH_VERSION_REVISION, [])
AC_SUBST(SWITCH_VERSION_REVISION_HUMAN, [])
@ -327,7 +327,7 @@ if test -z "$LIBTOOL_MAJOR_VERSION" ; then
LIBTOOL_MAJOR_VERSION="`sed -n -e '/^VERSION/{s/^.*=\"\{0,1\}\([[0-9]]\{1,\}\)\..*/\1/;p;}' ${switch_srcdir}/build/config/ltmain.sh`"
fi
if test -z "$LIBTOOL_MAJOR_VERSION" ; then
AC_MSG_ERROR([Failed to detect your libtool version, please open a bug report on http://jira.freeswitch.org/])
AC_MSG_ERROR([Failed to detect your libtool version, please open a bug report on https://freeswitch.org/jira])
fi
AC_MSG_RESULT([${LIBTOOL_MAJOR_VERSION}])

2
debian/AUTHORS vendored
View File

@ -6,7 +6,7 @@ For copyright claims over this packaging and other software, see
debian/copyright.
Current maintainer: Travis Cross <tc@traviscross.com>
Bug reports: http://jira.freeswitch.org/ (assign to maintainer)
Bug reports: https://freeswitch.org/jira (assign to maintainer)
Security related bug reports: [email to maintainer]
# Acknowledgments

View File

@ -18,7 +18,7 @@ of a FreeSWITCH git repository. You can achieve this with:
aptitude update && aptitude install -y git
mkdir -p /usr/src/freeswitch
git clone https://stash.freeswitch.org/scm/fs/freeswitch.git /usr/src/freeswitch/src
git clone https://freeswitch.org/stash/scm/fs/freeswitch.git /usr/src/freeswitch/src
cd /usr/src/freeswitch/src
Ensuring you have a clean build directory

7
debian/bootstrap.sh vendored
View File

@ -30,7 +30,6 @@ avoid_mods=(
endpoints/mod_opal
endpoints/mod_reference
endpoints/mod_unicall
event_handlers/mod_amqp
languages/mod_managed
sdk/autotools
xml_int/mod_xml_ldap
@ -323,9 +322,9 @@ Build-Depends:
# module build-depends
$(debian_wrap "${mod_build_depends}")
Standards-Version: 3.9.3
Homepage: http://freeswitch.org/
Vcs-Git: https://stash.freeswitch.org/scm/fs/freeswitch.git
Vcs-Browser: https://stash.freeswitch.org/projects/FS/repos/freeswitch/browse
Homepage: https://freeswitch.org/
Vcs-Git: https://freeswitch.org/stash/scm/fs/freeswitch.git
Vcs-Browser: https://freeswitch.org/stash/projects/FS/repos/freeswitch/browse
EOF
}

2
debian/copyright vendored
View File

@ -1,6 +1,6 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: freeswitch
Source: http://freeswitch.org/
Source: https://freeswitch.org/
Files: *
Copyright: 2005-2014 Anthony Minessale II <anthm@freeswitch.org>

View File

@ -9,13 +9,12 @@ After=syslog.target network.target local-fs.target
Type=forking
PIDFile=/run/freeswitch/freeswitch.pid
PermissionsStartOnly=true
ExecStartPre=/bin/mkdir -p /run/freeswitch
ExecStartPre=/bin/chown freeswitch:freeswitch /run/freeswitch
ExecStart=/usr/bin/freeswitch -ncwait -nonat
TimeoutSec=45s
Restart=always
; exec
WorkingDirectory=/run/freeswitch
RuntimeDirectory=freeswitch
RuntimeDirectoryMode=0755
User=freeswitch
Group=freeswitch
LimitCORE=infinity

View File

@ -616,7 +616,7 @@ freeswitch (1.0.7)
mod_blacklist: Resource leak fixes, config checks and add help output for api interface (r:41abb3e6)
mod_blacklist: add ability to dump a list back to it's text file (r:1d5f5ec7)
mod_blacklist: fix broken dump/save (r:abc5d7cd/FS-3617)
mod_callcenter: Initial commit of the mod_callcenter application. This module is in it early state of developpement. You can see documentation on the wiki at : <a href="http://wiki.freeswitch.org/wiki/Mod_callcenter">http://wiki.freeswitch.org/wiki/Mod_callcenter</a> For support/comments, please use <a href="http://jira.freeswitch.org/">http://jira.freeswitch.org/</a> and select the MOD CALLCENTER module. (r:ba09b96d)
mod_callcenter: Initial commit of the mod_callcenter application. This module is in it early state of developpement. You can see documentation on the wiki at : <a href="http://wiki.freeswitch.org/wiki/Mod_callcenter">http://wiki.freeswitch.org/wiki/Mod_callcenter</a> For support/comments, please use <a href="https://freeswitch.org/jira">https://freeswitch.org/jira</a> and select the MOD CALLCENTER module. (r:ba09b96d)
mod_callcenter: Add ability to unload/reload/load a queue setting (You still need to reloadxml before). Note that joining a queue will check for it in the config and load it on the fly... I've used the same system as in mod_voicemail. Not sure if we should allow this, but just comment it out of the config before unload and it wont be available anymore (r:3eafca60)
mod_callcenter: Try to fix the ring-all, also add cli auto complete done in previous commit (r:1666783c)
mod_callcenter: Add missing odbc db support (Not tested, please someone test this) (r:42436e27)

View File

@ -50,7 +50,7 @@ Create a Pull Request
chromium https://freeswitch.org/confluence/display/FREESWITCH/Pull+Requests
# add your repository as a remote (change to your username)
git remote add stash ssh://git@stash.freeswitch.org:7999/~johndoe/freeswitch.git
git remote add stash ssh://git@freeswitch.org:7999/~johndoe/freeswitch.git
# push your changes to a branch
git push stash +HEAD:myfeature

View File

@ -11,7 +11,7 @@ updated for the respective phrase_xx.xml file.
How can you contribute?
You can contribute via patches posted to the mailing list or at
http://jira.freeswitch.org, if possible please record the sound files
https://freeswitch.org/jira, if possible please record the sound files
for testing. We also need voicemail_xx.xml macros updated for each language.
Thanks,

View File

@ -45,7 +45,7 @@
%{?with_timerfd:%define build_timerfd 1 }
%{?with_mod_esl:%define build_mod_esl 1 }
%define version 1.5.16
%define version 1.4.19
%define release 1
######################################################################################################################
@ -1451,7 +1451,7 @@ ENDPOINTS_MODULES="endpoints/mod_dingaling ../../libs/freetdm/mod_freetdm \
# Event Handlers
#
######################################################################################################################
EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv event_handlers/mod_cdr_sqlite \
EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_sqlite \
event_handlers/mod_cdr_mongodb event_handlers/mod_erlang_event event_handlers/mod_event_multicast \
event_handlers/mod_event_socket event_handlers/mod_json_cdr \
event_handlers/mod_snmp"
@ -1459,7 +1459,7 @@ EVENT_HANDLERS_MODULES="event_handlers/mod_cdr_csv event_handlers/mod_cdr_pg_csv
EVENT_HANDLERS_MODULES+=" event_handlers/mod_rayo"
%endif
#### BUILD ISSUES NET RESOLVED FOR RELEASE event_handlers/mod_event_zmq
#### BUILD ISSUES NET RESOLVED FOR RELEASE event_handlers/mod_event_zmq event_handlers/mod_cdr_pg_csv
######################################################################################################################
#
# File and Audio Format Handlers
@ -2191,8 +2191,8 @@ fi
%files event-cdr-mongodb
%{MODINSTDIR}/mod_cdr_mongodb.so*
%files event-cdr-pg-csv
%{MODINSTDIR}/mod_cdr_pg_csv.so*
#%files event-cdr-pg-csv
#%{MODINSTDIR}/mod_cdr_pg_csv.so*
%files event-cdr-sqlite
%{MODINSTDIR}/mod_cdr_sqlite.so*
@ -2412,6 +2412,8 @@ fi
- add mod_graylog2 and mod_mongo
* Thu Sep 11 2014 - krice@freeswitch.org
- add and fix mod_verto and mod_rtc
* Fri Jul 20 2014 - krice@freeswitch.org
- remove mod_cdr_pg_csv as its broken on centos
* Mon Jun 02 2014 - krice@freeswitch.org
- remove mod_spidermoney as its been deprecated
* Fri Feb 21 2014 - crienzo@grasshopper.com

View File

@ -106,7 +106,7 @@ $.ajax({url:self.jsonrpcclient.options.ajaxUrl,data:$.toJSON(batch_request),data
if(typeof all_done_cb==='function')all_done_cb(result);};})(jQuery);(function($){var sources=[];var generateGUID=(typeof(window.crypto)!=='undefined'&&typeof(window.crypto.getRandomValues)!=='undefined')?function(){var buf=new Uint16Array(8);window.crypto.getRandomValues(buf);var S4=function(num){var ret=num.toString(16);while(ret.length<4){ret="0"+ret;}
return ret;};return(S4(buf[0])+S4(buf[1])+"-"+S4(buf[2])+"-"+S4(buf[3])+"-"+S4(buf[4])+"-"+S4(buf[5])+S4(buf[6])+S4(buf[7]));}:function(){return'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,function(c){var r=Math.random()*16|0,v=c=='x'?r:(r&0x3|0x8);return v.toString(16);});};$.verto=function(options,callbacks){var verto=this;$.verto.saved.push(verto);verto.options=$.extend({login:null,passwd:null,socketUrl:null,tag:null,localTag:null,videoParams:{},audioParams:{},loginParams:{},iceServers:false,ringSleep:6000},options);verto.sessid=$.cookie('verto_session_uuid')||generateGUID();$.cookie('verto_session_uuid',verto.sessid,{expires:1});verto.dialogs={};verto.callbacks=callbacks||{};verto.eventSUBS={};verto.rpcClient=new $.JsonRpcClient({login:verto.options.login,passwd:verto.options.passwd,socketUrl:verto.options.socketUrl,loginParams:verto.options.loginParams,sessid:verto.sessid,onmessage:function(e){return verto.handleMessage(e.eventData);},onWSConnect:function(o){o.call('login',{});},onWSLogin:function(success){if(verto.callbacks.onWSLogin){verto.callbacks.onWSLogin(verto,success);}},onWSClose:function(success){if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,success);}
verto.purge();}});if(verto.options.ringFile&&verto.options.tag){verto.ringer=$("#"+verto.options.tag);}
verto.rpcClient.call('login',{});};$.verto.prototype.videoParams=function(on){var verto=this;verto.options.videoParams=on;};$.verto.prototype.iceServers=function(on){var verto=this;verto.options.iceServers=on;};$.verto.prototype.loginData=function(params){verto.options.login=params.login;verto.options.passwd=params.passwd;verto.rpcClient.loginData(params);};$.verto.prototype.logout=function(msg){var verto=this;verto.rpcClient.closeSocket();if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,false);}
verto.rpcClient.call('login',{});};$.verto.prototype.videoParams=function(on){var verto=this;verto.options.videoParams=on;};$.verto.prototype.iceServers=function(on){var verto=this;verto.options.iceServers=on;};$.verto.prototype.loginData=function(params){var verto=this;verto.options.login=params.login;verto.options.passwd=params.passwd;verto.rpcClient.loginData(params);};$.verto.prototype.logout=function(msg){var verto=this;verto.rpcClient.closeSocket();if(verto.callbacks.onWSClose){verto.callbacks.onWSClose(verto,false);}
verto.purge();};$.verto.prototype.login=function(msg){var verto=this;verto.logout();verto.rpcClient.call('login',{});};$.verto.prototype.message=function(msg){var verto=this;var err=0;if(!msg.to){console.error("Missing To");err++;}
if(!msg.body){console.error("Missing Body");err++;}
if(err){return false;}

View File

@ -133,6 +133,7 @@
};
$.verto.prototype.loginData = function(params) {
var verto = this;
verto.options.login = params.login;
verto.options.passwd = params.passwd;
verto.rpcClient.loginData(params);

View File

@ -1 +1 @@
Tue Aug 27 13:58:18 EDT 2013
Wed Aug 19 11:38:49 CDT 2015

View File

@ -55,6 +55,7 @@ struct apr_thread_t {
void *data;
apr_thread_start_t func;
apr_status_t exitval;
int priority;
};
struct apr_threadattr_t {

View File

@ -135,6 +135,19 @@ APR_DECLARE(apr_status_t) apr_threadattr_guardsize_set(apr_threadattr_t *attr,
static void *dummy_worker(void *opaque)
{
apr_thread_t *thread = (apr_thread_t*)opaque;
#ifdef HAVE_PTHREAD_SETSCHEDPARAM
if (thread->priority) {
int policy;
struct sched_param param = { 0 };
pthread_t tt = pthread_self();
pthread_getschedparam(tt, &policy, &param);
param.sched_priority = thread->priority;
pthread_setschedparam(tt, policy, &param);
}
#endif
return thread->func(thread, thread->data);
}
@ -174,19 +187,11 @@ APR_DECLARE(apr_status_t) apr_thread_create(apr_thread_t **new,
return stat;
}
if (attr && attr->priority) {
(*new)->priority = attr->priority;
}
if ((stat = pthread_create(&tt, temp, dummy_worker, (*new))) == 0) {
#ifdef HAVE_PTHREAD_SETSCHEDPARAM
if (attr && attr->priority) {
int policy;
struct sched_param param = { 0 };
pthread_getschedparam(tt, &policy, &param);
param.sched_priority = attr->priority;
pthread_setschedparam(tt, policy, &param);
}
#endif
*(*new)->td = tt;
return APR_SUCCESS;

View File

@ -99,6 +99,9 @@ static History *myhistory;
static HistEvent ev;
#endif
static esl_mutex_t *MUTEX = NULL;
static void _sleep_ns(int secs, long nsecs) {
#ifndef WIN32
if (nsecs > 999999999) {
@ -720,8 +723,15 @@ static void *msg_thread_run(esl_thread_t *me, void *obj)
thread_running = 1;
while(thread_running && handle->connected) {
int aok = 1;
esl_status_t status = esl_recv_event_timed(handle, 10, 1, NULL);
if (status == ESL_FAIL) {
esl_status_t status;
esl_mutex_lock(MUTEX);
status = esl_recv_event_timed(handle, 10, 1, NULL);
esl_mutex_unlock(MUTEX);
if (status == ESL_BREAK) {
sleep_ms(1);
} else if (status == ESL_FAIL) {
esl_log(ESL_LOG_WARNING, "Disconnected.\n");
running = -1; thread_running = 0;
} else if (status == ESL_SUCCESS) {
@ -851,8 +861,11 @@ static const char *cli_usage =
static int process_command(esl_handle_t *handle, const char *cmd)
{
int r = 0;
while (*cmd == ' ') cmd++;
esl_mutex_lock(MUTEX);
if ((*cmd == '/' && cmd++) || !strncasecmp(cmd, "...", 3)) {
if (!strcasecmp(cmd, "help")) {
@ -865,7 +878,7 @@ static int process_command(esl_handle_t *handle, const char *cmd)
!strcasecmp(cmd, "bye")
) {
esl_log(ESL_LOG_INFO, "Goodbye!\nSee you at ClueCon http://www.cluecon.com/\n");
return -1;
r = -1; goto end;
} else if (!strncasecmp(cmd, "logfilter", 9)) {
cmd += 9;
while (*cmd && *cmd == ' ') {
@ -922,7 +935,7 @@ static int process_command(esl_handle_t *handle, const char *cmd)
snprintf(cmd_str, sizeof(cmd_str), "api %s\nconsole_execute: true\n\n", cmd);
if (esl_send_recv(handle, cmd_str)) {
output_printf("Socket interrupted, bye!\n");
return -1;
r = -1; goto end;
}
if (handle->last_sr_event) {
if (handle->last_sr_event->body) {
@ -932,8 +945,12 @@ static int process_command(esl_handle_t *handle, const char *cmd)
}
}
}
end:
return 0;
esl_mutex_unlock(MUTEX);
return r;
}
static int get_profile(const char *name, cli_profile_t **profile)
@ -1142,7 +1159,9 @@ static unsigned char esl_console_complete(const char *buffer, const char *cursor
} else {
snprintf(cmd_str, sizeof(cmd_str), "api console_complete %s\n\n", buf);
}
esl_send_recv(global_handle, cmd_str);
if (global_handle->last_sr_event && global_handle->last_sr_event->body) {
char *r = global_handle->last_sr_event->body;
char *w, *p1;
@ -1183,7 +1202,13 @@ static unsigned char esl_console_complete(const char *buffer, const char *cursor
static unsigned char complete(EditLine *el, int ch)
{
const LineInfo *lf = el_line(el);
return esl_console_complete(lf->buffer, lf->cursor, lf->lastchar);
int r;
esl_mutex_lock(MUTEX);
r = esl_console_complete(lf->buffer, lf->cursor, lf->lastchar);
esl_mutex_unlock(MUTEX);
return r;
}
#endif
@ -1378,6 +1403,9 @@ int main(int argc, char *argv[])
int loops = 2, reconnect = 0;
char *ccheck;
esl_mutex_create(&MUTEX);
#if HAVE_DECL_EL_PROMPT_ESC
feature_level = 1;
#else
@ -1755,6 +1783,9 @@ int main(int argc, char *argv[])
esl_disconnect(&handle);
global_handle = NULL;
thread_running = 0;
esl_mutex_destroy(&MUTEX);
return 0;
}

View File

@ -933,9 +933,9 @@ ESL_DECLARE(int) esl_wait_sock(esl_socket_t sock, uint32_t ms, esl_poll_t flags)
if ((flags & ESL_POLL_ERROR)) {
pfds[0].events |= POLLERR;
}
s = poll(pfds, 1, ms);
s = poll(pfds, 1, ms);
if (s < 0) {
r = s;
} else if (s > 0) {

View File

@ -150,6 +150,13 @@ static char *print_number(cJSON *item)
return str;
}
#define is_hexdigit(c) ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
static int scan_unicode(const char *ptr, unsigned int *uc)
{
if (!is_hexdigit(*(ptr)) || !is_hexdigit(*(ptr+1)) || !is_hexdigit(*(ptr+2)) || !is_hexdigit(*(ptr+3))) return -1;
return sscanf(ptr, "%4x", uc);
}
/* Parse the input text into an unescaped cstring, and populate item. */
static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
static const char *parse_string(cJSON *item,const char *str)
@ -177,8 +184,7 @@ static const char *parse_string(cJSON *item,const char *str)
case 'r': *ptr2++='\r'; break;
case 't': *ptr2++='\t'; break;
case 'u': /* transcode utf16 to utf8. */
if (sscanf(ptr+1,"%4x",&uc) < 1) break;
if (scan_unicode(ptr+1, &uc) < 1) break;
ptr+=4; /* get the unicode char. */
if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0) break; // check for invalid.
@ -186,7 +192,7 @@ static const char *parse_string(cJSON *item,const char *str)
if (uc>=0xD800 && uc<=0xDBFF) // UTF16 surrogate pairs.
{
if (ptr[1]!='\\' || ptr[2]!='u') break; // missing second-half of surrogate.
if (sscanf(ptr+3,"%4x",&uc2) < 1) break;
if (scan_unicode(ptr+3,&uc2) < 1) break;
ptr+=6;
if (uc2<0xDC00 || uc2>0xDFFF) break; // invalid second-half of surrogate.
uc=0x10000 | ((uc&0x3FF)<<10) | (uc2&0x3FF);
@ -204,7 +210,7 @@ static const char *parse_string(cJSON *item,const char *str)
break;
default: *ptr2++=*ptr; break;
}
ptr++;
if (*ptr) ptr++;
}
}
*ptr2=0;

View File

@ -91,7 +91,7 @@ gnu)
COMP_VENDOR_CFLAGS="-ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -O0"
;;
sun)
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -D__FUNCTION__=__func__ -xvpara"
COMP_VENDOR_CFLAGS="-xc99=all -mt -xCC -xvpara"
if test "$enable_64" != "no" ; then
COMP_VENDOR_CFLAGS="-m64 $COMP_VENDOR_CFLAGS"
fi

View File

@ -35,11 +35,7 @@
#include <switch.h>
#include "freetdm.h"
//#define CUDATEL_DEBUG
#ifndef __FUNCTION__
#define __FUNCTION__ __SWITCH_FUNC__
#endif
//#define BACKTRACE_DEBUG
#define FREETDM_LIMIT_REALM "__freetdm"
#define FREETDM_VAR_PREFIX "freetdm_"
@ -498,16 +494,16 @@ static switch_status_t channel_on_destroy(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
#ifdef CUDATEL_DEBUG
struct cudatel_trace_priv {
#ifdef BACKTRACE_DEBUG
struct debug_trace_priv {
const char *name;
int span_id;
int chan_id;
};
static void cudatel_trace(const int tid, const void *addr, const char *symbol, void *priv)
static void debug_trace(const int tid, const void *addr, const char *symbol, void *priv)
{
struct cudatel_trace_priv *data = priv;
struct debug_trace_priv *data = priv;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "[%d:%d][tid:%d] %s -> %s\n",
data->span_id, data->chan_id, tid, data->name, symbol);
}
@ -570,13 +566,13 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
goto end;
}
#ifdef CUDATEL_DEBUG
#ifdef BACKTRACE_DEBUG
{
struct cudatel_trace_priv trace_data;
struct debug_trace_priv trace_data;
trace_data.name = name;
trace_data.span_id = span_id;
trace_data.chan_id = chan_id;
ftdm_backtrace_walk(&cudatel_trace, &trace_data);
ftdm_backtrace_walk(&debug_trace, &trace_data);
}
#endif

View File

@ -3863,7 +3863,7 @@ skipdebug:
if (!strcmp(ftdmchan->dtmf_hangup_buf, ftdmchan->span->dtmf_hangup)) {
ftdm_log(FTDM_LOG_DEBUG, "DTMF hangup detected.\n");
ftdm_channel_set_state(__FILE__, __FUNCTION__, __LINE__, ftdmchan, FTDM_CHANNEL_STATE_HANGUP, 0, NULL);
ftdm_channel_set_state(__FILE__, __FTDM_FUNC__, __LINE__, ftdmchan, FTDM_CHANNEL_STATE_HANGUP, 0, NULL);
break;
}
}
@ -6122,7 +6122,7 @@ static void execute_safety_hangup(void *data)
fchan->hangup_timer = 0;
if (fchan->state == FTDM_CHANNEL_STATE_TERMINATING) {
ftdm_log_chan(fchan, FTDM_LOG_WARNING, "Forcing hangup since the user did not confirmed our hangup after %dms\n", FORCE_HANGUP_TIMER);
_ftdm_channel_call_hangup_nl(__FILE__, __FUNCTION__, __LINE__, fchan, NULL);
_ftdm_channel_call_hangup_nl(__FILE__, __FTDM_FUNC__, __LINE__, fchan, NULL);
} else {
ftdm_log_chan(fchan, FTDM_LOG_CRIT, "Not performing safety hangup, channel state is %s\n", ftdm_channel_state2str(fchan->state));
}

View File

@ -847,6 +847,9 @@ static void *ftdm_analog_channel_run(ftdm_thread_t *me, void *obj)
if (last_digit && (!collecting || ((elapsed - last_digit > analog_data->digit_timeout) || strlen(dtmf) >= analog_data->max_dialstr))) {
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Number obtained [%s]\n", dtmf);
if (ftdmchan->state == FTDM_CHANNEL_STATE_COLLECT && ftdmchan->state_status != FTDM_STATE_STATUS_COMPLETED) {
ftdm_channel_complete_state(ftdmchan);
}
ftdm_set_state_locked(ftdmchan, FTDM_CHANNEL_STATE_RING);
last_digit = 0;
collecting = 0;

View File

@ -104,6 +104,7 @@ typedef struct ftdm_gsm_span_data_s {
ftdm_channel_t *dchan;
ftdm_channel_t *bchan;
int32_t call_id;
uint32_t sms_id;
} ftdm_gsm_span_data_t;
// command handler function type.
@ -153,7 +154,9 @@ static void *ftdm_gsm_run(ftdm_thread_t *me, void *obj);
/* static & global data */
/* */
/********************************************************************************/
int g_outbound_call_id = 8;
/* At the moment we support only one concurrent call per span, so no need to have different ids */
#define GSM_OUTBOUND_CALL_ID 8
/* IO interface for the command API */
static ftdm_io_interface_t g_ftdm_gsm_interface;
@ -190,7 +193,8 @@ int on_wat_span_write(unsigned char span_id, void *buffer, unsigned len)
gsm_data = span->signal_data;
status = ftdm_channel_write(gsm_data->dchan, (void *)buffer, len, &outsize);
if (status != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "Failed to write %d bytes to d-channel in span %s\n", len, span->name);
char errbuf[255];
ftdm_log(FTDM_LOG_ERROR, "Failed to write %d bytes to d-channel in span %s: %s\n", len, span->name, strerror_r(errno, errbuf, sizeof(errbuf)));
return -1;
}
return len;
@ -342,13 +346,16 @@ void on_wat_rel_ind(unsigned char span_id, uint8_t call_id, wat_rel_event_t *rel
ftdm_log(FTDM_LOG_INFO, "s%d: Call hangup (id:%d) cause:%d\n", span_id, call_id, rel_event->cause);
if(!(span = GetSpanByID(span_id, &gsm_data))) {
if (!(span = GetSpanByID(span_id, &gsm_data))) {
return;
}
if (gsm_data->bchan->state == FTDM_CHANNEL_STATE_HANGUP ||
gsm_data->bchan->state == FTDM_CHANNEL_STATE_DOWN) {
return;
}
ftdm_set_state(gsm_data->bchan, FTDM_CHANNEL_STATE_HANGUP);
}
void on_wat_rel_cfm(unsigned char span_id, uint8_t call_id)
@ -500,7 +507,7 @@ void on_wat_log_span(uint8_t span_id, uint8_t level, char *fmt, ...)
vsprintf(buff, fmt, argptr);
ftdm_log_chan_ex(gsm_data->dchan, __FILE__, __FUNCTION__, __LINE__, ftdm_level, "%s", buff);
ftdm_log_chan_ex(gsm_data->dchan, __FILE__, __FTDM_FUNC__, __LINE__, ftdm_level, "%s", buff);
va_end(argptr);
}
@ -705,7 +712,7 @@ static ftdm_status_t ftdm_gsm_state_advance(ftdm_channel_t *ftdmchan)
ftdm_gsm_span_data_t *gsm_data;
wat_con_event_t con_event;
gsm_data = ftdmchan->span->signal_data;
gsm_data->call_id = g_outbound_call_id++;
gsm_data->call_id = GSM_OUTBOUND_CALL_ID;
memset(&con_event, 0, sizeof(con_event));
ftdm_set_string(con_event.called_num.digits, ftdmchan->caller_data.dnis.digits);
ftdm_log(FTDM_LOG_DEBUG, "Dialing number %s\n", con_event.called_num.digits);
@ -1046,6 +1053,9 @@ static void *ftdm_gsm_run(ftdm_thread_t *me, void *obj)
ftdm_span_t *span = (ftdm_span_t *) obj;
ftdm_gsm_span_data_t *gsm_data = NULL;
ftdm_interrupt_t *data_sources[2] = {NULL, NULL};
ftdm_wait_flag_t flags = FTDM_READ | FTDM_EVENTS;
ftdm_status_t status = FTDM_SUCCESS;
char buffer[1025] = { 0 };
int waitms = 0;
ftdm_log(FTDM_LOG_INFO,"ftdm_gsm_run\r\n");
@ -1061,11 +1071,7 @@ static void *ftdm_gsm_run(ftdm_thread_t *me, void *obj)
goto done;
}
while (ftdm_running()) {
wat_span_run(span->span_id);
waitms = wat_span_schedule_next(span->span_id);
@ -1073,48 +1079,25 @@ static void *ftdm_gsm_run(ftdm_thread_t *me, void *obj)
waitms = GSM_POLL_INTERVAL_MS;
}
/////////////////////
flags = FTDM_READ | FTDM_EVENTS;
status = ftdm_channel_wait(gsm_data->dchan, &flags, waitms);
/* check if this channel has a state change pending and process it if needed */
ftdm_channel_lock(gsm_data->bchan);
ftdm_channel_advance_states(gsm_data->bchan);
if (FTDM_SUCCESS == status && (flags & FTDM_READ)) {
int n = 0, m = 0;
{
ftdm_wait_flag_t flags = FTDM_READ | FTDM_EVENTS;
ftdm_status_t status = ftdm_channel_wait(gsm_data->dchan, &flags, waitms);
/* double check that this channel has a state change pending */
ftdm_channel_lock(gsm_data->bchan);
ftdm_channel_advance_states(gsm_data->bchan);
if(FTDM_SUCCESS == status ) {
if(flags &FTDM_READ ) {
char buffer[1025];
int n = 0, m = 0;
memset(buffer, 0, sizeof(buffer));
n = read_channel(gsm_data->dchan, buffer, sizeof(buffer)-1);
m = strlen(buffer);
wat_span_process_read(span->span_id, buffer, m);
#if LOG_SIG_DATA
printf("<<======================= incomming data len = %d, %s\r\n", n, buffer);
#endif
}
n = read_channel(gsm_data->dchan, buffer, sizeof(buffer) - 1);
if (n > 0) {
m = strlen(buffer); /* TODO: Hum? is this needed? why not using the return val from read_channel? */
wat_span_process_read(span->span_id, buffer, m);
}
ftdm_channel_advance_states(gsm_data->bchan);
ftdm_channel_unlock(gsm_data->bchan);
}
ftdm_channel_advance_states(gsm_data->bchan);
ftdm_channel_unlock(gsm_data->bchan);
ftdm_span_trigger_signals(span);
}
done:
@ -1203,9 +1186,8 @@ COMMAND_HANDLER(status)
const wat_sim_info_t *sim_info = NULL;
const wat_net_info_t *net_info = NULL;
const wat_sig_info_t *sig_info = NULL;
const wat_pin_stat_t *pin_stat = NULL;
wat_pin_stat_t pin_stat = 0;
span_id = atoi(argv[0]);
if (ftdm_span_find_by_name(argv[0], &span) != FTDM_SUCCESS && ftdm_span_find(span_id, &span) != FTDM_SUCCESS) {
stream->write_function(stream, "-ERR Failed to find GSM span '%s'\n", argv[1]);
@ -1221,7 +1203,12 @@ COMMAND_HANDLER(status)
sim_info = wat_span_get_sim_info(span->span_id);
net_info = wat_span_get_net_info(span->span_id);
sig_info = wat_span_get_sig_info(span->span_id);
pin_stat = wat_span_get_pin_info(span->span_id);
/* This is absolutely retarded and should be fixed in libwat
* why the hell would you return a pointer to an internal state enum instead of a copy?
* probably the same applies to the rest of the info (sim_info, chip_info, net_info, etc),
* but at least there you could have the lame excuse that you don't need to copy the whole struct */
pin_stat = *wat_span_get_pin_info(span->span_id);
stream->write_function(stream, "Span %d (%s):\n", span->span_id, span->name);
@ -1243,6 +1230,10 @@ COMMAND_HANDLER(status)
wat_net_stat2str(net_info->stat), net_info->lac, net_info->ci, net_info->operator_name);
stream->write_function(stream, "Sig Info: rssi(%d) ber(%d)\n", sig_info->rssi, sig_info->ber);
stream->write_function(stream, "PIN Status: %s\n", wat_pin_stat2str(pin_stat));
stream->write_function(stream, "\n");
stream->write_function(stream, "+OK.\n");
@ -1254,9 +1245,10 @@ COMMAND_HANDLER(status)
COMMAND_HANDLER(sms)
{
int span_id = 0, i;
uint32_t sms_id = 0;
ftdm_span_t *span = NULL;
wat_sms_event_t sms;
ftdm_gsm_span_data_t *gsm_data = NULL;
span_id = atoi(argv[0]);
if (ftdm_span_find_by_name(argv[0], &span) != FTDM_SUCCESS && ftdm_span_find(span_id, &span) != FTDM_SUCCESS) {
@ -1268,9 +1260,9 @@ COMMAND_HANDLER(sms)
stream->write_function(stream, "-ERR '%s' is not a valid GSM span\n", argv[1]);
return FTDM_FAIL;
}
gsm_data = span->signal_data;
memset(&sms, 0, sizeof(sms));
strcpy(sms.to.digits, argv[1]);
sms.type = WAT_SMS_TXT;
sms.content.data[0] = '\0';
@ -1280,11 +1272,16 @@ COMMAND_HANDLER(sms)
}
sms.content.len = strlen(sms.content.data);
if(WAT_SUCCESS != wat_sms_req(span->span_id, g_outbound_call_id++ , &sms)) {
ftdm_channel_lock(gsm_data->bchan);
sms_id = gsm_data->sms_id >= WAT_MAX_SMSS_PER_SPAN ? 0 : gsm_data->sms_id;
gsm_data->sms_id++;
ftdm_channel_unlock(gsm_data->bchan);
if (WAT_SUCCESS != wat_sms_req(span->span_id, sms_id, &sms)) {
stream->write_function(stream, "Failed to Send SMS \n");
}
else {
} else {
stream->write_function(stream, "SMS Sent.\n");
}
return FTDM_SUCCESS;

View File

@ -50,7 +50,7 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) ftdmchan->span->signal_data;
ConEvnt *conEvnt = &sngisdn_event->event.conEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n");
@ -274,7 +274,7 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
ftdm_log_chan(ftdmchan, FTDM_LOG_CRIT, "Processing SETUP in an invalid state (%s)\n", ftdm_channel_state2str(ftdmchan->state));
break;
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -289,7 +289,7 @@ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event)
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
CnStEvnt *cnStEvnt = &sngisdn_event->event.cnStEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n");
@ -304,7 +304,7 @@ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event)
} else {
/* We already assigned this call, do nothing */
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_DEBUG, "Call already assigned, ignoring connect\n");
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
}
@ -359,7 +359,7 @@ void sngisdn_process_con_cfm (sngisdn_event_data_t *sngisdn_event)
}
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -377,7 +377,7 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)
CnStEvnt *cnStEvnt = &sngisdn_event->event.cnStEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_STATE_CHANGE), "State change flag pending\n");
@ -535,7 +535,7 @@ void sngisdn_process_cnst_ind (sngisdn_event_data_t *sngisdn_event)
}
sngisdn_process_cnst_ind_end:
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -549,7 +549,7 @@ void sngisdn_process_disc_ind (sngisdn_event_data_t *sngisdn_event)
DiscEvnt *discEvnt = &sngisdn_event->event.discEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing DISCONNECT (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
@ -599,7 +599,7 @@ void sngisdn_process_disc_ind (sngisdn_event_data_t *sngisdn_event)
break;
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -613,7 +613,7 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
RelEvnt *relEvnt = &sngisdn_event->event.relEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing RELEASE/RELEASE COMPLETE (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
@ -626,7 +626,7 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
ftdm_clear_flag(sngisdn_info, FLAG_DELAYED_REL);
clear_call_glare_data(sngisdn_info);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -702,7 +702,7 @@ void sngisdn_process_rel_ind (sngisdn_event_data_t *sngisdn_event)
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -715,13 +715,13 @@ void sngisdn_process_dat_ind (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from infoEvnt struct for now */
/* InfoEvnt *infoEvnt = &sngisdn_event->event.infoEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing DATA IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -734,13 +734,13 @@ void sngisdn_process_sshl_ind (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/* SsHlEvnt *ssHlEvnt = &sngisdn_event->event.ssHlEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing SSHL IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -753,13 +753,13 @@ void sngisdn_process_sshl_cfm (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/* SsHlEvnt *ssHlEvnt = &sngisdn_event->event.ssHlEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing SSHL CFM (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -772,13 +772,13 @@ void sngisdn_process_rmrt_ind (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/* RmRtEvnt *rmRtEvnt = &sngisdn_event->event.rmRtEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing RESUME/RETRIEVE IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -791,13 +791,13 @@ void sngisdn_process_rmrt_cfm (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/* RmRtEvnt *rmRtEvnt = &sngisdn_event->event.rmRtEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing RESUME/RETRIEVE CFM (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -810,13 +810,13 @@ void sngisdn_process_flc_ind (sngisdn_event_data_t *sngisdn_event)
sngisdn_chan_data_t *sngisdn_info = sngisdn_event->sngisdn_info;
ftdm_channel_t *ftdmchan = sngisdn_info->ftdmchan;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/* StaEvnt *staEvnt = &sngisdn_event->event.staEvnt; */
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing FLOW CONTROL IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -832,7 +832,7 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
FacEvnt *facEvnt = &sngisdn_event->event.facEvnt;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Processing FACILITY IND (suId:%u suInstId:%u spInstId:%u)\n", suId, suInstId, spInstId);
@ -842,7 +842,7 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
get_facility_ie_str(ftdmchan, &facEvnt->facElmt.facStr.val[2], facEvnt->facElmt.facStr.len-2);
sngisdn_send_signal(sngisdn_info, FTDM_SIGEVENT_FACILITY);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -895,7 +895,7 @@ void sngisdn_process_fac_ind (sngisdn_event_data_t *sngisdn_event)
/* We do not support other FACILITY types for now, so do nothing */
break;
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -911,7 +911,7 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
uint8_t call_state = 0;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!suInstId && !spInstId) {
/* We already cleared this call */
@ -932,13 +932,13 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
call_state = staEvnt->callSte.callGlblSte.val;
} else {
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_WARNING, "Received STATUS without call state\n");
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
switch (staEvnt->causeDgn[0].causeVal.val) {
case FTDM_CAUSE_RESPONSE_TO_STATUS_ENQUIRY:
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Status Check OK:%d", call_state);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
case FTDM_CAUSE_WRONG_CALL_STATE:
ftdm_log_chan(ftdmchan, FTDM_LOG_WARNING, "Message incompatible with call state (call_state:%d channel-state:%s cause:%d) (suId:%u suInstId:%u spInstId:%u)\n", call_state, ftdm_channel_state2str(ftdmchan->state), staEvnt->causeDgn[0].causeVal.val, suId, suInstId, spInstId);
@ -1117,7 +1117,7 @@ void sngisdn_process_sta_cfm (sngisdn_event_data_t *sngisdn_event)
}
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -1128,13 +1128,13 @@ void sngisdn_process_srv_ind (sngisdn_event_data_t *sngisdn_event)
int16_t dChan = sngisdn_event->dChan;
uint8_t ces = sngisdn_event->ces;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/*Srv *srvEvnt = &sngisdn_event->event.srvEvnt;*/
ftdm_log(FTDM_LOG_DEBUG, "Processing SERVICE IND (suId:%u dChan:%d ces:%d)\n", suId, dChan, ces);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -1144,13 +1144,13 @@ void sngisdn_process_srv_cfm (sngisdn_event_data_t *sngisdn_event)
int16_t dChan = sngisdn_event->dChan;
uint8_t ces = sngisdn_event->ces;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
/* Function does not require any info from ssHlEvnt struct for now */
/*Srv *srvEvnt = &sngisdn_event->event.srvEvnt;*/
ftdm_log(FTDM_LOG_DEBUG, "Processing SERVICE CFM (suId:%u dChan:%d ces:%d)\n", suId, dChan, ces);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -1286,7 +1286,7 @@ void sngisdn_process_rst_cfm (sngisdn_event_data_t *sngisdn_event)
}
ftdm_log(FTDM_LOG_DEBUG, "Processing RESTART CFM (suId:%u dChan:%d ces:%d type:%d)\n", suId, dChan, ces, evntType);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -1303,7 +1303,7 @@ void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
Rst *rstEvnt = NULL;
sngisdn_span_data_t *signal_data = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
rstEvnt = &sngisdn_event->event.rstEvnt;
@ -1396,7 +1396,7 @@ void sngisdn_process_rst_ind (sngisdn_event_data_t *sngisdn_event)
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}

View File

@ -42,7 +42,7 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co
sngisdn_chan_data_t *sngisdn_info = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Con Ind on unconfigured cc\n");
ftdm_assert(g_sngisdn_data.spans[dChan], "Con Ind on unconfigured dchan\n");
@ -50,7 +50,7 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co
if (conEvnt->chanId.eh.pres != PRSNT_NODEF) {
/* TODO: Implement me */
ftdm_log(FTDM_LOG_ERROR, "Incoming call without Channel Id not supported yet\n");
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -66,18 +66,18 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co
if (!bchan_no) {
ftdm_log(FTDM_LOG_ERROR, "Failed to obtain b-channel number from SETUP message\n");
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
if (g_sngisdn_data.spans[dChan]->nfas.trunk) {
if (interface_id < 0) {
ftdm_log(FTDM_LOG_ERROR, "Interface ID not present on NFAS interface\n");
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
} else if (!g_sngisdn_data.spans[dChan]->nfas.trunk->spans[interface_id]) {
ftdm_log(FTDM_LOG_ERROR, "NFAS group:%s does not have logical interface %d\n", g_sngisdn_data.spans[dChan]->nfas.trunk->name, interface_id);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
} else {
sngisdn_info = g_sngisdn_data.spans[dChan]->nfas.trunk->spans[interface_id]->channels[bchan_no];
@ -85,7 +85,7 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co
} else {
if (g_sngisdn_data.spans[dChan]->channels[bchan_no] == NULL) {
ftdm_log(FTDM_LOG_ERROR, "Incoming call on unconfigured b-channel:%d\n", bchan_no);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -113,7 +113,7 @@ void sngisdn_rcv_con_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Co
memcpy(&sngisdn_event->event.conEvnt, conEvnt, sizeof(*conEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_con_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, CnStEvnt *cnStEvnt, int16_t dChan, uint8_t ces)
@ -121,14 +121,14 @@ void sngisdn_rcv_con_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, Cn
sngisdn_chan_data_t *sngisdn_info = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Con Cfm on unconfigured cc\n");
ftdm_assert(g_sngisdn_data.spans[dChan] != 0, "Con Cfm on unconfigured dchan\n");
if (get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -157,7 +157,7 @@ void sngisdn_rcv_con_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, Cn
memcpy(&sngisdn_event->event.cnStEvnt, cnStEvnt, sizeof(*cnStEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_cnst_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, CnStEvnt *cnStEvnt, uint8_t evntType, int16_t dChan, uint8_t ces)
@ -165,14 +165,14 @@ void sngisdn_rcv_cnst_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, C
sngisdn_chan_data_t *sngisdn_info = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(g_sngisdn_data.ccs[suId].activation_done != 0, "Cnst Ind on unconfigured cc\n");
ftdm_assert(g_sngisdn_data.spans[dChan] != 0, "Cnst Ind on unconfigured dchan\n");
if (get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "Could not find matching call suId:%u suInstId:%u spInstId:%u\n", suId, suInstId, spInstId);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -209,7 +209,7 @@ void sngisdn_rcv_cnst_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, C
memcpy(&sngisdn_event->event.cnStEvnt, cnStEvnt, sizeof(*cnStEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_disc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, DiscEvnt *discEvnt)
@ -217,7 +217,7 @@ void sngisdn_rcv_disc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, D
sngisdn_chan_data_t *sngisdn_info = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_assert(spInstId != 0, "Received DISCONNECT with invalid id");
@ -245,7 +245,7 @@ void sngisdn_rcv_disc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, D
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_rel_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, RelEvnt *relEvnt)
@ -253,7 +253,7 @@ void sngisdn_rcv_rel_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Re
sngisdn_chan_data_t *sngisdn_info = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -279,7 +279,7 @@ void sngisdn_rcv_rel_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Re
memcpy(&sngisdn_event->event.relEvnt, relEvnt, sizeof(*relEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_dat_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, InfoEvnt *infoEvnt)
@ -287,7 +287,7 @@ void sngisdn_rcv_dat_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, In
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -312,7 +312,7 @@ void sngisdn_rcv_dat_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, In
memcpy(&sngisdn_event->event.infoEvnt, infoEvnt, sizeof(*infoEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_sshl_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, SsHlEvnt *ssHlEvnt, uint8_t action)
@ -320,7 +320,7 @@ void sngisdn_rcv_sshl_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, S
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -346,7 +346,7 @@ void sngisdn_rcv_sshl_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, S
memcpy(&sngisdn_event->event.ssHlEvnt, ssHlEvnt, sizeof(*ssHlEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_sshl_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, SsHlEvnt *ssHlEvnt, uint8_t action)
@ -354,7 +354,7 @@ void sngisdn_rcv_sshl_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, S
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -380,14 +380,14 @@ void sngisdn_rcv_sshl_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, S
memcpy(&sngisdn_event->event.ssHlEvnt, ssHlEvnt, sizeof(*ssHlEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_rmrt_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, RmRtEvnt *rmRtEvnt, uint8_t action)
{
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -413,7 +413,7 @@ void sngisdn_rcv_rmrt_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, R
memcpy(&sngisdn_event->event.rmRtEvnt, rmRtEvnt, sizeof(*rmRtEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_rmrt_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, RmRtEvnt *rmRtEvnt, uint8_t action)
@ -421,7 +421,7 @@ void sngisdn_rcv_rmrt_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, R
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -447,7 +447,7 @@ void sngisdn_rcv_rmrt_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, R
memcpy(&sngisdn_event->event.rmRtEvnt, rmRtEvnt, sizeof(*rmRtEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_flc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, StaEvnt *staEvnt)
@ -455,7 +455,7 @@ void sngisdn_rcv_flc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -480,7 +480,7 @@ void sngisdn_rcv_flc_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
memcpy(&sngisdn_event->event.staEvnt, staEvnt, sizeof(*staEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
@ -489,7 +489,7 @@ void sngisdn_rcv_fac_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Fa
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!(spInstId && get_ftdmchan_by_spInstId(suId, spInstId, &sngisdn_info) == FTDM_SUCCESS) &&
!(suInstId && get_ftdmchan_by_suInstId(suId, suInstId, &sngisdn_info) == FTDM_SUCCESS)) {
@ -514,7 +514,7 @@ void sngisdn_rcv_fac_ind (int16_t suId, uint32_t suInstId, uint32_t spInstId, Fa
memcpy(&sngisdn_event->event.facEvnt, facEvnt, sizeof(*facEvnt));
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
@ -523,12 +523,12 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
sngisdn_chan_data_t *sngisdn_info;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
if (!suInstId && !spInstId) {
/* This is a response to a sngisdn_snd_info_req
* that was sent to attempt to re-establish DL link */
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -560,7 +560,7 @@ void sngisdn_rcv_sta_cfm (int16_t suId, uint32_t suInstId, uint32_t spInstId, St
ftdm_queue_enqueue(((sngisdn_span_data_t*)sngisdn_info->ftdmchan->span->signal_data)->event_queue, sngisdn_event);
ftdm_mutex_unlock(g_sngisdn_data.ccs[suId].mutex);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_srv_ind (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces)
@ -569,7 +569,7 @@ void sngisdn_rcv_srv_ind (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces
sngisdn_span_data_t *signal_data;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log(FTDM_LOG_INFO, "Received SERVICE IND (dChan:%d ces:%u)\n", dChan, ces);
@ -594,7 +594,7 @@ void sngisdn_rcv_srv_ind (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces
} else {
ftdm_queue_enqueue(signal_data->event_queue, sngisdn_event);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
@ -603,7 +603,7 @@ void sngisdn_rcv_srv_cfm (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces
sngisdn_span_data_t *signal_data = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log(FTDM_LOG_INFO, "Received SERVICE CFM (dChan:%d ces:%u)\n", dChan, ces);
@ -628,7 +628,7 @@ void sngisdn_rcv_srv_cfm (int16_t suId, Srv *srvEvnt, int16_t dChan, uint8_t ces
} else {
ftdm_queue_enqueue(signal_data->event_queue, sngisdn_event);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_rst_ind (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces, uint8_t evntType)
@ -636,7 +636,7 @@ void sngisdn_rcv_rst_ind (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces
sngisdn_span_data_t *signal_data = NULL;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log(FTDM_LOG_INFO, "Received RESTART IND (dChan:%d ces:%u type:%u)\n", dChan, ces, evntType);
@ -661,7 +661,7 @@ void sngisdn_rcv_rst_ind (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces
} else {
ftdm_queue_enqueue(signal_data->event_queue, sngisdn_event);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void sngisdn_rcv_rst_cfm (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces, uint8_t evntType)
@ -669,7 +669,7 @@ void sngisdn_rcv_rst_cfm (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces
sngisdn_span_data_t *signal_data;
sngisdn_event_data_t *sngisdn_event = NULL;
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log(FTDM_LOG_INFO, "Received RESTART CFM (dChan:%d ces:%u type:%u)\n", dChan, ces, evntType);
@ -695,7 +695,7 @@ void sngisdn_rcv_rst_cfm (int16_t suId, Rst *rstEvnt, int16_t dChan, uint8_t ces
} else {
ftdm_queue_enqueue(signal_data->event_queue, sngisdn_event);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
@ -866,15 +866,15 @@ void sngisdn_rcv_q931_ind(InMngmt *status)
DECODE_LCM_CAUSE(status->t.usta.alarm.cause), status->t.usta.alarm.cause);
}
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
void sngisdn_rcv_cc_ind(CcMngmt *status)
{
ISDN_FUNC_TRACE_ENTER(__FUNCTION__);
ftdm_log(FTDM_LOG_INFO, "RECEIVED %s\n", __FUNCTION__);
ISDN_FUNC_TRACE_EXIT(__FUNCTION__);
ISDN_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_log(FTDM_LOG_INFO, "RECEIVED %s\n", __FTDM_FUNC__);
ISDN_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}

View File

@ -92,7 +92,7 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -105,7 +105,7 @@ ftdm_status_t handle_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -366,14 +366,14 @@ handle_glare:
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCnStEvnt *siCnStEvnt, uint8_t evntType)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -383,7 +383,7 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -642,14 +642,14 @@ ftdm_status_t handle_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -659,7 +659,7 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -722,14 +722,14 @@ ftdm_status_t handle_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRelEvnt *siRelEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -739,7 +739,7 @@ ftdm_status_t handle_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -854,14 +854,14 @@ rel_ind_reset:
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRelEvnt *siRelEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -871,7 +871,7 @@ ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -907,14 +907,14 @@ ftdm_status_t handle_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiInfoEvnt *siInfoEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -924,7 +924,7 @@ ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -936,14 +936,14 @@ ftdm_status_t handle_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t evntType, SiFacEvnt *siFacEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -953,7 +953,7 @@ ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -965,14 +965,14 @@ ftdm_status_t handle_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t evntType, SiFacEvnt *siFacEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -982,7 +982,7 @@ ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -994,14 +994,14 @@ ftdm_status_t handle_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -1011,7 +1011,7 @@ ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1023,14 +1023,14 @@ ftdm_status_t handle_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiSuspEvnt *siSuspEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -1040,7 +1040,7 @@ ftdm_status_t handle_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1052,14 +1052,14 @@ ftdm_status_t handle_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiResmEvnt *siResmEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info ;
ftdm_channel_t *ftdmchan;
@ -1069,7 +1069,7 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1081,14 +1081,14 @@ ftdm_status_t handle_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* unlock the channel */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_running_return(FTDM_FAIL);
@ -1280,7 +1280,7 @@ ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
break;
} /* switch (evntType) */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
@ -1288,7 +1288,7 @@ ftdm_status_t handle_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/******************************************************************************/
ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1301,13 +1301,13 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1375,14 +1375,14 @@ ftdm_status_t handle_reattempt(uint32_t suInstId, uint32_t spInstId, uint32_t ci
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1442,14 +1442,14 @@ ftdm_status_t handle_pause(uint32_t suInstId, uint32_t spInstId, uint32_t circui
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[i].id != 0) */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1510,14 +1510,14 @@ ftdm_status_t handle_resume(uint32_t suInstId, uint32_t spInstId, uint32_t circu
} /* while (g_ftdm_sngss7_data.cfg.isupCkt[i].id != 0) */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1530,13 +1530,13 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1553,7 +1553,7 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
if (ftdm_channel_open_chan(ftdmchan) != FTDM_SUCCESS) {
SS7_ERROR("Failed to open CIC %d for CCR test!\n", sngss7_info->circuit->cic);
/* KONRAD FIX ME */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
}
@ -1567,14 +1567,14 @@ ftdm_status_t handle_cot_start(uint32_t suInstId, uint32_t spInstId, uint32_t ci
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1587,13 +1587,13 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1614,14 +1614,14 @@ ftdm_status_t handle_cot_stop(uint32_t suInstId, uint32_t spInstId, uint32_t cir
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1634,13 +1634,13 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1684,14 +1684,14 @@ ftdm_status_t handle_cot(uint32_t suInstId, uint32_t spInstId, uint32_t circuit,
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1704,13 +1704,13 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1737,14 +1737,14 @@ ftdm_status_t handle_blo_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1757,13 +1757,13 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1780,14 +1780,14 @@ ftdm_status_t handle_blo_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1800,13 +1800,13 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1837,14 +1837,14 @@ ftdm_status_t handle_ubl_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1855,13 +1855,13 @@ ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1870,14 +1870,14 @@ ftdm_status_t handle_ubl_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
DECODE_LCC_EVENT(evntType));
}
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1890,13 +1890,13 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1932,14 +1932,14 @@ ftdm_status_t handle_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -1952,13 +1952,13 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -1992,14 +1992,14 @@ ftdm_status_t handle_local_rsc_req(uint32_t suInstId, uint32_t spInstId, uint32_
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2012,13 +2012,13 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2083,13 +2083,13 @@ ftdm_status_t handle_rsc_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2104,13 +2104,13 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2124,7 +2124,7 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
range = siStaEvnt->rangStat.range.val;
} else {
SS7_ERROR("Received GRS with no range value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2132,7 +2132,7 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_span = ftdmchan->span->signal_data;
if (sngss7_info->rx_grs.range) {
SS7_CRITICAL("Cannot handle another GRS on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
sngss7_info->rx_grs.circuit = circuit;
@ -2141,14 +2141,14 @@ ftdm_status_t handle_grs_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
ftdm_set_flag(sngss7_span, SNGSS7_RX_GRS_PENDING);
/* the reset will be started in the main thread by "check_if_rx_grs_started" */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2163,13 +2163,13 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2183,7 +2183,7 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
range = siStaEvnt->rangStat.range.val;
} else {
SS7_ERROR("Received GRA with no range value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2191,7 +2191,7 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sngss7_span = ftdmchan->span->signal_data;
if (sngss7_info->rx_gra.range) {
SS7_ERROR("Cannot handle another GRA on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
sngss7_info->rx_gra.circuit = circuit;
@ -2209,14 +2209,14 @@ ftdm_status_t handle_grs_rsp(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* the reset will be started in the main thread by "check_if_rx_gra_started" */
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2229,13 +2229,13 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2261,14 +2261,14 @@ ftdm_status_t handle_local_blk(uint32_t suInstId, uint32_t spInstId, uint32_t ci
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2281,13 +2281,13 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2313,14 +2313,14 @@ ftdm_status_t handle_local_ubl(uint32_t suInstId, uint32_t spInstId, uint32_t ci
/* unlock the channel again before we exit */
ftdm_mutex_unlock(ftdmchan->mutex);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
ftdm_iterator_t *iter = NULL;
ftdm_iterator_t *curr = NULL;
@ -2337,13 +2337,13 @@ ftdm_status_t handle_ucic(uint32_t suInstId, uint32_t spInstId, uint32_t circuit
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2395,14 +2395,14 @@ done:
ftdm_iterator_free(iter);
}
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}
/******************************************************************************/
ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
sngss7_span_data_t *sngss7_span = NULL;
@ -2425,13 +2425,13 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2447,7 +2447,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
blockType = siStaEvnt->cgsmti.typeInd.val;
} else {
SS7_ERROR("Received CGB with no circuit group supervision value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2456,7 +2456,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
range = siStaEvnt->rangStat.range.val;
} else {
SS7_ERROR("Received CGB with no range value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2467,7 +2467,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
}
} else {
SS7_ERROR("Received CGB with no status value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2534,7 +2534,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2546,7 +2546,7 @@ ftdm_status_t handle_cgb_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/******************************************************************************/
ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
sngss7_span_data_t *sngss7_span = NULL;
@ -2571,13 +2571,13 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2594,7 +2594,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
blockType = siStaEvnt->cgsmti.typeInd.val;
} else {
SS7_ERROR("Received CGU with no circuit group supervision value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2603,7 +2603,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
range = siStaEvnt->rangStat.range.val;
} else {
SS7_ERROR("Received CGU with no range value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2614,7 +2614,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
}
} else {
SS7_ERROR("Received CGU with no status value on CIC = %d\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2687,7 +2687,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2699,7 +2699,7 @@ ftdm_status_t handle_cgu_req(uint32_t suInstId, uint32_t spInstId, uint32_t circ
/******************************************************************************/
ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -2712,13 +2712,13 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic,
DECODE_LCC_EVENT(evntType));
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
} else {
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for ISUP circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_FAIL;
}
@ -2732,7 +2732,7 @@ ftdm_status_t handle_olm_msg(uint32_t suInstId, uint32_t spInstId, uint32_t circ
sng_isup_reg_info_show();
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return FTDM_SUCCESS;
}

View File

@ -60,7 +60,7 @@ void sngss7_ssp_sta_cfm(uint32_t infId);
/* FUNCTIONS ******************************************************************/
void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -68,14 +68,14 @@ void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -84,7 +84,7 @@ void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -99,13 +99,13 @@ void sngss7_con_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiConEvnt *siConEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -113,14 +113,14 @@ void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -128,7 +128,7 @@ void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -143,13 +143,13 @@ void sngss7_con_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCo
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCnStEvnt *siCnStEvnt, uint8_t evntType)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -157,14 +157,14 @@ void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCn
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -172,7 +172,7 @@ void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCn
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -188,13 +188,13 @@ void sngss7_con_sta(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiCn
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRelEvnt *siRelEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -202,14 +202,14 @@ void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -217,7 +217,7 @@ void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -232,13 +232,13 @@ void sngss7_rel_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRelEvnt *siRelEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -246,14 +246,14 @@ void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -261,7 +261,7 @@ void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -276,13 +276,13 @@ void sngss7_rel_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiRe
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiInfoEvnt *siInfoEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -290,14 +290,14 @@ void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiIn
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -305,7 +305,7 @@ void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiIn
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -320,13 +320,13 @@ void sngss7_dat_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiIn
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t evntType, SiFacEvnt *siFacEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -334,14 +334,14 @@ void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -349,7 +349,7 @@ void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -365,13 +365,13 @@ void sngss7_fac_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t evntType, SiFacEvnt *siFacEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -379,14 +379,14 @@ void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -394,7 +394,7 @@ void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -410,13 +410,13 @@ void sngss7_fac_cfm(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -424,14 +424,14 @@ void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -439,7 +439,7 @@ void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -453,13 +453,13 @@ void sngss7_umsg_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit)
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/* GENERAL STATUS *************************************************************/
void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint8_t globalFlg, uint8_t evntType, SiStaEvnt *siStaEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -509,7 +509,7 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -525,7 +525,7 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
/* check if we found any circuits that are on the intfId, drop the message
* if none are found */
if (!ftdmchan) {
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -535,14 +535,14 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
ftdm_log(FTDM_LOG_DEBUG, "Rx %s on circuit that is not a voice CIC (%d) (circuit:%d)\n",
DECODE_LCC_EVENT(evntType), g_ftdm_sngss7_data.cfg.isupCkt[circuit].cic, circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
break;
@ -553,7 +553,7 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -576,7 +576,7 @@ void sngss7_sta_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, uint
/******************************************************************************/
void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiSuspEvnt *siSuspEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -584,14 +584,14 @@ void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiS
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -599,7 +599,7 @@ void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiS
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -616,14 +616,14 @@ void sngss7_susp_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiS
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiResmEvnt *siResmEvnt)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -631,14 +631,14 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
if (g_ftdm_sngss7_data.cfg.isupCkt[circuit].type != SNG_CKT_VOICE) {
SS7_ERROR("Rx sig event on circuit that is not a voice CIC (%d)\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -646,7 +646,7 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -663,14 +663,14 @@ void sngss7_resm_ind(uint32_t suInstId, uint32_t spInstId, uint32_t circuit, SiR
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
void sngss7_ssp_sta_cfm(uint32_t infId)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
#if 0
sngss7_chan_data_t *sngss7_info = NULL;
ftdm_channel_t *ftdmchan = NULL;
@ -679,7 +679,7 @@ void sngss7_ssp_sta_cfm(uint32_t infId)
/* get the ftdmchan and ss7_chan_data from the circuit */
if (extract_chan_data(circuit, &sngss7_info, &ftdmchan)) {
SS7_ERROR("Failed to extract channel data for circuit = %d!\n", circuit);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
@ -687,7 +687,7 @@ void sngss7_ssp_sta_cfm(uint32_t infId)
sngss7_event = ftdm_malloc(sizeof(*sngss7_event));
if (sngss7_event == NULL) {
SS7_ERROR("Failed to allocate memory for sngss7_event!\n");
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
memset(sngss7_event, 0x0, sizeof(*sngss7_event));
@ -704,7 +704,7 @@ void sngss7_ssp_sta_cfm(uint32_t infId)
/* enqueue this event */
ftdm_queue_enqueue(((sngss7_span_data_t*)sngss7_info->ftdmchan->span->signal_data)->event_queue, sngss7_event);
#endif
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/

View File

@ -2340,7 +2340,7 @@ outgoing_successful:
#if 0
static FIO_CHANNEL_REQUEST_FUNCTION (ftdm_sangoma_ss7_request_chan)
{
SS7_INFO ("KONRAD-> I got called %s\n", __FUNCTION__);
SS7_INFO ("KONRAD-> I got called %s\n", __FTDM_FUNC__);
return FTDM_SUCCESS;
}

View File

@ -50,7 +50,7 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;;
sngss7_event_data_t *event_clone = NULL;
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_info->suInstId = get_unique_id ();
sngss7_info->spInstId = 0;
@ -245,7 +245,7 @@ void ft_to_sngss7_iam (ftdm_channel_t * ftdmchan)
ftdm_safe_free(event_clone);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
@ -344,7 +344,7 @@ void ft_to_sngss7_inr(ftdm_channel_t *ftdmchan)
void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiCnStEvnt acm;
@ -427,14 +427,14 @@ void ft_to_sngss7_acm (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx ACM\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
void ft_to_sngss7_cpg (ftdm_channel_t *ftdmchan)
{
SiCnStEvnt cpg;
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -453,12 +453,12 @@ void ft_to_sngss7_cpg (ftdm_channel_t *ftdmchan)
sng_cc_con_status (1, sngss7_info->suInstId, sngss7_info->spInstId, sngss7_info->circuit->id, &cpg, PROGRESS);
ftdm_log_chan(ftdmchan, FTDM_LOG_INFO, "[CIC:%d]Tx CPG\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
void ft_to_sngss7_anm (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiConEvnt anm;
@ -475,7 +475,7 @@ void ft_to_sngss7_anm (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx ANM\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
@ -483,7 +483,7 @@ void ft_to_sngss7_anm (ftdm_channel_t * ftdmchan)
void ft_to_sngss7_rel (ftdm_channel_t * ftdmchan)
{
const char *loc_ind = NULL;
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiRelEvnt rel;
@ -519,14 +519,14 @@ void ft_to_sngss7_rel (ftdm_channel_t * ftdmchan)
sngss7_info->circuit->cic,
ftdmchan->caller_data.hangup_cause );
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_rlc (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiRelEvnt rlc;
@ -542,14 +542,14 @@ void ft_to_sngss7_rlc (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx RLC\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_rsc (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -563,14 +563,14 @@ void ft_to_sngss7_rsc (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx RSC\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_rsca (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -584,14 +584,14 @@ void ft_to_sngss7_rsca (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx RSC-RLC\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_blo (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -605,14 +605,14 @@ void ft_to_sngss7_blo (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx BLO\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_bla (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -626,7 +626,7 @@ void ft_to_sngss7_bla (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx BLA\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
@ -634,7 +634,7 @@ void ft_to_sngss7_bla (ftdm_channel_t * ftdmchan)
void
ft_to_sngss7_ubl (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -648,14 +648,14 @@ ft_to_sngss7_ubl (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx UBL\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_uba (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -669,14 +669,14 @@ void ft_to_sngss7_uba (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx UBA\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_lpa (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -690,14 +690,14 @@ void ft_to_sngss7_lpa (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx LPA\n", sngss7_info->circuit->cic);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_gra (ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiStaEvnt gra;
@ -734,14 +734,14 @@ void ft_to_sngss7_gra (ftdm_channel_t * ftdmchan)
(sngss7_info->circuit->cic + sngss7_info->rx_grs.range));
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_grs (ftdm_channel_t *fchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_chan_data_t *cinfo = fchan->call_data;
@ -770,13 +770,13 @@ void ft_to_sngss7_grs (ftdm_channel_t *fchan)
sngss7_set_ckt_flag(cinfo, FLAG_GRP_RESET_SENT);
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
}
/******************************************************************************/
void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -818,14 +818,14 @@ void ft_to_sngss7_cgba(ftdm_channel_t * ftdmchan)
/* clean out the saved data */
memset(&sngss7_span->rx_cgb, 0x0, sizeof(sngss7_group_data_t));
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -868,14 +868,14 @@ void ft_to_sngss7_cgua(ftdm_channel_t * ftdmchan)
memset(&sngss7_span->rx_cgu, 0x0, sizeof(sngss7_group_data_t));
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_cgb(ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -919,14 +919,14 @@ void ft_to_sngss7_cgb(ftdm_channel_t * ftdmchan)
memset(&sngss7_span->tx_cgb, 0x0, sizeof(sngss7_group_data_t));
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
/******************************************************************************/
void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
{
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
sngss7_span_data_t *sngss7_span = ftdmchan->span->signal_data;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
@ -970,7 +970,7 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
memset(&sngss7_span->tx_cgu, 0x0, sizeof(sngss7_group_data_t));
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
@ -979,14 +979,14 @@ void ft_to_sngss7_cgu(ftdm_channel_t * ftdmchan)
void ft_to_sngss7_itx (ftdm_channel_t * ftdmchan)
{
#ifndef SANGOMA_SPIROU
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "ITX message not supported!, please update your libsng_ss7\n");
#else
const char* var = NULL;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SiCnStEvnt itx;
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
memset (&itx, 0x0, sizeof (itx));
@ -1013,7 +1013,7 @@ void ft_to_sngss7_itx (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx ITX\n", sngss7_info->circuit->cic);
#endif
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}
@ -1021,12 +1021,12 @@ void ft_to_sngss7_itx (ftdm_channel_t * ftdmchan)
void ft_to_sngss7_txa (ftdm_channel_t * ftdmchan)
{
#ifndef SANGOMA_SPIROU
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
ftdm_log_chan_msg(ftdmchan, FTDM_LOG_CRIT, "TXA message not supported!, please update your libsng_ss7\n");
#else
SiCnStEvnt txa;
sngss7_chan_data_t *sngss7_info = ftdmchan->call_data;
SS7_FUNC_TRACE_ENTER (__FUNCTION__);
SS7_FUNC_TRACE_ENTER (__FTDM_FUNC__);
memset (&txa, 0x0, sizeof(txa));
@ -1034,7 +1034,7 @@ void ft_to_sngss7_txa (ftdm_channel_t * ftdmchan)
SS7_INFO_CHAN(ftdmchan,"[CIC:%d]Tx TXA\n", sngss7_info->circuit->cic);
#endif
SS7_FUNC_TRACE_EXIT (__FUNCTION__);
SS7_FUNC_TRACE_EXIT (__FTDM_FUNC__);
return;
}

View File

@ -55,7 +55,7 @@
/* FUNCTIONS ******************************************************************/
void handle_isup_t35(void *userdata)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_timer_data_t *timer = userdata;
sngss7_chan_data_t *sngss7_info = timer->sngss7_info;
@ -87,14 +87,14 @@ void handle_isup_t35(void *userdata)
/*unlock*/
ftdm_channel_unlock(ftdmchan);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
return;
}
void handle_isup_t10(void *userdata)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_timer_data_t *timer = userdata;
sngss7_chan_data_t *sngss7_info = timer->sngss7_info;
@ -109,12 +109,12 @@ void handle_isup_t10(void *userdata)
ftdm_channel_unlock(ftdmchan);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
void handle_isup_t39(void *userdata)
{
SS7_FUNC_TRACE_ENTER(__FUNCTION__);
SS7_FUNC_TRACE_ENTER(__FTDM_FUNC__);
sngss7_timer_data_t *timer = userdata;
sngss7_chan_data_t *sngss7_info = timer->sngss7_info;
@ -146,7 +146,7 @@ void handle_isup_t39(void *userdata)
/*unlock*/
ftdm_channel_unlock(ftdmchan);
SS7_FUNC_TRACE_EXIT(__FUNCTION__);
SS7_FUNC_TRACE_EXIT(__FTDM_FUNC__);
}
/******************************************************************************/
/* For Emacs:

View File

@ -1014,8 +1014,8 @@ FT_DECLARE(int) ftdm_channel_get_availability(ftdm_channel_t *ftdmchan);
* there is no guarantee of whether the event will arrive after or before your execution thread returns
* from ftdm_channel_call_answer
*/
#define ftdm_channel_call_answer(ftdmchan) _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_answer_ex(ftdmchan, usrmsg) _ftdm_channel_call_answer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg))
#define ftdm_channel_call_answer(ftdmchan) _ftdm_channel_call_answer(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_answer_ex(ftdmchan, usrmsg) _ftdm_channel_call_answer(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (usrmsg))
/*! \brief Answer call recording the source code point where the it was called (see ftdm_channel_call_answer for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
@ -1023,8 +1023,8 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
/*! \brief Place an outgoing call in the given channel
* \deprecated This macro is deprecated since leaves the door open to glare issues, use ftdm_call_place instead
*/
#define ftdm_channel_call_place(ftdmchan) _ftdm_channel_call_place(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_place_ex(ftdmchan, usrmsg) _ftdm_channel_call_place_ex(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg))
#define ftdm_channel_call_place(ftdmchan) _ftdm_channel_call_place(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_place_ex(ftdmchan, usrmsg) _ftdm_channel_call_place_ex(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (usrmsg))
/*! \brief Place an outgoing call recording the source code point where it was called (see ftdm_channel_call_place for an easy to use macro)
* \deprecated This function is deprecated since leaves the door open to glare issues, use ftdm_call_place instead
@ -1032,8 +1032,8 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_answer(const char *file, const char
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_place(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
/*! \brief Place an outgoing call with the given caller data in a channel according to the hunting scheme provided */
#define ftdm_call_place(callerdata, hunting) _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), NULL)
#define ftdm_call_place_ex(callerdata, hunting, usrmsg) _ftdm_call_place(__FILE__, __FUNCTION__, __LINE__, (callerdata), (hunting), (usrmsg))
#define ftdm_call_place(callerdata, hunting) _ftdm_call_place(__FILE__, __FTDM_FUNC__, __LINE__, (callerdata), (hunting), NULL)
#define ftdm_call_place_ex(callerdata, hunting, usrmsg) _ftdm_call_place(__FILE__, __FTDM_FUNC__, __LINE__, (callerdata), (hunting), (usrmsg))
/*! \brief Place an outgoing call with the given caller data in a channel according to the hunting scheme provided and records
* the place where it was called. See ftdm_call_place for an easy to use macro
@ -1065,22 +1065,22 @@ FT_DECLARE(ftdm_status_t) _ftdm_call_place(const char *file, const char *func, i
* \note You cannot send more than one indication at the time. You must wait for the completed event before
* calling this function again (unless the return code was different than FTDM_SUCCESS)
*/
#define ftdm_channel_call_indicate(ftdmchan, indication) _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), NULL)
#define ftdm_channel_call_indicate_ex(ftdmchan, indication, usrmsg) _ftdm_channel_call_indicate(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (indication), (usrmsg))
#define ftdm_channel_call_indicate(ftdmchan, indication) _ftdm_channel_call_indicate(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (indication), NULL)
#define ftdm_channel_call_indicate_ex(ftdmchan, indication, usrmsg) _ftdm_channel_call_indicate(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (indication), (usrmsg))
/*! \brief Indicate a new condition in an incoming call recording the source code point where it was called (see ftdm_channel_call_indicate for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_indicate(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_channel_indication_t indication, ftdm_usrmsg_t *usrmsg);
/*! \brief Hangup the call without cause */
#define ftdm_channel_call_hangup(ftdmchan) _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_hangup_ex(ftdmchan, usrmsg) _ftdm_channel_call_hangup(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg))
#define ftdm_channel_call_hangup(ftdmchan) _ftdm_channel_call_hangup(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_hangup_ex(ftdmchan, usrmsg) _ftdm_channel_call_hangup(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (usrmsg))
/*! \brief Hangup the call without cause recording the source code point where it was called (see ftdm_channel_call_hangup for an easy to use macro)*/
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_hangup(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
/*! \brief Hangup the call with cause */
#define ftdm_channel_call_hangup_with_cause(ftdmchan, cause) _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), NULL)
#define ftdm_channel_call_hangup_with_cause_ex(ftdmchan, cause, usrmsg) _ftdm_channel_call_hangup_with_cause(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (cause), (usrmsg))
#define ftdm_channel_call_hangup_with_cause(ftdmchan, cause) _ftdm_channel_call_hangup_with_cause(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (cause), NULL)
#define ftdm_channel_call_hangup_with_cause_ex(ftdmchan, cause, usrmsg) _ftdm_channel_call_hangup_with_cause(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (cause), (usrmsg))
/*! \brief Hangup the call with cause recording the source code point where it was called (see ftdm_channel_call_hangup_with_cause for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_hangup_with_cause(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_call_cause_t, ftdm_usrmsg_t *usrmsg);
@ -1093,15 +1093,15 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_hangup_with_cause(const char *file,
* there is no guarantee of whether the event will arrive after or before your execution thread returns
* from ftdm_channel_call_transfer
*/
#define ftdm_channel_call_transfer(ftdmchan, arg) _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), NULL)
#define ftdm_channel_call_transfer_ex(ftdmchan, arg, usrmsg) _ftdm_channel_call_transfer(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (arg), (usrmsg))
#define ftdm_channel_call_transfer(ftdmchan, arg) _ftdm_channel_call_transfer(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (arg), NULL)
#define ftdm_channel_call_transfer_ex(ftdmchan, arg, usrmsg) _ftdm_channel_call_transfer(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (arg), (usrmsg))
/*! \brief Answer call recording the source code point where the it was called (see ftdm_channel_call_tranasfer for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_transfer(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, const char* arg, ftdm_usrmsg_t *usrmsg);
/*! \brief Reset the channel */
#define ftdm_channel_reset(ftdmchan) _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_reset_ex(ftdmchan, usrmsg) _ftdm_channel_reset(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), usrmsg)
#define ftdm_channel_reset(ftdmchan) _ftdm_channel_reset(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_reset_ex(ftdmchan, usrmsg) _ftdm_channel_reset(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), usrmsg)
/*! \brief Reset the channel (see _ftdm_channel_reset for an easy to use macro)
* \note if there was a call on this channel, call will be cleared without any notifications to the user
@ -1109,15 +1109,15 @@ FT_DECLARE(ftdm_status_t) _ftdm_channel_call_transfer(const char *file, const ch
FT_DECLARE(ftdm_status_t) _ftdm_channel_reset(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
/*! \brief Put a call on hold (if supported by the signaling stack) */
#define ftdm_channel_call_hold(ftdmchan) _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_hold_ex(ftdmchan, usrmsg) _ftdm_channel_call_hold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg))
#define ftdm_channel_call_hold(ftdmchan) _ftdm_channel_call_hold(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_hold_ex(ftdmchan, usrmsg) _ftdm_channel_call_hold(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (usrmsg))
/*! \brief Put a call on hold recording the source code point where it was called (see ftdm_channel_call_hold for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_hold(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
/*! \brief Unhold a call */
#define ftdm_channel_call_unhold(ftdmchan) _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_unhold_ex(ftdmchan, usrmsg) _ftdm_channel_call_unhold(__FILE__, __FUNCTION__, __LINE__, (ftdmchan), (usrmsg))
#define ftdm_channel_call_unhold(ftdmchan) _ftdm_channel_call_unhold(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), NULL)
#define ftdm_channel_call_unhold_ex(ftdmchan, usrmsg) _ftdm_channel_call_unhold(__FILE__, __FTDM_FUNC__, __LINE__, (ftdmchan), (usrmsg))
/*! \brief Unhold a call recording the source code point where it was called (see ftdm_channel_call_unhold for an easy to use macro) */
FT_DECLARE(ftdm_status_t) _ftdm_channel_call_unhold(const char *file, const char *func, int line, ftdm_channel_t *ftdmchan, ftdm_usrmsg_t *usrmsg);
@ -1985,7 +1985,7 @@ FIO_CODEC_FUNCTION(fio_alaw2slin);
FIO_CODEC_FUNCTION(fio_ulaw2alaw);
FIO_CODEC_FUNCTION(fio_alaw2ulaw);
#define FTDM_PRE __FILE__, __FUNCTION__, __LINE__
#define FTDM_PRE __FILE__, __func__, __LINE__
#define FTDM_LOG_LEVEL_DEBUG 7
#define FTDM_LOG_LEVEL_INFO 6
#define FTDM_LOG_LEVEL_NOTICE 5

View File

@ -57,6 +57,7 @@ extern "C" {
#endif
#ifdef _MSC_VER
#define __FTDM_FUNC__ __FUNCTION__
#if defined(FT_DECLARE_STATIC)
#define FT_DECLARE(type) type __stdcall
#define FT_DECLARE_NONSTD(type) type __cdecl
@ -73,6 +74,7 @@ extern "C" {
#define FT_DECLARE_INLINE(type) extern __inline__ type /* why extern? see http://support.microsoft.com/kb/123768 */
#define EX_DECLARE_DATA __declspec(dllexport)
#else
#define __FTDM_FUNC__ (const char *)__func__
#if (defined(__GNUC__) || defined(__SUNPRO_CC) || defined (__SUNPRO_C)) && defined(HAVE_VISIBILITY)
#define FT_DECLARE(type) __attribute__((visibility("default"))) type
#define FT_DECLARE_NONSTD(type) __attribute__((visibility("default"))) type

View File

@ -43,13 +43,13 @@ FT_DECLARE(void) ftdm_thread_override_default_stacksize(ftdm_size_t size);
FT_DECLARE(ftdm_status_t) ftdm_mutex_create(ftdm_mutex_t **mutex);
FT_DECLARE(ftdm_status_t) ftdm_mutex_destroy(ftdm_mutex_t **mutex);
#define ftdm_mutex_lock(_x) _ftdm_mutex_lock(__FILE__, __LINE__, __FUNCTION__, _x)
#define ftdm_mutex_lock(_x) _ftdm_mutex_lock(__FILE__, __LINE__, __FTDM_FUNC__, _x)
FT_DECLARE(ftdm_status_t) _ftdm_mutex_lock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
#define ftdm_mutex_trylock(_x) _ftdm_mutex_trylock(__FILE__, __LINE__, __FUNCTION__, _x)
#define ftdm_mutex_trylock(_x) _ftdm_mutex_trylock(__FILE__, __LINE__, __FTDM_FUNC__, _x)
FT_DECLARE(ftdm_status_t) _ftdm_mutex_trylock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
#define ftdm_mutex_unlock(_x) _ftdm_mutex_unlock(__FILE__, __LINE__, __FUNCTION__, _x)
#define ftdm_mutex_unlock(_x) _ftdm_mutex_unlock(__FILE__, __LINE__, __FTDM_FUNC__, _x)
FT_DECLARE(ftdm_status_t) _ftdm_mutex_unlock(const char *file, int line, const char *func, ftdm_mutex_t *mutex);
FT_DECLARE(ftdm_status_t) ftdm_interrupt_create(ftdm_interrupt_t **cond, ftdm_socket_t device, ftdm_wait_flag_t device_flags);

View File

@ -106,7 +106,7 @@ typedef ftdm_status_t (*ftdm_channel_state_processor_t)(ftdm_channel_t *fchan);
FT_DECLARE(ftdm_status_t) ftdm_channel_advance_states(ftdm_channel_t *fchan);
FT_DECLARE(ftdm_status_t) _ftdm_channel_complete_state(const char *file, const char *function, int line, ftdm_channel_t *fchan);
#define ftdm_channel_complete_state(obj) _ftdm_channel_complete_state(__FILE__, __FUNCTION__, __LINE__, obj)
#define ftdm_channel_complete_state(obj) _ftdm_channel_complete_state(__FILE__, __FTDM_FUNC__, __LINE__, obj)
FT_DECLARE(int) ftdm_check_state_all(ftdm_span_t *span, ftdm_channel_state_t state);
/*!
@ -201,7 +201,7 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_set_state(const char *file, const char *f
* */
FT_DECLARE(ftdm_status_t) _ftdm_set_state(const char *file, const char *func, int line,
ftdm_channel_t *fchan, ftdm_channel_state_t state);
#define ftdm_set_state(obj, s) _ftdm_set_state(__FILE__, __FUNCTION__, __LINE__, obj, s); \
#define ftdm_set_state(obj, s) _ftdm_set_state(__FILE__, __FTDM_FUNC__, __LINE__, obj, s); \
/*!\brief This macro is deprecated, signaling modules should always lock the channel themselves anyways since they must
* process first the user pending state changes then set a new state before releasing the lock
@ -211,11 +211,11 @@ FT_DECLARE(ftdm_status_t) _ftdm_set_state(const char *file, const char *func, in
#define ftdm_set_state_locked(obj, s) \
do { \
ftdm_channel_lock(obj); \
ftdm_channel_set_state(__FILE__, __FUNCTION__, __LINE__, obj, s, 0, NULL); \
ftdm_channel_set_state(__FILE__, __FTDM_FUNC__, __LINE__, obj, s, 0, NULL); \
ftdm_channel_unlock(obj); \
} while(0);
#define ftdm_set_state_r(obj, s, r) r = ftdm_channel_set_state(__FILE__, __FUNCTION__, __LINE__, obj, s, 0);
#define ftdm_set_state_r(obj, s, r) r = ftdm_channel_set_state(__FILE__, __FTDM_FUNC__, __LINE__, obj, s, 0);
#define ftdm_set_state_all(span, state) \
do { \

View File

@ -337,10 +337,6 @@ typedef struct ftdm_module {
char path[256];
} ftdm_module_t;
#ifndef __FUNCTION__
#define __FUNCTION__ (const char *)__func__
#endif
typedef struct ftdm_fsk_data_state ftdm_fsk_data_state_t;
typedef int (*ftdm_fsk_data_decoder_t)(ftdm_fsk_data_state_t *state);
typedef ftdm_status_t (*ftdm_fsk_write_sample_t)(int16_t *buf, ftdm_size_t buflen, void *user_data);

View File

@ -234,7 +234,7 @@ static int on_restart(struct sangoma_pri *spri, sangoma_pri_event_t event_type,
static int on_anything(struct sangoma_pri *spri, sangoma_pri_event_t event_type, pri_event *event)
{
printf("%s: Caught Event %d (%s)\n", __FUNCTION__, event_type, sangoma_pri_event_str(event_type));
printf("%s: Caught Event %d (%s)\n", __FTDM_FUNC__, event_type, sangoma_pri_event_str(event_type));
return 0;
}

View File

@ -150,6 +150,13 @@ static char *print_number(cJSON *item)
return str;
}
#define is_hexdigit(c) ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
static int scan_unicode(const char *ptr, unsigned int *uc)
{
if (!is_hexdigit(*(ptr)) || !is_hexdigit(*(ptr+1)) || !is_hexdigit(*(ptr+2)) || !is_hexdigit(*(ptr+3))) return -1;
return sscanf(ptr, "%4x", uc);
}
/* Parse the input text into an unescaped cstring, and populate item. */
static const unsigned char firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
static const char *parse_string(cJSON *item,const char *str)
@ -177,8 +184,7 @@ static const char *parse_string(cJSON *item,const char *str)
case 'r': *ptr2++='\r'; break;
case 't': *ptr2++='\t'; break;
case 'u': /* transcode utf16 to utf8. */
if (sscanf(ptr+1,"%4x",&uc) < 1) break;
if (scan_unicode(ptr+1, &uc) < 1) break;
ptr+=4; /* get the unicode char. */
if ((uc>=0xDC00 && uc<=0xDFFF) || uc==0) break; // check for invalid.
@ -186,7 +192,7 @@ static const char *parse_string(cJSON *item,const char *str)
if (uc>=0xD800 && uc<=0xDBFF) // UTF16 surrogate pairs.
{
if (ptr[1]!='\\' || ptr[2]!='u') break; // missing second-half of surrogate.
if (sscanf(ptr+3,"%4x",&uc2) < 1) break;
if (scan_unicode(ptr+3,&uc2) < 1) break;
ptr+=6;
if (uc2<0xDC00 || uc2>0xDFFF) break; // invalid second-half of surrogate.
uc=0x10000 | ((uc&0x3FF)<<10) | (uc2&0x3FF);
@ -204,7 +210,7 @@ static const char *parse_string(cJSON *item,const char *str)
break;
default: *ptr2++=*ptr; break;
}
ptr++;
if (*ptr) ptr++;
}
}
*ptr2=0;

View File

@ -800,6 +800,7 @@ void zrtp_profile_defaults(zrtp_profile_t* profile, zrtp_global_t* zrtp)
profile->cipher_types[0] = ZRTP_CIPHER_AES256;
profile->cipher_types[1] = ZRTP_CIPHER_AES128;
profile->auth_tag_lens[0] = ZRTP_ATL_HS32;
profile->auth_tag_lens[1] = ZRTP_ATL_HS80;
profile->hash_schemes[0] = ZRTP_HASH_SHA256;
if (zrtp && (ZRTP_LICENSE_MODE_PASSIVE == zrtp->lic_mode)) {
@ -855,7 +856,12 @@ zrtp_status_t zrtp_profile_check(const zrtp_profile_t* profile, zrtp_global_t* z
ZRTP_LOG(1, (_ZTU_,"WARNING! can't find '32 ' in profile.\n"));
return zrtp_status_fail;
}
if (0 > zrtp_profile_find(profile, ZRTP_CC_ATL, ZRTP_ATL_HS80)) {
ZRTP_LOG(1, (_ZTU_,"WARNING! can't find '80 ' in profile.\n"));
return zrtp_status_fail;
}
/*
* Check that each component in the profile is in the global set of components.
*/

View File

@ -34,7 +34,7 @@
* and use the resulting source code and executable binaries
* (including modified versions of each) under the Mozilla Public
* License Version 1.1 (MPLv1.1). For more information about
* FreeSWITCH, visit: http://freeswitch.org/
* FreeSWITCH, visit: https://freeswitch.org/
*
* As a restatement of the above, you may use, modify, and
* redistribute this library as if it were licensed under the MPLv1.1

View File

@ -33,7 +33,7 @@
* and use the resulting source code and executable binaries
* (including modified versions of each) under the Mozilla Public
* License Version 1.1 (MPLv1.1). For more information about
* FreeSWITCH, visit: http://freeswitch.org/
* FreeSWITCH, visit: https://freeswitch.org/
*
* As a restatement of the above, you may use, modify, and
* redistribute this library as if it were licensed under the MPLv1.1

View File

@ -1 +1 @@
Wed Feb 11 12:35:25 EST 2015
Wed Sep 9 12:33:29 CDT 2015

View File

@ -1593,10 +1593,6 @@ int nua_client_next_request(nua_client_request_t *cr, int invite)
for (; cr; cr = cr->cr_next) {
if (cr->cr_method == sip_method_cancel)
continue;
if (invite
? cr->cr_method == sip_method_invite
: cr->cr_method != sip_method_invite)
break;
}

View File

@ -381,6 +381,27 @@ int tls_init_context(tls_t *tls, tls_issues_t const *ti)
#if require_client_certificate
errno = EIO;
return -1;
#endif
#ifndef OPENSSL_NO_DH
} else {
BIO *bio = BIO_new_file(ti->key, "r");
if (bio != NULL) {
DH *dh = PEM_read_bio_DHparams(bio, NULL, NULL, NULL);
if (dh != NULL) {
if (!SSL_CTX_set_tmp_dh(tls->ctx, dh)) {
SU_DEBUG_1(("%s: invalid DH parameters (PFS) because %s: %s\n",
"tls_init_context",
ERR_reason_error_string(ERR_get_error()),
ti->key));
} else {
long options = SSL_OP_CIPHER_SERVER_PREFERENCE | SSL_OP_SINGLE_DH_USE;
options = SSL_CTX_set_options(tls->ctx, options);
SU_DEBUG_3(("%s\n", "tls: initialized DHE"));
}
DH_free(dh);
}
BIO_free(bio);
}
#endif
}

View File

@ -497,14 +497,14 @@ static __inline__ void symbol_sync(v27ter_rx_state_t *s)
s->gardner_integrate += (p + q > 0) ? s->gardner_step : -s->gardner_step;
if (abs(s->gardner_integrate) >= 256)
if (abs(s->gardner_integrate) >= 128)
{
/* This integrate and dump approach avoids rapid changes of the equalizer put step.
Rapid changes, without hysteresis, are bad. They degrade the equalizer performance
when the true symbol boundary is close to a sample boundary. */
//span_log(&s->logging, SPAN_LOG_FLOW, "Hop %d\n", s->gardner_integrate);
s->eq_put_step += (s->gardner_integrate/256);
s->total_baud_timing_correction += (s->gardner_integrate/256);
s->eq_put_step += (s->gardner_integrate/128);
s->total_baud_timing_correction += (s->gardner_integrate/128);
if (s->qam_report)
s->qam_report(s->qam_user_data, NULL, NULL, s->gardner_integrate);
s->gardner_integrate = 0;

View File

@ -15,7 +15,7 @@ basedir=$(pwd);
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx

View File

@ -16,7 +16,7 @@ basedir=$(pwd);
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx

View File

@ -11,7 +11,7 @@ basedir=$(pwd);
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx

View File

@ -16,7 +16,7 @@ basedir=$(pwd);
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git pull

View File

@ -12,7 +12,7 @@ fi
if [ ! -d "$basedir/../freeswitch-sounds" ]; then
cd $basedir/..
git clone https://stash.freeswitch.org/scm/fs/freeswitch-sounds.git
git clone https://freeswitch.org/stash/scm/fs/freeswitch-sounds.git
else
cd $basedir/../freeswitch-sounds
git clean -fdx

View File

@ -290,16 +290,10 @@ struct switch_session_manager {
uint32_t session_limit;
switch_size_t session_id;
switch_queue_t *thread_queue;
switch_thread_t *manager_thread;
switch_mutex_t *mutex;
switch_thread_cond_t *cond;
switch_mutex_t *cond_mutex;
switch_mutex_t *cond2_mutex;
int ready;
int running;
int busy;
int popping;
int starting;
};
extern struct switch_session_manager session_manager;

View File

@ -659,6 +659,8 @@ SWITCH_DECLARE(switch_status_t) switch_queue_trypop(switch_queue_t *queue, void
SWITCH_DECLARE(switch_status_t) switch_queue_interrupt_all(switch_queue_t *queue);
SWITCH_DECLARE(switch_status_t) switch_queue_term(switch_queue_t *queue);
/**
* push/add a object to the queue, returning immediatly if the queue is full
*

View File

@ -1,3 +1,4 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
@ -107,6 +108,8 @@ typedef struct switch_core_media_params_s {
char *local_sdp_str;
char *last_sdp_str;
char *last_sdp_response;
char *prev_sdp_str;
char *prev_sdp_response;
char *stun_ip;
switch_port_t stun_port;
@ -239,6 +242,7 @@ SWITCH_DECLARE(void) switch_core_media_set_telephony_event(switch_core_session_t
SWITCH_DECLARE(void) switch_core_media_set_telephony_recv_event(switch_core_session_t *session, switch_media_type_t type, switch_payload_t te);
SWITCH_DECLARE(switch_rtp_stats_t *) switch_core_media_stats(switch_core_session_t *session, switch_media_type_t type, switch_memory_pool_t *pool);
SWITCH_DECLARE(switch_status_t) switch_core_media_udptl_mode(switch_core_session_t *session, switch_media_type_t type);
SWITCH_DECLARE(switch_bool_t) switch_core_media_check_udptl_mode(switch_core_session_t *session, switch_media_type_t type);
SWITCH_DECLARE(void) switch_core_media_set_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);
SWITCH_DECLARE(void) switch_core_media_clear_rtp_flag(switch_core_session_t *session, switch_media_type_t type, switch_rtp_flag_t flag);

View File

@ -254,6 +254,8 @@ SWITCH_DECLARE(void) switch_event_prep_for_delivery_detailed(const char *file, c
SWITCH_DECLARE(switch_status_t) switch_event_bind(const char *id, switch_event_types_t event, const char *subclass_name, switch_event_callback_t callback,
void *user_data);
SWITCH_DECLARE(switch_status_t) switch_event_get_custom_events(switch_console_callback_match_t **matches);
/*!
\brief Bind an event callback to a specific event
\param id an identifier token of the binder

View File

@ -171,10 +171,13 @@ SWITCH_DECLARE(void) switch_change_sln_volume(int16_t *data, uint32_t samples, i
SWITCH_DECLARE(void) switch_change_sln_volume_granular(int16_t *data, uint32_t samples, int32_t vol);
///\}
SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
SWITCH_DECLARE(uint32_t) switch_unmerge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples);
SWITCH_DECLARE(uint32_t) switch_merge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples, int channels);
SWITCH_DECLARE(uint32_t) switch_unmerge_sln(int16_t *data, uint32_t samples, int16_t *other_data, uint32_t other_samples, int channels);
SWITCH_DECLARE(void) switch_mux_channels(int16_t *data, switch_size_t samples, uint32_t orig_channels, uint32_t channels);
#define switch_resample_calc_buffer_size(_to, _from, _srclen) ((uint32_t)(((float)_to / (float)_from) * (float)_srclen) * 2)
SWITCH_END_EXTERN_C
#endif
/* For Emacs:

View File

@ -111,7 +111,7 @@ typedef int stfu_filehandle_t;
#endif
#define STFU_PRE __FILE__, __FUNCTION__, __LINE__
#define STFU_PRE __FILE__, __SWITCH_FUNC__, __LINE__
#define STFU_LOG_LEVEL_DEBUG 7
#define STFU_LOG_LEVEL_INFO 6
#define STFU_LOG_LEVEL_NOTICE 5

View File

@ -571,9 +571,9 @@ typedef enum {
SWITCH_XML_SECTION_DIALPLAN = (1 << 2),
SWITCH_XML_SECTION_LANGUAGES = (1 << 3),
SWITCH_XML_SECTION_CHATPLAN = (1 << 4),
SWITCH_XML_SECTION_CHANNELS = (1 << 5),
/* Nothing after this line */
SWITCH_XML_SECTION_MAX = (1 << 4)
SWITCH_XML_SECTION_MAX = (1 << 5)
} switch_xml_section_enum_t;
typedef uint32_t switch_xml_section_t;
@ -595,6 +595,14 @@ typedef enum {
} switch_vad_flag_enum_t;
typedef uint32_t switch_vad_flag_t;
typedef struct error_period {
int64_t start;
int64_t stop;
struct error_period *next;
} switch_error_period_t;
typedef struct {
switch_size_t raw_bytes;
switch_size_t media_bytes;
@ -630,6 +638,7 @@ typedef struct {
switch_size_t last_flaw;
double R;
double mos;
struct error_period *error_log;
} switch_rtp_numbers_t;
typedef struct {

View File

@ -997,6 +997,7 @@ static inline int switch_needs_url_encode(const char *s)
return 0;
}
SWITCH_DECLARE(char *) switch_url_encode_opt(const char *url, char *buf, size_t len, switch_bool_t double_encode);
SWITCH_DECLARE(char *) switch_url_encode(const char *url, char *buf, size_t len);
SWITCH_DECLARE(char *) switch_url_decode(char *s);
SWITCH_DECLARE(switch_bool_t) switch_simple_email(const char *to,

View File

@ -221,6 +221,13 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_avmd_load)
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
if (switch_event_reserve_subclass(AVMD_EVENT_BEEP) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", AVMD_EVENT_BEEP);
return SWITCH_STATUS_TERM;
}
switch_log_printf(
SWITCH_CHANNEL_LOG,
SWITCH_LOG_NOTICE,
@ -327,6 +334,8 @@ SWITCH_STANDARD_APP(avmd_start_function)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_avmd_shutdown)
{
switch_event_free_subclass(AVMD_EVENT_BEEP);
#ifdef FASTMATH
destroy_fast_acosf();
#endif

View File

@ -377,6 +377,24 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_bert_load)
{
switch_application_interface_t *app_interface = NULL;
if (switch_event_reserve_subclass(BERT_EVENT_TIMEOUT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", BERT_EVENT_TIMEOUT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(BERT_EVENT_LOST_SYNC) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", BERT_EVENT_LOST_SYNC);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(BERT_EVENT_IN_SYNC) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", BERT_EVENT_IN_SYNC);
return SWITCH_STATUS_TERM;
}
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
SWITCH_ADD_APP(app_interface, "bert_test", "Start BERT Test", "Start BERT Test", bert_test_function, "", SAF_NONE);
@ -385,6 +403,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_bert_load)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_bert_shutdown)
{
switch_event_free_subclass(BERT_EVENT_TIMEOUT);
switch_event_free_subclass(BERT_EVENT_LOST_SYNC);
switch_event_free_subclass(BERT_EVENT_IN_SYNC);
return SWITCH_STATUS_UNLOAD;
}

View File

@ -1277,18 +1277,26 @@ static switch_status_t load_tier(const char *queue, const char *agent, const cha
{
/* Hack to check if an tier already exist */
if (cc_tier_update("unknown", "unknown", queue, agent) == CC_STATUS_TIER_NOT_FOUND) {
if (level && position) {
if (!zstr(level) && !zstr(position)) {
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), atoi(level), atoi(position));
} else if (!zstr(level) && zstr(position)) {
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), atoi(level), 1);
} else if (zstr(level) && !zstr(position)) {
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), 1, atoi(position));
} else {
/* default to level 1 and position 1 within the level */
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), 0, 0);
cc_tier_add(queue, agent, cc_tier_state2str(CC_TIER_STATE_READY), 1, 1);
}
} else {
if (level) {
if (!zstr(level)) {
cc_tier_update("level", level, queue, agent);
} else {
cc_tier_update("level", "1", queue, agent);
}
if (position) {
if (!zstr(position)) {
cc_tier_update("position", position, queue, agent);
} else {
cc_tier_update("position", "1", queue, agent);
}
}
return SWITCH_STATUS_SUCCESS;
@ -1723,15 +1731,19 @@ static void *SWITCH_THREAD_FUNC outbound_agent_thread_run(switch_thread_t *threa
playback_array(agent_session, o_announce);
}
switch_ivr_uuid_bridge(h->member_session_uuid, switch_core_session_get_uuid(agent_session));
switch_channel_set_variable(member_channel, "cc_agent_uuid", agent_uuid);
/* This is used for the waiting caller to quit waiting for a agent */
switch_channel_set_variable(member_channel, "cc_agent_found", "true");
switch_channel_set_variable(member_channel, "cc_agent_uuid", agent_uuid);
switch_ivr_uuid_bridge(h->member_session_uuid, switch_core_session_get_uuid(agent_session));
switch_channel_wait_for_flag(agent_channel, CF_BRIDGED, SWITCH_TRUE, 1000, NULL);
/* Wait until the agent hangup. This will quit also if the agent transfer the call */
while(switch_channel_up(agent_channel) && globals.running) {
if (!strcasecmp(h->agent_type, CC_AGENT_TYPE_UUID_STANDBY)) {
if (!switch_channel_test_flag(agent_channel, CF_BRIDGED)) {
break;
}
}
switch_yield(100000);
}
tiers_state = CC_TIER_STATE_READY;
@ -2852,7 +2864,7 @@ static int list_result_callback(void *pArg, int argc, char **argv, char **column
"\tcallcenter_config agent get state [agent_name] | \n" \
"\tcallcenter_config agent get uuid [agent_name] | \n" \
"\tcallcenter_config agent list [[agent_name]] | \n" \
"\tcallcenter_config tier add [queue_name] [agent_name] [level] [position] | \n" \
"\tcallcenter_config tier add [queue_name] [agent_name] [[level]] [[position]] | \n" \
"\tcallcenter_config tier set state [queue_name] [agent_name] [state] | \n" \
"\tcallcenter_config tier set level [queue_name] [agent_name] [level] | \n" \
"\tcallcenter_config tier set position [queue_name] [agent_name] [position] | \n" \
@ -3039,16 +3051,23 @@ SWITCH_STANDARD_API(cc_config_api_function)
} else if (section && !strcasecmp(section, "tier")) {
if (action && !strcasecmp(action, "add")) {
if (argc-initial_argc < 4) {
if (argc-initial_argc < 2) {
stream->write_function(stream, "%s", "-ERR Invalid!\n");
goto done;
} else {
int i_level=1, i_position=1;
const char *queue_name = argv[0 + initial_argc];
const char *agent = argv[1 + initial_argc];
const char *level = argv[2 + initial_argc];
const char *position = argv[3 + initial_argc];
if (!zstr(level)) {
i_level=atoi(level);
}
if (!zstr(position)) {
i_position=atoi(position);
}
switch(cc_tier_add(queue_name, agent, cc_tier_state2str(CC_TIER_STATE_READY), atoi(level), atoi(position))) {
switch(cc_tier_add(queue_name, agent, cc_tier_state2str(CC_TIER_STATE_READY), i_level, i_position)) {
case CC_STATUS_SUCCESS:
stream->write_function(stream, "%s", "+OK\n");
break;
@ -3326,6 +3345,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_callcenter_load)
switch_api_interface_t *api_interface;
switch_status_t status;
if (switch_event_reserve_subclass(CALLCENTER_EVENT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", CALLCENTER_EVENT);
return SWITCH_STATUS_TERM;
}
memset(&globals, 0, sizeof(globals));
globals.pool = pool;
@ -3400,6 +3425,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_callcenter_shutdown)
switch_ssize_t keylen;
int sanity = 0;
switch_event_free_subclass(CALLCENTER_EVENT);
switch_mutex_lock(globals.mutex);
if (globals.running == 1) {
globals.running = 0;

View File

@ -2744,6 +2744,9 @@ SWITCH_STANDARD_API(transfer_function)
switch_core_session_t *tmp = tsession;
tsession = other_session;
other_session = NULL;
if (switch_true(switch_channel_get_variable(channel, "recording_follow_transfer"))) {
switch_core_media_bug_transfer_recordings(tmp, tsession);
}
switch_core_session_rwunlock(tmp);
}
} else if (!strcasecmp(arg, "both")) {
@ -5430,7 +5433,7 @@ SWITCH_STANDARD_API(uuid_setvar_function)
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
stream->write_function(stream, "-ERR No variable specified\n");
} else {
switch_channel_set_variable(channel, var_name, var_value);
switch_channel_add_variable_var_check(channel, var_name, var_value, SWITCH_FALSE, SWITCH_STACK_BOTTOM);
stream->write_function(stream, "+OK\n");
}
@ -5539,7 +5542,24 @@ SWITCH_STANDARD_API(uuid_getvar_function)
stream->write_function(stream, "-ERR No variable name specified!\n");
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "No variable name specified.\n");
} else {
var_value = switch_channel_get_variable(channel, var_name);
if (strchr(var_name, '[')) {
char *ptr = NULL;
int idx = -1;
char *vname = strdup(var_name);
if ((ptr = strchr(vname, '[')) && strchr(ptr, ']')) {
*ptr++ = '\0';
idx = atoi(ptr);
var_value = switch_channel_get_variable_dup(channel, vname, SWITCH_TRUE, idx);
}
free(vname);
}
if (!var_value) {
var_value = switch_channel_get_variable(channel, var_name);
}
if (var_value != NULL) {
stream->write_function(stream, "%s", var_value);
} else {

View File

@ -812,6 +812,8 @@ static void process_al(al_handle_t *al, void *data, switch_size_t datalen, int r
static void conference_cdr_del(conference_member_t *member)
{
if (!member->cdr_node) return;
if (member->channel) {
switch_channel_get_variables(member->channel, &member->cdr_node->var_event);
}
@ -826,6 +828,8 @@ static void conference_cdr_add(conference_member_t *member)
switch_caller_profile_t *cp;
switch_channel_t *channel;
if (zstr(member->conference->log_dir) && (member->conference->cdr_event_mode == CDRE_NONE)) return;
np = switch_core_alloc(member->conference->pool, sizeof(*np));
np->next = member->conference->cdr_nodes;
@ -857,6 +861,8 @@ static void conference_cdr_rejected(conference_obj_t *conference, switch_channel
conference_cdr_reject_t *rp;
switch_caller_profile_t *cp;
if (zstr(conference->log_dir) && (conference->cdr_event_mode == CDRE_NONE)) return;
rp = switch_core_alloc(conference->pool, sizeof(*rp));
rp->next = conference->cdr_rejected;
@ -8905,7 +8911,7 @@ static void clear_eflags(char *events, uint32_t *f)
} else if (!strcmp(event, "play-file")) {
*f &= ~EFLAG_PLAY_FILE;
} else if (!strcmp(event, "play-file-done")) {
*f &= ~EFLAG_PLAY_FILE;
*f &= ~EFLAG_PLAY_FILE_DONE;
} else if (!strcmp(event, "play-file-member")) {
*f &= ~EFLAG_PLAY_FILE_MEMBER;
} else if (!strcmp(event, "speak-text")) {

View File

@ -269,7 +269,7 @@ static http_data_t *do_lookup_url(switch_memory_pool_t *pool, const char *url, c
static char *print_json(switch_memory_pool_t *pool, http_data_t *http_data)
{
cJSON *top = cJSON_CreateObject(),
*headers = cJSON_CreateObject();
*headers = cJSON_CreateArray();
char *data = NULL;
char tmp[32], *f = NULL;
switch_curl_slist_t *header = http_data->headers;
@ -1014,6 +1014,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_curl_load)
{
switch_api_interface_t *api_interface;
switch_application_interface_t *app_interface;
if (switch_event_reserve_subclass(HTTP_SENDFILE_ACK_EVENT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", HTTP_SENDFILE_ACK_EVENT);
return SWITCH_STATUS_TERM;
}
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@ -1037,6 +1043,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_curl_load)
Macro expands to: switch_status_t mod_cidlookup_shutdown() */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_curl_shutdown)
{
switch_event_free_subclass(HTTP_SENDFILE_ACK_EVENT);
/* Cleanup dynamically allocated config settings */
return SWITCH_STATUS_SUCCESS;
}

View File

@ -1,6 +1,6 @@
/*
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
* Copyright (C) 2005-2014, Anthony Minessale II <anthm@freeswitch.org>
* Copyright (C) 2005-2015, Anthony Minessale II <anthm@freeswitch.org>
*
* Version: MPL 1.1
*
@ -514,9 +514,17 @@ SWITCH_STANDARD_APP(play_and_detect_speech_function)
char *engine = argv[0];
char *grammar = argv[1];
char *result = NULL;
switch_ivr_play_and_detect_speech(session, file, engine, grammar, &result, 0, NULL);
if (!zstr(result)) {
switch_channel_set_variable(channel, "detect_speech_result", result);
switch_status_t status = switch_ivr_play_and_detect_speech(session, file, engine, grammar, &result, 0, NULL);
if (status == SWITCH_STATUS_SUCCESS) {
if (!zstr(result)) {
switch_channel_set_variable(channel, "detect_speech_result", result);
}
} else if (status == SWITCH_STATUS_GENERR) {
response = "GRAMMAR ERROR";
} else if (status == SWITCH_STATUS_NOT_INITALIZED) {
response = "ASR INIT ERROR";
} else {
response = "ERROR";
}
} else {
/* bad input */
@ -4537,6 +4545,10 @@ struct file_string_context {
typedef struct file_string_context file_string_context_t;
#define FILE_STRING_OPEN "filestring::open"
#define FILE_STRING_CLOSE "filestring::close"
#define FILE_STRING_FAIL "filestring::fail"
static switch_status_t next_file(switch_file_handle_t *handle)
{
file_string_context_t *context = handle->private_info;
@ -5820,6 +5832,11 @@ SWITCH_STANDARD_APP(deduplicate_dtmf_app_function)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_dptools_shutdown)
{
switch_event_free_subclass(FILE_STRING_CLOSE);
switch_event_free_subclass(FILE_STRING_FAIL);
switch_event_free_subclass(FILE_STRING_OPEN);
switch_event_unbind_callback(pickup_pres_event_handler);
switch_mutex_destroy(globals.pickup_mutex);
switch_core_hash_destroy(&globals.pickup_hash);
@ -5837,6 +5854,21 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
switch_chat_interface_t *chat_interface;
switch_file_interface_t *file_interface;
if (switch_event_reserve_subclass(FILE_STRING_CLOSE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", FILE_STRING_CLOSE);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(FILE_STRING_FAIL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", FILE_STRING_FAIL);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(FILE_STRING_OPEN) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", FILE_STRING_OPEN);
return SWITCH_STATUS_TERM;
}
globals.pool = pool;
switch_core_hash_init(&globals.pickup_hash);
switch_mutex_init(&globals.pickup_mutex, SWITCH_MUTEX_NESTED, globals.pool);

View File

@ -165,8 +165,8 @@ static switch_status_t load_config(void)
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot find SQL Database! (Where\'s the gateways table\?\?)\n");
}
}
} else if (globals.db_dsn) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Connection (did you enable it?!)\n");
} else if (!globals.db_dsn) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Cannot Open ODBC Connection (did you enable it?)\n");
}
reallydone:

View File

@ -473,7 +473,10 @@ SWITCH_STANDARD_APP(bcast_function)
read_impl.actual_samples_per_second,
ebuf, &encoded_datalen, &rate, &flag);
read_frame->data = encoded_data;
if (read_frame->buflen >= encoded_datalen) {
memcpy(read_frame->data, encoded_data, encoded_datalen);
}
read_frame->datalen = encoded_datalen;
} else {

View File

@ -2206,7 +2206,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
var = switch_event_get_header(client->params, "url");
if (client->record.action) {
if (var && client->record.action) {
if (strcmp(var, client->record.action)) {
switch_event_add_header_string(client->one_time_params, SWITCH_STACK_BOTTOM, "url", client->record.action);
httapi_sync(client);

View File

@ -668,7 +668,7 @@ static char *url_cache_get(url_cache_t *cache, http_profile_t *profile, switch_c
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Failed to download URL %s\n", url);
cache->errors++;
}
} else if (!u) {
} else if (!u || (u->status == CACHED_URL_RX_IN_PROGRESS && !download)) {
filename = DOWNLOAD_NEEDED;
} else {
/* Wait until file is downloaded */

View File

@ -454,7 +454,7 @@ static switch_bool_t oreka_audio_callback(switch_media_bug_t *bug, void *user_da
for (i = 0; i < linear_len / sizeof(int16_t); i++) {
pcmu_data[i] = linear_to_ulaw(linear_samples[i]);
}
pcmu_frame.source = __FUNCTION__;
pcmu_frame.source = __SWITCH_FUNC__;
pcmu_frame.data = pcmu_data;
pcmu_frame.datalen = i;
pcmu_frame.payload = 0;
@ -515,7 +515,7 @@ static switch_bool_t oreka_audio_callback(switch_media_bug_t *bug, void *user_da
for (i = 0; i < linear_len / sizeof(int16_t); i++) {
pcmu_data[i] = linear_to_ulaw(linear_samples[i]);
}
pcmu_frame.source = __FUNCTION__;
pcmu_frame.source = __SWITCH_FUNC__;
pcmu_frame.data = pcmu_data;
pcmu_frame.datalen = i;
pcmu_frame.payload = 0;

View File

@ -67,6 +67,9 @@
#define CR_VERSION_STRING_SIZE_STR STRINGIFY(CREDIS_VERSION_STRING_SIZE)
#ifdef PRINTDEBUG
#if !defined(_MSC_VER) && !defined(__FUNCTION__)
#define __FUNCTION__ (const char *)__func__
#endif
/* add -DPRINTDEBUG to CPPFLAGS in Makefile for debug outputs */
#define DEBUG(...) \
do { \

View File

@ -32,6 +32,7 @@
#include <switch.h>
#define SMS_CHAT_PROTO "GLOBAL_SMS"
#define MY_EVENT_SEND_MESSAGE "SMS::SEND_MESSAGE"
#define MY_EVENT_DELIVERY_REPORT "SMS::DELIVERY_REPORT"
/* Prototypes */
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sms_shutdown);
@ -577,6 +578,10 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sms_load)
switch_chat_interface_t *chat_interface;
switch_chat_application_interface_t *chat_app_interface;
if (switch_event_reserve_subclass(MY_EVENT_DELIVERY_REPORT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", MY_EVENT_DELIVERY_REPORT);
return SWITCH_STATUS_TERM;
}
if (switch_event_bind(modname, SWITCH_EVENT_CUSTOM, MY_EVENT_SEND_MESSAGE, event_handler, NULL) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't bind!\n");
@ -608,6 +613,8 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sms_shutdown)
{
switch_event_unbind_callback(event_handler);
switch_event_free_subclass(MY_EVENT_DELIVERY_REPORT);
return SWITCH_STATUS_SUCCESS;
}

View File

@ -218,6 +218,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sonar_load)
{
switch_application_interface_t *app_interface;
if (switch_event_reserve_subclass("sonar::ping") != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", "sonar::ping");
return SWITCH_STATUS_TERM;
}
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@ -233,6 +239,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sonar_load)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sonar_shutdown)
{
switch_event_free_subclass("sonar::ping");
return SWITCH_STATUS_SUCCESS;
}

View File

@ -772,6 +772,42 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_spandsp_init)
switch_application_interface_t *app_interface;
switch_api_interface_t *api_interface;
if (switch_event_reserve_subclass(MY_EVENT_TDD_RECV_MESSAGE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", MY_EVENT_TDD_RECV_MESSAGE);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_TXFAXNEGOCIATERESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_TXFAXNEGOCIATERESULT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_RXFAXNEGOCIATERESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_RXFAXNEGOCIATERESULT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_TXFAXPAGERESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_TXFAXPAGERESULT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_RXFAXPAGERESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_RXFAXPAGERESULT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_TXFAXRESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_TXFAXRESULT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(SPANDSP_EVENT_RXFAXRESULT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", SPANDSP_EVENT_RXFAXRESULT);
return SWITCH_STATUS_TERM;
}
memset(&spandsp_globals, 0, sizeof(spandsp_globals));
spandsp_globals.pool = pool;
@ -855,7 +891,14 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_spandsp_shutdown)
switch_event_unbind_callback(event_handler);
switch_event_unbind_callback(tdd_event_handler);
switch_event_free_subclass(MY_EVENT_TDD_RECV_MESSAGE);
switch_event_free_subclass(SPANDSP_EVENT_TXFAXNEGOCIATERESULT);
switch_event_free_subclass(SPANDSP_EVENT_RXFAXNEGOCIATERESULT);
switch_event_free_subclass(SPANDSP_EVENT_TXFAXPAGERESULT);
switch_event_free_subclass(SPANDSP_EVENT_RXFAXPAGERESULT);
switch_event_free_subclass(SPANDSP_EVENT_TXFAXRESULT);
switch_event_free_subclass(SPANDSP_EVENT_RXFAXRESULT);
mod_spandsp_fax_shutdown();
mod_spandsp_dsp_shutdown();
#if defined(MODEM_SUPPORT)

View File

@ -49,6 +49,17 @@ typedef int zap_socket_t;
#define SPANDSP_EXPOSE_INTERNAL_STRUCTURES
#include <spandsp.h>
#define SPANDSP_EVENT_TXFAXRESULT "spandsp::txfaxresult"
#define SPANDSP_EVENT_RXFAXRESULT "spandsp::rxfaxresult"
#define SPANDSP_EVENT_TXFAXPAGERESULT "spandsp::txfaxpageresult"
#define SPANDSP_EVENT_RXFAXPAGERESULT "spandsp::rxfaxpageresult"
#define SPANDSP_EVENT_TXFAXNEGOCIATERESULT "spandsp::txfaxnegociateresult"
#define SPANDSP_EVENT_RXFAXNEGOCIATERESULT "spandsp::rxfaxnegociateresult"
/* The global stuff */
struct spandsp_globals {
switch_memory_pool_t *pool;

View File

@ -359,6 +359,7 @@ typedef struct {
int reverse_twist;
int filter_dialtone;
int threshold;
switch_audio_resampler_t *resampler;
} switch_inband_dtmf_t;
static void spandsp_dtmf_rx_realtime_callback(void *user_data, int code, int level, int duration)
@ -391,7 +392,10 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
{
switch_inband_dtmf_t *pvt = (switch_inband_dtmf_t *) user_data;
switch_frame_t *frame = NULL;
switch_core_session_t *session = switch_core_media_bug_get_session(bug);
switch_codec_implementation_t read_impl = { 0 };
switch (type) {
case SWITCH_ABC_TYPE_INIT: {
pvt->dtmf_detect = dtmf_rx_init(NULL, NULL, NULL);
@ -407,10 +411,56 @@ static switch_bool_t inband_dtmf_callback(switch_media_bug_t *bug, void *user_da
if (pvt->dtmf_detect) {
dtmf_rx_free(pvt->dtmf_detect);
}
if (pvt->resampler) {
switch_resample_destroy(&pvt->resampler);
}
break;
case SWITCH_ABC_TYPE_READ_REPLACE:
if ((frame = switch_core_media_bug_get_read_replace_frame(bug))) {
dtmf_rx(pvt->dtmf_detect, frame->data, frame->samples);
int16_t data[SWITCH_RECOMMENDED_BUFFER_SIZE];
int datalen = frame->datalen;
int16_t *dp = frame->data;
int samples = frame->samples;
switch_core_session_get_read_impl(session, &read_impl);
if (read_impl.number_of_channels != 1 || read_impl.actual_samples_per_second != 8000) {
memcpy(data, frame->data, frame->datalen);
dp = data;
}
if (read_impl.number_of_channels != 1) {
uint32_t rlen = frame->datalen / 2 / read_impl.number_of_channels;
switch_mux_channels((int16_t *) dp, rlen, read_impl.number_of_channels, 1);
datalen = rlen * 2 * 1;
samples = datalen / 2;
}
if (read_impl.actual_samples_per_second != 8000) {
if (!pvt->resampler) {
if (switch_resample_create(&pvt->resampler,
read_impl.actual_samples_per_second,
8000,
8 * (read_impl.microseconds_per_packet / 1000) * 2,
SWITCH_RESAMPLE_QUALITY,
1) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Unable to allocate resampler\n");
return SWITCH_FALSE;
}
}
switch_resample_process(pvt->resampler, dp, (int) datalen / 2 / 1);
memcpy(dp, pvt->resampler->to, pvt->resampler->to_len * 2 * 1);
samples = pvt->resampler->to_len;
datalen = pvt->resampler->to_len * 2 * 1;
}
dtmf_rx(pvt->dtmf_detect, dp, samples);
switch_core_media_bug_set_read_replace_frame(bug, frame);
}
break;

View File

@ -42,16 +42,6 @@
#define DEFAULT_FEC_ENTRIES 3
#define DEFAULT_FEC_SPAN 3
#define SPANDSP_EVENT_TXFAXRESULT "spandsp::txfaxresult"
#define SPANDSP_EVENT_RXFAXRESULT "spandsp::rxfaxresult"
#define SPANDSP_EVENT_TXFAXPAGERESULT "spandsp::txfaxpageresult"
#define SPANDSP_EVENT_RXFAXPAGERESULT "spandsp::rxfaxpageresult"
#define SPANDSP_EVENT_TXFAXNEGOCIATERESULT "spandsp::txfaxnegociateresult"
#define SPANDSP_EVENT_RXFAXNEGOCIATERESULT "spandsp::rxfaxnegociateresult"
/*****************************************************************************
OUR DEFINES AND STRUCTS
*****************************************************************************/

View File

@ -516,6 +516,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_vmd_load)
{
switch_application_interface_t *app_interface;
switch_api_interface_t *api_interface;
if (switch_event_reserve_subclass(VMD_EVENT_BEEP) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", VMD_EVENT_BEEP);
return SWITCH_STATUS_TERM;
}
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@ -607,6 +613,8 @@ SWITCH_STANDARD_APP(vmd_start_function)
*/
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_vmd_shutdown)
{
switch_event_free_subclass(VMD_EVENT_BEEP);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Voicemail detection disabled\n");
return SWITCH_STATUS_SUCCESS;

View File

@ -901,7 +901,7 @@ struct call_control {
int noexit;
int playback_controls_active;
};
typedef struct call_control cc_t;
typedef struct call_control switch_cc_t;
static switch_status_t control_playback(switch_core_session_t *session, void *input, switch_input_type_t itype, void *buf, unsigned int buflen)
{
@ -909,7 +909,7 @@ static switch_status_t control_playback(switch_core_session_t *session, void *in
case SWITCH_INPUT_TYPE_DTMF:
{
switch_dtmf_t *dtmf = (switch_dtmf_t *) input;
cc_t *cc = (cc_t *) buf;
switch_cc_t *cc = (switch_cc_t *) buf;
switch_file_handle_t *fh = cc->fh;
uint32_t pos = 0;
@ -1191,7 +1191,7 @@ static switch_status_t create_file(switch_core_session_t *session, vm_profile_t
switch_input_args_t args = { 0 };
char term;
char input[10] = "", key_buf[80] = "";
cc_t cc = { 0 };
switch_cc_t cc = { 0 };
switch_codec_implementation_t read_impl = { 0 };
int got_file = 0;
switch_bool_t skip_record_check = switch_true(switch_channel_get_variable(channel, "skip_record_check"));
@ -1587,7 +1587,7 @@ static switch_status_t listen_file(switch_core_session_t *session, vm_profile_t
char term;
char input[10] = "", key_buf[80] = "";
switch_file_handle_t fh = { 0 };
cc_t cc = { 0 };
switch_cc_t cc = { 0 };
char *forward_file_path = NULL;
switch_core_session_message_t msg = { 0 };
char cid_buf[1024] = "";
@ -2058,6 +2058,7 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "VM-Total-Saved-Messages", "%u", total_saved_messages);
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "VM-Total-New-Urgent-Messages", "%u", total_new_urgent_messages);
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "VM-Total-Saved-Urgent-Messages", "%u", total_saved_urgent_messages);
switch_channel_event_set_data(channel, params);
switch_event_fire(&params);
if (total_new_urgent_messages > 0) {
@ -2179,7 +2180,7 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
char key_buf[80] = "";
callback_t cbt = { 0 };
char msg_count[80] = "";
cc_t cc = { 0 };
switch_cc_t cc = { 0 };
switch_size_t message_len = 0;
cbt.buf = msg_count;
@ -2214,11 +2215,12 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
num = atoi(input);
file_path = switch_mprintf("%s%sgreeting_%d.%s", dir_path, SWITCH_PATH_SEPARATOR, num, profile->file_ext);
if (num < 1 || num > VM_MAX_GREETINGS) {
if (num < 0 || num > VM_MAX_GREETINGS) {
status = SWITCH_STATUS_FALSE;
} else {
} else if (num > 0) {
switch_file_handle_t fh = { 0 };
file_path = switch_mprintf("%s%sgreeting_%d.%s", dir_path, SWITCH_PATH_SEPARATOR, num, profile->file_ext);
memset(&fh, 0, sizeof(fh));
greeting_args.input_callback = control_playback;
memset(&cc, 0, sizeof(cc));
@ -2234,15 +2236,25 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_t *params;
TRY_CODE(switch_ivr_phrase_macro(session, VM_CHOOSE_GREETING_SELECTED_MACRO, input, NULL, NULL));
sql =
switch_mprintf("update voicemail_prefs set greeting_path='%s' where username='%s' and domain='%s'", file_path, myid,
if (file_path == NULL) {
sql =
switch_mprintf("update voicemail_prefs set greeting_path=NULL where username='%s' and domain='%s'", myid,
domain_name);
} else {
sql =
switch_mprintf("update voicemail_prefs set greeting_path='%s' where username='%s' and domain='%s'",
file_path, myid, domain_name);
}
vm_execute_sql(profile, sql, profile->mutex);
switch_safe_free(sql);
switch_event_create_subclass(&params, SWITCH_EVENT_CUSTOM, VM_EVENT_MAINT);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "change-greeting");
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Greeting-Path", file_path);
if (file_path == NULL) {
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "remove-greeting");
} else {
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Action", "change-greeting");
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Greeting-Path", file_path);
}
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-User", myid);
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
switch_channel_event_set_data(channel, params);
@ -2270,7 +2282,6 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
domain_name);
vm_execute_sql(profile, sql, profile->mutex);
switch_safe_free(sql);
switch_safe_free(file_path);
switch_safe_free(tmp_file_path);
switch_event_create_subclass(&params, SWITCH_EVENT_CUSTOM, VM_EVENT_MAINT);
@ -2280,6 +2291,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
switch_channel_event_set_data(channel, params);
switch_event_fire(&params);
switch_safe_free(file_path);
}
} else if (!strcmp(input, profile->change_pass_key)) {
@ -2303,6 +2316,9 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
switch_channel_event_set_data(channel, params);
if (zstr(buf) && !profile->allow_empty_password_auth) {
fail = 1;
}
if (switch_xml_locate_user("id", myid, domain_name, switch_channel_get_variable(channel, "network_addr"),
&xx_domain_root, &xx_domain, &xx_user, NULL, params) == SWITCH_STATUS_SUCCESS) {
switch_xml_t x_result;
@ -2319,6 +2335,7 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
if (fail) {
/* add feedback for user - let him/her know that the password they tried to change to is not allowed */
switch_ivr_phrase_macro(session, VM_CHANGE_PASS_FAIL_MACRO, NULL, NULL, NULL);
switch_event_destroy(&params);
} else {
sql = switch_mprintf("update voicemail_prefs set password='%s' where username='%s' and domain='%s'", buf, myid, domain_name);
vm_execute_sql(profile, sql, profile->mutex);
@ -2327,9 +2344,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
ok = 1;
/* add feedback for user - let him/her know that password change was successful */
switch_ivr_phrase_macro(session, VM_CHANGE_PASS_SUCCESS_MACRO, NULL, NULL, NULL);
switch_event_fire(&params);
}
switch_event_destroy(&params);
}
} else if (!strcmp(input, profile->record_name_key)) {
@ -2341,7 +2357,6 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_file_rename(tmp_file_path, file_path, switch_core_session_get_pool(session));
sql = switch_mprintf("update voicemail_prefs set name_path='%s' where username='%s' and domain='%s'", file_path, myid, domain_name);
vm_execute_sql(profile, sql, profile->mutex);
switch_safe_free(file_path);
switch_safe_free(tmp_file_path);
switch_safe_free(sql);
@ -2352,6 +2367,8 @@ static void voicemail_check_main(switch_core_session_t *session, vm_profile_t *p
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "VM-Domain", domain_name);
switch_channel_event_set_data(channel, params);
switch_event_fire(&params);
switch_safe_free(file_path);
}
continue;
}
@ -2708,7 +2725,7 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
const char *filename;
switch_xml_t x_param, x_params;
const char *vm_cc = NULL, *vm_cc_tmp = NULL;
const char *vm_cc = NULL, *vm_switch_cc_tmp = NULL;
char *vm_email = NULL;
char *vm_email_from = NULL;
char *vm_notify_email = NULL;
@ -2727,7 +2744,12 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
switch_status_t ret = SWITCH_STATUS_SUCCESS;
char *convert_cmd = profile->convert_cmd;
char *convert_ext = profile->convert_ext;
switch_channel_t *channel = NULL;
if (session) {
channel = switch_core_session_get_channel(session);
}
if (!params) {
switch_event_create(&local_event, SWITCH_EVENT_REQUEST_PARAMS);
params = local_event;
@ -2879,6 +2901,9 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
switch_event_add_header_string(message_event, SWITCH_STACK_BOTTOM, "VM-UUID", use_uuid);
switch_event_add_header(message_event, SWITCH_STACK_BOTTOM, "VM-Message-Len", "%u", message_len);
switch_event_add_header(message_event, SWITCH_STACK_BOTTOM, "VM-Timestamp", "%lu", (unsigned long) switch_epoch_time_now(NULL));
if (channel) {
switch_channel_event_set_data(channel, message_event);
}
switch_event_fire(&message_event);
@ -3074,8 +3099,8 @@ static switch_status_t deliver_vm(vm_profile_t *profile,
if (session) {
switch_channel_t *channel = switch_core_session_get_channel(session);
if (channel && (vm_cc_tmp = switch_channel_get_variable(channel, "vm_cc"))) {
vm_cc = vm_cc_tmp;
if (channel && (vm_switch_cc_tmp = switch_channel_get_variable(channel, "vm_cc"))) {
vm_cc = vm_switch_cc_tmp;
}
}
@ -3353,7 +3378,7 @@ static switch_status_t voicemail_leave_main(switch_core_session_t *session, vm_p
switch_input_args_t args = { 0 };
char *vm_email = NULL;
char *vm_notify_email = NULL;
cc_t cc = { 0 };
switch_cc_t cc = { 0 };
char *read_flags = NORMAL_FLAG_STRING;
const char *operator_ext = switch_channel_get_variable(channel, "vm_operator_extension");
char buf[2];

View File

@ -1237,7 +1237,7 @@ static switch_status_t synth_channel_set_header(speech_channel_t *schannel, int
} else if (!strcasecmp("neutral", val)) {
synth_hdr->voice_param.gender = VOICE_GENDER_NEUTRAL;
} else {
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid voice gender, %s\n", schannel->name, val);
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(schannel->session_uuid), SWITCH_LOG_WARNING, "(%s) ignoring invalid voice gender, %s\n", schannel->name, val);
break;
}
mrcp_resource_header_property_add(msg, SYNTHESIZER_HEADER_VOICE_GENDER);
@ -1476,11 +1476,9 @@ static switch_status_t speech_channel_write(speech_channel_t *schannel, void *da
return SWITCH_STATUS_FALSE;
}
switch_mutex_lock(schannel->mutex);
if (schannel->state == SPEECH_CHANNEL_PROCESSING) {
audio_queue_write(schannel->audio_queue, data, len);
}
switch_mutex_unlock(schannel->mutex);
return SWITCH_STATUS_SUCCESS;
}
@ -1502,7 +1500,6 @@ static switch_status_t speech_channel_read(speech_channel_t *schannel, void *dat
return SWITCH_STATUS_FALSE;
}
switch_mutex_lock(schannel->mutex);
switch (schannel->state) {
case SPEECH_CHANNEL_DONE:
/* pull any remaining audio - never blocking */
@ -1518,7 +1515,6 @@ static switch_status_t speech_channel_read(speech_channel_t *schannel, void *dat
default:
status = SWITCH_STATUS_BREAK;
}
switch_mutex_unlock(schannel->mutex);
return status;
}
@ -4397,6 +4393,21 @@ static mrcp_client_t *mod_unimrcp_client_create(switch_memory_pool_t *mod_pool)
*/
SWITCH_MODULE_LOAD_FUNCTION(mod_unimrcp_load)
{
if (switch_event_reserve_subclass(MY_EVENT_PROFILE_CREATE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", MY_EVENT_PROFILE_CREATE);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(MY_EVENT_PROFILE_CLOSE) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", MY_EVENT_PROFILE_CLOSE);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(MY_EVENT_PROFILE_OPEN) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", MY_EVENT_PROFILE_OPEN);
return SWITCH_STATUS_TERM;
}
/* connect my internal structure to the blank pointer passed to me */
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
@ -4453,6 +4464,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_unimrcp_load)
*/
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_unimrcp_shutdown)
{
switch_event_free_subclass(MY_EVENT_PROFILE_CREATE);
switch_event_free_subclass(MY_EVENT_PROFILE_CLOSE);
switch_event_free_subclass(MY_EVENT_PROFILE_OPEN);
synth_shutdown();
recog_shutdown();

View File

@ -152,7 +152,7 @@ static switch_status_t switch_codec2_encode(switch_codec_t *codec, switch_codec_
fflush(context->encoder_out);
#endif
*encoded_data_len = 8;
*encoded_data_len = 6;
return SWITCH_STATUS_SUCCESS;
}
@ -230,7 +230,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_codec2_load)
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
SWITCH_ADD_CODEC(codec_interface, "CODEC2 2550bps");
SWITCH_ADD_CODEC(codec_interface, "CODEC2 2400bps");
switch_core_codec_add_implementation(pool, codec_interface,
SWITCH_CODEC_TYPE_AUDIO,
@ -239,7 +239,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_codec2_load)
NULL,
8000, /* samples/sec */
8000, /* samples/sec */
2550, /* bps */
2400, /* bps */
20000, /* ptime */
CODEC2_SAMPLES_PER_FRAME, /* samples decoded */
CODEC2_SAMPLES_PER_FRAME*2, /* bytes decoded */

View File

@ -22,12 +22,12 @@ $(LICSERVER) $(VALIDATOR) $(MOD): $(G729INSTALLER)
@echo
$(G729INSTALLER):
rm -f $(top_srcdir)/libs/fsg729-*-installer*
$(GETG729) fsg729-$(VERSION)-installer
rm -f $(top_srcdir)/libs/fs-*-installer*
$(GETG729) fs-$(VERSION)-installer
chmod 755 $(G729INSTALLER)
clean:
rm -f $(top_srcdir)/libs/fsg729-*-installer*
rm -f $(top_srcdir)/libs/fs-*-installer*
rm -rf /tmp/fsg729
activate: $(LICSERVER) $(VALIDATOR) $(MOD)

View File

@ -510,7 +510,7 @@ static switch_status_t switch_sangoma_encode(switch_codec_t *codec, switch_codec
/* do the writing */
memset(&linear_frame, 0, sizeof(linear_frame));
linear_frame.source = __FUNCTION__;
linear_frame.source = __SWITCH_FUNC__;
linear_frame.data = decoded_byteswapped_data;
linear_frame.datalen = decoded_data_len;
linear_frame.payload = linear_payload;
@ -720,7 +720,7 @@ static switch_status_t switch_sangoma_decode(switch_codec_t *codec, /* codec ses
/* do the writing */
memset(&encoded_frame, 0, sizeof(encoded_frame));
encoded_frame.source = __FUNCTION__;
encoded_frame.source = __SWITCH_FUNC__;
encoded_frame.data = encoded_data;
encoded_frame.datalen = encoded_data_len;
encoded_frame.payload = codec->implementation->ianacode;

View File

@ -1195,6 +1195,12 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
{
switch_application_interface_t *app_interface;
if (switch_event_reserve_subclass("loopback::bowout") != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", "loopback::bowout");
return SWITCH_STATUS_TERM;
}
memset(&globals, 0, sizeof(globals));
/* connect my internal structure to the blank pointer passed to me */
@ -1212,6 +1218,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_loopback_load)
SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_loopback_shutdown)
{
switch_event_free_subclass("loopback::bowout");
return SWITCH_STATUS_SUCCESS;
}

View File

@ -1835,6 +1835,46 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_rtmp_load)
switch_api_interface_t *api_interface;
rtmp_globals.pool = pool;
if (switch_event_reserve_subclass(RTMP_EVENT_CONNECT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_CONNECT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_DISCONNECT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_DISCONNECT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_REGISTER) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_REGISTER);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_UNREGISTER) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_UNREGISTER);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_LOGIN) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_LOGIN);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_LOGOUT) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_LOGOUT);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_DETACH) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_DETACH);
return SWITCH_STATUS_TERM;
}
if (switch_event_reserve_subclass(RTMP_EVENT_ATTACH) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Couldn't register subclass %s!\n", RTMP_EVENT_ATTACH);
return SWITCH_STATUS_TERM;
}
memset(&rtmp_globals, 0, sizeof(rtmp_globals));
switch_mutex_init(&rtmp_globals.mutex, SWITCH_MUTEX_NESTED, pool);
@ -1925,6 +1965,15 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_rtmp_shutdown)
{
switch_hash_index_t *hi = NULL;
switch_event_free_subclass(RTMP_EVENT_CONNECT);
switch_event_free_subclass(RTMP_EVENT_DISCONNECT);
switch_event_free_subclass(RTMP_EVENT_REGISTER);
switch_event_free_subclass(RTMP_EVENT_UNREGISTER);
switch_event_free_subclass(RTMP_EVENT_LOGIN);
switch_event_free_subclass(RTMP_EVENT_LOGOUT);
switch_event_free_subclass(RTMP_EVENT_DETACH);
switch_event_free_subclass(RTMP_EVENT_ATTACH);
switch_mutex_lock(rtmp_globals.mutex);
while ((hi = switch_core_hash_first_iter( rtmp_globals.profile_hash, hi))) {
void *val;

View File

@ -303,6 +303,11 @@ char * skinny_profile_find_session_uuid(skinny_profile_t *profile, listener_t *l
call_id_condition = switch_mprintf("1=1");
}
switch_assert(call_id_condition);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO,
"Attempting to find active call with criteria (%s and %s and %s)\n",
device_condition, line_instance_condition, call_id_condition);
if((sql = switch_mprintf(
"SELECT channel_uuid, line_instance "
"FROM skinny_active_lines "
@ -917,6 +922,79 @@ switch_status_t channel_on_destroy(switch_core_session_t *session)
return SWITCH_STATUS_SUCCESS;
}
struct skinny_ring_active_calls_helper {
private_t *tech_pvt;
listener_t *listener;
};
int skinny_ring_active_calls_callback(void *pArg, int argc, char **argv, char **columnNames)
{
struct skinny_ring_active_calls_helper *helper = pArg;
switch_core_session_t *session;
/* char *device_name = argv[0]; */
/* uint32_t device_instance = atoi(argv[1]); */
/* uint32_t position = atoi(argv[2]); */
uint32_t line_instance = atoi(argv[3]);
/* char *label = argv[4]; */
/* char *value = argv[5]; */
/* char *caller_name = argv[6]; */
uint32_t ring_on_idle = atoi(argv[7]);
/* uint32_t ring_on_active = atoi(argv[8]); */
/* uint32_t busy_trigger = atoi(argv[9]); */
/* char *forward_all = argv[10]; */
/* char *forward_busy = argv[11]; */
/* char *forward_noanswer = argv[12]; */
/* uint32_t noanswer_duration = atoi(argv[13]); */
/* char *channel_uuid = argv[14]; */
uint32_t call_id = atoi(argv[15]);
/* uint32_t call_state = atoi(argv[16]); */
session = skinny_profile_find_session(helper->listener->profile, helper->listener, &line_instance, call_id);
if(session) {
/* After going on-hook, start ringing if there is an active call in the SKINNY_RING_IN state */
skinny_log_l(helper->listener, SWITCH_LOG_DEBUG, "Start Ringer for active Call ID (%d), Line Instance (%d), Line State (%d).\n", call_id, line_instance, skinny_line_get_state(helper->listener,line_instance, call_id));
send_set_lamp(helper->listener, SKINNY_BUTTON_LINE, line_instance, SKINNY_LAMP_BLINK);
if ( ring_on_idle ) {
send_set_ringer(helper->listener, SKINNY_RING_INSIDE, SKINNY_RING_FOREVER, line_instance, call_id);
} else {
send_set_ringer(helper->listener, SKINNY_RING_FLASHONLY, SKINNY_RING_FOREVER, line_instance, call_id);
}
switch_core_session_rwunlock(session);
}
return 0;
}
switch_status_t skinny_ring_active_calls(listener_t *listener)
/* Look for all SKINNY active calls in the SKINNY_RING_IN state and tell them to start ringing */
{
struct skinny_ring_active_calls_helper helper = {0};
char *sql;
helper.listener = listener;
if ((sql = switch_mprintf(
"SELECT skinny_lines.*, channel_uuid, call_id, call_state "
"FROM skinny_active_lines "
"INNER JOIN skinny_lines "
"ON skinny_active_lines.device_name = skinny_lines.device_name "
"AND skinny_active_lines.device_instance = skinny_lines.device_instance "
"AND skinny_active_lines.line_instance = skinny_lines.line_instance "
"WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d "
"AND (call_state=%d)",
listener->device_name, listener->device_instance, SKINNY_RING_IN))) {
skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_ring_active_calls_callback, &helper);
switch_safe_free(sql);
}
return SWITCH_STATUS_SUCCESS;
}
struct channel_on_hangup_helper {
private_t *tech_pvt;
switch_call_cause_t cause;
@ -1002,6 +1080,9 @@ int channel_on_hangup_callback(void *pArg, int argc, char **argv, char **columnN
send_set_speaker_mode(listener, SKINNY_SPEAKER_OFF);
}
send_set_ringer(listener, SKINNY_RING_OFF, SKINNY_RING_FOREVER, line_instance, call_id);
/* After hanging up this call, activate the ringer for any other active incoming calls */
skinny_ring_active_calls(listener);
}
return 0;
}
@ -1462,6 +1543,86 @@ static int flush_listener_callback(void *pArg, int argc, char **argv, char **col
return 0;
}
void skinny_lock_device_name(listener_t *listener, char *device_name)
{
switch_time_t started = 0;
unsigned int elapsed = 0;
device_name_lock_t *dnl;
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "lock device name '%s'\n", device_name);
}
started = switch_micro_time_now();
/* global mutex on hash operations */
switch_mutex_lock(listener->profile->device_name_lock_mutex);
dnl = (device_name_lock_t *) switch_core_hash_find(listener->profile->device_name_lock_hash, device_name);
if ( ! dnl ) {
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "creating device name lock for device name '%s'\n", device_name);
}
dnl = switch_core_alloc(listener->profile->pool, sizeof(*dnl));
switch_mutex_init(&dnl->flag_mutex, SWITCH_MUTEX_NESTED, listener->profile->pool);
switch_core_hash_insert(listener->profile->device_name_lock_hash, device_name, dnl);
}
switch_mutex_unlock(listener->profile->device_name_lock_mutex);
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "setting device name lock for device name '%s'\n", device_name);
}
switch_set_flag_locked(dnl, DNLFLAG_INUSE);
if ((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > 5) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "device name lock took more than 5ms for '%s' (%d)\n", device_name, elapsed);
}
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "locked device name '%s'\n", device_name);
}
}
void skinny_unlock_device_name(listener_t *listener, char *device_name)
{
switch_time_t started = 0;
unsigned int elapsed = 0;
device_name_lock_t *dnl;
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "unlock device name '%s'\n", device_name);
}
started = switch_micro_time_now();
/* global mutex on hash operations */
switch_mutex_lock(listener->profile->device_name_lock_mutex);
dnl = (device_name_lock_t *) switch_core_hash_find(listener->profile->device_name_lock_hash, device_name);
switch_mutex_unlock(listener->profile->device_name_lock_mutex);
if ( ! dnl ) {
skinny_log_l(listener, SWITCH_LOG_WARNING, "request to unlock and no lock structure for '%s'\n", device_name);
/* since it didn't exist, nothing to unlock, don't bother creating structure now */
} else {
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "clearing device name lock on '%s'\n", device_name);
}
switch_clear_flag_locked(dnl, DNLFLAG_INUSE);
}
/* Should we clean up the lock structure here, or does it ever get reclaimed? I don't think memory is released
so attempting to clear it up here likely would just result in a leak. */
if ((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > 5) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "device name unlock took more than 5ms for '%s' (%d)\n", device_name, elapsed);
}
if ( listener->profile->debug >= 9 ) {
skinny_log_l(listener, SWITCH_LOG_DEBUG, "unlocked device name '%s'\n", device_name);
}
}
void skinny_clean_device_from_db(listener_t *listener, char *device_name)
{
if(!zstr(device_name)) {
@ -1577,7 +1738,9 @@ static void flush_listener(listener_t *listener)
switch_safe_free(sql);
}
skinny_lock_device_name(listener, listener->device_name);
skinny_clean_listener_from_db(listener);
skinny_unlock_device_name(listener, listener->device_name);
strcpy(listener->device_name, "");
}
@ -1656,7 +1819,7 @@ switch_status_t kill_listener(listener_t *listener, void *pvt)
{
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Killing listener %s:%d.\n",
listener->device_name, listener->device_instance);
switch_clear_flag(listener, LFLAG_RUNNING);
switch_clear_flag_locked(listener, LFLAG_RUNNING);
close_socket(&listener->sock, listener->profile);
return SWITCH_STATUS_SUCCESS;
}
@ -1738,11 +1901,12 @@ static void *SWITCH_THREAD_FUNC listener_run(switch_thread_t *thread, void *obj)
skinny_log_l_msg(listener, SWITCH_LOG_DEBUG, "Connection Open\n");
}
listener->connect_time = switch_epoch_time_now(NULL);
switch_set_flag_locked(listener, LFLAG_RUNNING);
keepalive_listener(listener, NULL);
add_listener(listener);
while (listener_is_ready(listener)) {
status = skinny_read_packet(listener, &request);
@ -2114,6 +2278,8 @@ static switch_status_t load_skinny_config(void)
switch_mutex_init(&profile->sock_mutex, SWITCH_MUTEX_NESTED, profile->pool);
switch_mutex_init(&profile->flag_mutex, SWITCH_MUTEX_NESTED, profile->pool);
switch_mutex_init(&profile->device_name_lock_mutex, SWITCH_MUTEX_NESTED, profile->pool);
for (param = switch_xml_child(xsettings, "param"); param; param = param->next) {
char *var = (char *) switch_xml_attr_soft(param, "name");
char *val = (char *) switch_xml_attr_soft(param, "value");
@ -2231,6 +2397,8 @@ static switch_status_t load_skinny_config(void)
continue;
}
/* Device Name Locks */
switch_core_hash_init(&profile->device_name_lock_hash);
/* Device types */
switch_core_hash_init(&profile->device_type_params_hash);

View File

@ -127,6 +127,9 @@ struct skinny_profile {
int non_blocking;
switch_hash_t *soft_key_set_sets_hash;
switch_hash_t *device_type_params_hash;
/* lock on device names for multiple connection handling */
switch_mutex_t *device_name_lock_mutex;
switch_hash_t *device_name_lock_hash;
/* extensions */
char *ext_voicemail;
char *ext_redial;
@ -169,6 +172,23 @@ typedef enum {
SKINNY_ACTION_WAIT
} skinny_action_t;
/*****************************************************************************/
/* DEVICE NAME LOCK TYPES */
/*****************************************************************************/
typedef enum {
DNLFLAG_INUSE = (1 << 0),
} device_name_lock_flag_t;
struct device_name_lock {
char device_name[16];
switch_mutex_t *flag_mutex;
uint32_t flags;
};
typedef struct device_name_lock device_name_lock_t;
/*****************************************************************************/
/* LISTENERS TYPES */
/*****************************************************************************/
@ -197,6 +217,7 @@ struct listener {
switch_mutex_t *flag_mutex;
uint32_t flags;
time_t expire_time;
time_t connect_time;
switch_time_t digit_timeout_time;
struct listener *next;
char *ext_voicemail;
@ -301,6 +322,12 @@ switch_status_t keepalive_listener(listener_t *listener, void *pvt);
void skinny_clean_listener_from_db(listener_t *listener);
void skinny_clean_device_from_db(listener_t *listener, char *device_name);
/*****************************************************************************/
/* DEVICE NAME LOCK FUNCTIONS */
/*****************************************************************************/
void skinny_lock_device_name(listener_t *listener, char *device_name);
void skinny_unlock_device_name(listener_t *listener, char *device_name);
/*****************************************************************************/
/* CHANNEL FUNCTIONS */
/*****************************************************************************/

View File

@ -112,6 +112,8 @@ switch_status_t skinny_create_incoming_session(listener_t *listener, uint32_t *l
skinny_line_get(listener, *line_instance_p, &button);
skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to create incoming session on Line %d\n", *line_instance_p);
if (!button || !button->shortname[0]) {
skinny_log_l(listener, SWITCH_LOG_CRIT, "Line %d not found on device\n", *line_instance_p);
goto error;
@ -1075,6 +1077,58 @@ switch_status_t skinny_hold_active_calls(listener_t *listener)
return SWITCH_STATUS_SUCCESS;
}
struct skinny_hangup_active_calls_helper {
listener_t *listener;
};
int skinny_hangup_active_calls_callback(void *pArg, int argc, char **argv, char **columnNames)
{
struct skinny_hangup_active_calls_helper *helper = pArg;
switch_core_session_t *session;
/* char *device_name = argv[0]; */
/* uint32_t device_instance = atoi(argv[1]); */
/* uint32_t position = atoi(argv[2]); */
uint32_t line_instance = atoi(argv[3]);
/* char *label = argv[4]; */
/* char *value = argv[5]; */
/* char *caller_name = argv[6]; */
/* uint32_t ring_on_idle = atoi(argv[7]); */
/* uint32_t ring_on_active = atoi(argv[8]); */
/* uint32_t busy_trigger = atoi(argv[9]); */
/* char *forward_all = argv[10]; */
/* char *forward_busy = argv[11]; */
/* char *forward_noanswer = argv[12]; */
/* uint32_t noanswer_duration = atoi(argv[13]); */
/* char *channel_uuid = argv[14]; */
uint32_t call_id = atoi(argv[15]);
uint32_t call_state = atoi(argv[16]);
session = skinny_profile_find_session(helper->listener->profile, helper->listener, &line_instance, call_id);
if(session) {
switch_channel_t *channel = NULL;
private_t *tech_pvt = NULL;
channel = switch_core_session_get_channel(session);
tech_pvt = switch_core_session_get_private(session);
if (tech_pvt->transfer_from_call_id) { /* Perform a blind transfer, instead of hanging up */
skinny_session_transfer(session, helper->listener, line_instance);
} else {
/* Hangup on an active call that is not in one of the states listed */
if ((call_state != SKINNY_ON_HOOK)&&(call_state != SKINNY_HOLD)&&(call_state != SKINNY_CALL_WAITING)&&(call_state != SKINNY_CALL_PARK)&&(call_state != SKINNY_IN_USE_REMOTELY)&&(call_state != SKINNY_RING_IN)) {
skinny_log_l(helper->listener, SWITCH_LOG_DEBUG, "Hangup Line Instance (%d), Call ID (%d), Line State (%d)\n", line_instance, tech_pvt->call_id, skinny_line_get_state(helper->listener,line_instance, call_id));
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
}
}
switch_core_session_rwunlock(session);
}
return 0;
}
/*****************************************************************************/
/* SKINNY MESSAGE HANDLERS */
/*****************************************************************************/
@ -1113,12 +1167,17 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
switch_event_add_header_string(params, SWITCH_STACK_BOTTOM, "action", "skinny-auth");
/* clean up all traces before adding to database */
skinny_lock_device_name(listener, request->data.reg.device_name);
skinny_clean_device_from_db(listener, request->data.reg.device_name);
if (switch_xml_locate_user("id", request->data.reg.device_name, profile->domain, "", &xroot, &xdomain, &xuser, &xgroup, params) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Can't find device [%s@%s]\n"
"You must define a domain called '%s' in your directory and add a user with id=\"%s\".\n"
, request->data.reg.device_name, profile->domain, profile->domain, request->data.reg.device_name);
/* unlock before trying to send response in case socket blocks */
skinny_unlock_device_name(listener, request->data.reg.device_name);
send_register_reject(listener, "Device not found");
status = SWITCH_STATUS_FALSE;
goto end;
@ -1135,6 +1194,10 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Device %s:%d is already registered on another listener.\n",
request->data.reg.device_name, request->data.reg.instance);
/* unlock before trying to send response in case socket blocks */
skinny_unlock_device_name(listener, request->data.reg.device_name);
send_register_reject(listener, "Device is already registered on another listener");
status = SWITCH_STATUS_FALSE;
goto end;
@ -1156,11 +1219,12 @@ switch_status_t skinny_handle_register(listener_t *listener, skinny_message_t *r
switch_safe_free(sql);
}
switch_copy_string(listener->device_name, request->data.reg.device_name, 16);
listener->device_instance = request->data.reg.instance;
listener->device_type = request->data.reg.device_type;
skinny_unlock_device_name(listener, request->data.reg.device_name);
xskinny = switch_xml_child(xuser, "skinny");
if (xskinny) {
if ((xparams = switch_xml_child(xskinny, "params"))) {
@ -1549,6 +1613,7 @@ switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_mess
}
call_id = request->data.off_hook.call_id;
}
skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to handle off hook message for call_id %d and line_instance %d.\n", call_id, line_instance);
session = skinny_profile_find_session(listener->profile, listener, &line_instance, call_id);
@ -1557,6 +1622,7 @@ switch_status_t skinny_handle_off_hook_message(listener_t *listener, skinny_mess
if(session && line_state == SKINNY_RING_IN ) { /*answering a call */
skinny_session_answer(session, listener, line_instance);
} else { /* start a new call */
skinny_create_incoming_session(listener, &line_instance, &session);
if ( ! session ) {
skinny_log_l_msg(listener, SWITCH_LOG_CRIT, "Unable to handle off hook message, could not create session.\n");
@ -1580,37 +1646,36 @@ switch_status_t skinny_handle_on_hook_message(listener_t *listener, skinny_messa
switch_status_t status = SWITCH_STATUS_SUCCESS;
uint32_t line_instance = 0;
uint32_t call_id = 0;
switch_core_session_t *session = NULL;
struct skinny_hangup_active_calls_helper helper = {0};
char *sql;
if(skinny_check_data_length_soft(request, sizeof(request->data.on_hook))) {
line_instance = request->data.on_hook.line_instance;
call_id = request->data.on_hook.call_id;
}
skinny_log_l(listener, SWITCH_LOG_INFO, "Attempting to handle on hook message for Call ID (%d), Line Instance (%d).\n", call_id, line_instance);
session = skinny_profile_find_session(listener->profile, listener, &line_instance, call_id);
/* Walk through all active calls for this device. The callback should hangup any active calls that should be terminated when the device goes on-hook */
if(session) {
switch_channel_t *channel = NULL;
private_t *tech_pvt = NULL;
helper.listener = listener;
channel = switch_core_session_get_channel(session);
tech_pvt = switch_core_session_get_private(session);
if (tech_pvt->transfer_from_call_id) { /* blind transfer */
status = skinny_session_transfer(session, listener, line_instance);
} else {
if (skinny_line_get_state(listener, line_instance, call_id) != SKINNY_IN_USE_REMOTELY) {
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
}
}
}
if(session) {
switch_core_session_rwunlock(session);
if ((sql = switch_mprintf(
"SELECT skinny_lines.*, channel_uuid, call_id, call_state "
"FROM skinny_active_lines "
"INNER JOIN skinny_lines "
"ON skinny_active_lines.device_name = skinny_lines.device_name "
"AND skinny_active_lines.device_instance = skinny_lines.device_instance "
"AND skinny_active_lines.line_instance = skinny_lines.line_instance "
"WHERE skinny_lines.device_name='%s' AND skinny_lines.device_instance=%d",
listener->device_name, listener->device_instance)))
{
skinny_execute_sql_callback(listener->profile, listener->profile->sql_mutex, sql, skinny_hangup_active_calls_callback, &helper);
switch_safe_free(sql);
}
return status;
}
switch_status_t skinny_handle_forward_stat_req_message(listener_t *listener, skinny_message_t *request)
{
skinny_message_t *message;

Some files were not shown because too many files have changed in this diff Show More