Compare commits
286 Commits
Author | SHA1 | Date |
---|---|---|
Anthony Minessale | ca9207aa32 | |
Anthony Minessale | d8836fb213 | |
Anthony Minessale II | c1a3a280c2 | |
Thomas Weber | 28da36e3e0 | |
Chris Rienzo | 5258338429 | |
Chris Rienzo | dad8aba68b | |
Chris Rienzo | 563e336b49 | |
Ken Rice | aba5892bdb | |
Chris Rienzo | 35e360f1e4 | |
Anthony Minessale | 45534616c6 | |
Mark Lipscombe | eb502e1d0f | |
Ken Rice | 66cd7d6b1a | |
Anthony Minessale | 4bdca8197a | |
Mark Lipscombe | 6d8edab59b | |
Brian West | 0e551408d4 | |
Nathan Neulinger | aaddce34c0 | |
Mike Jerris | 02dde638f5 | |
Michael Jerris | 9fc9e8aef1 | |
Ken Rice | 9fcf3e0c9a | |
Anthony Minessale | 2c1d7a2ba5 | |
Chris Rienzo | 61b8e6ee66 | |
Brian West | 02d7baf79e | |
Anthony Minessale | f90dd4b1c0 | |
Davide Colombo | cd15a67789 | |
Anthony Minessale | d6910afa3b | |
Anthony Minessale | 4d2bc24a1f | |
Michael Jerris | 1665168d37 | |
Brian West | 070291b44d | |
Anthony Minessale | 8681d42167 | |
Saumar Hajjar | 4977f608fe | |
Anthony Minessale | 2655c12e45 | |
Ken Rice | 0405d1f980 | |
Ken Rice | aaef0e2987 | |
Anthony Minessale | 5f3de47a21 | |
Anthony Minessale | a2061df862 | |
Travis Cross | e49f8c65f7 | |
Travis Cross | 0aca2c714d | |
Michael Jerris | cd4ebc67c4 | |
Michael Jerris | 7dda9d01ea | |
Anthony Minessale | 9936846e01 | |
Anthony Minessale | 5844c10fdd | |
Anthony Minessale | 739ec596f0 | |
Michael Jerris | f4ed3a27ff | |
Tamas Cseke | a4e1d4c00a | |
Artur Zaprzała | 5257ee6521 | |
Natanael Copa | 8a8c8e943a | |
Natanael Copa | d0010f6d83 | |
Michael Jerris | 3c57190b79 | |
Chris Rienzo | 12b2880b06 | |
Anthony Minessale | fab435479a | |
Peter Wu | 02cc5bcd14 | |
Anthony Minessale | 6f503bdc98 | |
Anthony Minessale II | e05a5c2cdf | |
Anthony Minessale | 1613f145d6 | |
Anthony Minessale II | b72c89cd2c | |
Anthony Minessale II | 4892f95216 | |
Mike Jerris | a223dd0236 | |
Anthony Minessale | d3d1a058ab | |
Michael Jerris | bad2250044 | |
Joshua Gigg | f9f5348bfa | |
Michael Jerris | 15c5e01f6a | |
Mike Jerris | 3acabb8e3c | |
Chris Rienzo | 19233e4690 | |
Chris Rienzo | c74264b942 | |
Chris Rienzo | 1b8814430e | |
Chris Rienzo | 09a1c47548 | |
Anthony Minessale | d9ea0f56d2 | |
Michael Jerris | d5d4517340 | |
Ken Rice | 87a059bafc | |
Chris Rienzo | c93ae16de2 | |
Michael Jerris | 781959230b | |
Michael Jerris | 0d3c4870f3 | |
Michael Jerris | bdeadadc88 | |
Anton Farygin | b59ff25c71 | |
Anthony Minessale | da6997d771 | |
Michael Jerris | 5a8a37c955 | |
Moises Silva | e105fc8450 | |
Moises Silva | 4703bba8e5 | |
Anthony Minessale | defab5ac22 | |
Anthony Minessale | d7f3c5a721 | |
Joshua Gigg | 23fbdcabfa | |
Michael Jerris | bfa3128724 | |
Brian West | 30ffe287da | |
Michael Jerris | 0fb2cbcece | |
Anthony Minessale | 447ae4634a | |
Anthony Minessale | 8934b1cced | |
Michael Jerris | 79a99dfc8a | |
Michael Jerris | 730793be32 | |
Hristo Trendev | 06b05e3b7b | |
Anton Lozovsky | 33c18f9eac | |
andywang1988 | e696410a0d | |
Mark Lipscombe | fff773897c | |
Brian West | e0d10da0fe | |
Brian West | ab85263386 | |
Anthony Minessale | 4fc6d2f732 | |
Davide Colombo | b9eff3b09a | |
Brian West | 776e8a501a | |
Anthony Minessale | ad04a8d30c | |
Chris Rienzo | dc85ef18e8 | |
Anthony Minessale | 367848e07e | |
Anthony Minessale | a88accaa30 | |
William King | bf08a378cb | |
Anthony Minessale | 89b05c4a4f | |
Anthony Minessale | 18dd3634bd | |
Anthony Minessale | de75d9fca6 | |
Anthony Minessale | 71ee949431 | |
karl anderson | 63c6d9c15f | |
Anthony Minessale | b95362f965 | |
Anthony Minessale | 39d0797abe | |
Ken Rice | 0ae8ee7f8f | |
Yossi Neiman | d8e6c545a6 | |
Sergey Safarov | eb84d9cdf8 | |
Anthony Minessale | a3ebbf46cc | |
doancea | ec801c25f8 | |
Brian | 014434bdb7 | |
Anton Schur | d098166dbf | |
Michael Jerris | 637cd993e0 | |
Alexander Traud | 35551d1d62 | |
Travis Cross | 979c94de37 | |
Anthony Minessale | 2aa1ee1dde | |
Italo Rossi | d2fadd6993 | |
Chris Rienzo | 758409c794 | |
Anthony Minessale | 73f45e3758 | |
Brian West | afabc3cf5e | |
Anthony Minessale | 0e321de744 | |
Anthony Minessale | d501bdc813 | |
Brian West | a5dfc5d488 | |
Michael Jerris | 91bce5f843 | |
Anthony Minessale | 19a38bcec4 | |
Anthony Minessale | 15257ebe05 | |
Anthony Minessale | 1cfe50716c | |
Anthony Minessale | f423b2d6d2 | |
William King | 3d0cbb2812 | |
Michael Jerris | 9d49966551 | |
Brian West | 4c3f504813 | |
Anthony Minessale | 2ca5394425 | |
Anthony Minessale | cdbf704667 | |
William King | 63eca6112b | |
William King | 7db5b178f6 | |
Anthony Minessale | 5145746438 | |
Ryan Lantzer | dd64594c05 | |
Ken Rice | 6923953d45 | |
William King | 828942137a | |
Michael Jerris | bb051500a1 | |
Brian | 479c13ab47 | |
Anthony Minessale | 09a28930f2 | |
Michael Jerris | 436bb68dbb | |
Anthony Minessale | 797c0579ac | |
Chris Rienzo | b881188c1c | |
William King | b1caa619a2 | |
Nathan Neulinger | fb02e34c5a | |
Brian | 9c41c1217e | |
Steve Underwood | f4841ca1bd | |
Ken Rice | ebf2df68fa | |
Ken Rice | 0f2e272f0f | |
Ken Rice | e32f39382a | |
Ken Rice | 9c76b9b485 | |
Ken Rice | 9c3d33c67e | |
Ken Rice | dc23337258 | |
Ken Rice | dfd91879c4 | |
Ken Rice | 4eed221b69 | |
Ken Rice | c1ed0618fd | |
Ken Rice | 4df2105a46 | |
Ken Rice | 5a650e4c2f | |
Ken Rice | 40e1d8f914 | |
Ken Rice | 0828caf695 | |
Ken Rice | 507a0f22c5 | |
Ken Rice | c52df1d8e4 | |
Ken Rice | 0d5bd66c42 | |
Seven Du | f3d4c6e7b9 | |
Seven Du | 82b7f01692 | |
Michael Jerris | b0fecc1844 | |
Jeff Lenk | 7f3c90e110 | |
Anthony Minessale | f33127db91 | |
Brian West | aae4a76f3a | |
William King | 26aba8de77 | |
Anthony Minessale | 95bc5d2bef | |
Anthony Minessale | b94eb0f7e2 | |
Dmitriy N. Borisov | 41b97031d7 | |
Dmitriy N. Borisov | 65ca6ed024 | |
Brian West | 01cbaa2809 | |
Brian West | 68fcf1916f | |
Anthony Minessale | 07b4dbeea7 | |
Anthony Minessale | 39ae68c3c6 | |
Moises Silva | c8ae02bba3 | |
Anthony Minessale | fa2133b60d | |
Chris Rienzo | ffc6bba3ff | |
Anthony Minessale | e1ebedf9ce | |
Jeff Lenk | a887f02dca | |
Jeff Lenk | cb71989ba5 | |
Jeff Lenk | e2972ab75f | |
Jeff Lenk | 63cd544998 | |
Moises Silva | a04e3dd57a | |
Moises Silva | c16d7b2285 | |
Anthony Minessale | 75711f47ec | |
Anthony Minessale | e12ef5819f | |
Anthony Minessale | 2bded497fd | |
Anthony Minessale | 8261c75441 | |
Michael Jerris | e9afb07512 | |
Jeff Lenk | bb145be423 | |
Jeff Lenk | c84add31a9 | |
Anthony Minessale | 6a71c82ab4 | |
Italo Rossi | 9eb1dda419 | |
Anthony Minessale | d61873bc39 | |
Anthony Minessale | f779dc98e1 | |
Anthony Minessale | 4c3c149d3d | |
Chris Rienzo | ebf4ab4a1e | |
Chris Rienzo | bd8e231969 | |
Michael Jerris | f542f71f2b | |
Anthony Minessale | fc547335f9 | |
Anthony Minessale | cb941a3b0c | |
Anthony Minessale | bf2b425bb0 | |
Michael Jerris | e5d351d0a1 | |
Anthony Minessale | 5910f4de51 | |
Anthony Minessale | 54a2979b01 | |
Paul Arnold | 624b45a84f | |
Humberto Diógenes | 0ef2b03ea1 | |
Anthony Minessale | ba623d0fa6 | |
sgutierrez | 6705087d38 | |
Brian West | fdb269c2d2 | |
Brian West | d600a15681 | |
Brian West | aaeea2df86 | |
Chris Rienzo | 459ccb019e | |
Brian West | 982d386be2 | |
Dave Kompel | 48a723ac9f | |
François | 9c7e5f761b | |
Italo Rossi | 0bc9010c64 | |
Chris Rienzo | 2e9c6b4fe0 | |
Brian West | 785c5e2316 | |
Brian West | 11ab74d684 | |
Anthony Minessale | eac1c64058 | |
Hristo Trendev | 3c0e57940e | |
Anthony Minessale | 59fd7c26db | |
Chris Rienzo | eb71ff41c7 | |
Seven Du | 56e14bce76 | |
Anthony Minessale | 42538ff8d5 | |
Anthony Minessale | f4714f4f7b | |
matteo brancaleoni | 1186414ea4 | |
Chris Rienzo | 22fb7a20ac | |
Chris Rienzo | 5900ccf9c9 | |
Chris Rienzo | 5c93d15305 | |
Anthony Minessale | a5dadbe1ba | |
Steven Ayre | 6b2a81b38c | |
Steven Ayre | d969a7b399 | |
Steven Ayre | a1ea64e4a7 | |
Steven Ayre | 378686cf9d | |
Steven Ayre | 9d1c252614 | |
Steven Ayre | 69bc6e19c8 | |
Brian West | f8970da873 | |
Tamas Cseke | d349caf6a9 | |
Ken Rice | ca1d990cfc | |
Ken Rice | af97a59956 | |
Ken Rice | decb35332b | |
Ken Rice | b942d0faa8 | |
Ken Rice | ace49af950 | |
Ken Rice | b33a86cd48 | |
Ken Rice | f79f6fafbe | |
Ken Rice | 2aca57517a | |
Ken Rice | d18c45a5fd | |
Ken Rice | bb506c393b | |
Ken Rice | a4ef985bf5 | |
Ken Rice | ae069dcca7 | |
Ken Rice | 8834bc28fd | |
Ken Rice | f1a575e074 | |
Ken Rice | 2ded568068 | |
Ken Rice | 2d89eca611 | |
Ken Rice | 04789ae35f | |
Ken Rice | 55d0aec559 | |
Ken Rice | 9f72b11892 | |
Ken Rice | 5605274664 | |
Giovanni Maruzzelli | 00451ed62d | |
Ken Rice | 498f58677f | |
Giovanni Maruzzelli | 1fe89f530f | |
Travis Cross | 912c3652d2 | |
Travis Cross | 98168fad9f | |
Ken Rice | ac405bb132 | |
Ken Rice | 7a96fe57ba | |
Ken Rice | 9d1c0f7f3d | |
Ken Rice | 59bdbecbd2 | |
Ken Rice | 9479729340 | |
Ken Rice | 6d4fa0ea12 | |
Anthony Minessale | 8f5c321714 | |
Ken Rice | db4d062318 | |
Ken Rice | db111f6a29 | |
Ken Rice | b58efb778f | |
Ken Rice | a152e8e976 |
14
Makefile.am
14
Makefile.am
|
@ -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; \
|
||||
|
|
|
@ -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 +"
|
||||
|
|
|
@ -7,6 +7,7 @@ modulesdir=@modulesdir@
|
|||
runtimedir=@runtimedir@
|
||||
logfiledir=@logfiledir@
|
||||
sysconfdir=@sysconfdir@
|
||||
confdir=@confdir@
|
||||
dbdir=@dbdir@
|
||||
htdocsdir=@htdocsdir@
|
||||
localstatedir=@localstatedir@
|
||||
|
|
|
@ -1 +1 @@
|
|||
1.5.16
|
||||
1.4.26
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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 -->
|
||||
|
|
|
@ -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"/>
|
||||
|
|
|
@ -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"/>
|
||||
|
||||
|
|
|
@ -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}])
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1 +1 @@
|
|||
Tue Aug 27 13:58:18 EDT 2013
|
||||
Wed Aug 19 11:38:49 CDT 2015
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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, ¶m);
|
||||
param.sched_priority = thread->priority;
|
||||
pthread_setschedparam(tt, policy, ¶m);
|
||||
}
|
||||
#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, ¶m);
|
||||
param.sched_priority = attr->priority;
|
||||
pthread_setschedparam(tt, policy, ¶m);
|
||||
}
|
||||
#endif
|
||||
|
||||
*(*new)->td = tt;
|
||||
|
||||
return APR_SUCCESS;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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__);
|
||||
|
||||
}
|
||||
/******************************************************************************/
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 { \
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1 +1 @@
|
|||
Wed Feb 11 12:35:25 EST 2015
|
||||
Wed Sep 9 12:33:29 CDT 2015
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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")) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 { \
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
*****************************************************************************/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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(¶ms);
|
||||
|
||||
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(¶ms, 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(¶ms, 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(¶ms);
|
||||
|
||||
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(¶ms);
|
||||
} 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(¶ms);
|
||||
}
|
||||
|
||||
switch_event_destroy(¶ms);
|
||||
}
|
||||
|
||||
} 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(¶ms);
|
||||
|
||||
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];
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
/*****************************************************************************/
|
||||
|
|
|
@ -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
Loading…
Reference in New Issue