[-]
[+]
|
Changed |
libss7.spec
|
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/.version
^
|
@@ -0,0 +1 @@
+1.0.2
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/ChangeLog
^
|
@@ -0,0 +1,720 @@
+2008-10-13 Matthew Fredrickson <creslin@digium.com>
+
+ * libss7 1.0.2 released
+
+2008-09-06 16:15 +0000 [r210] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Give the default README an 1.6.0 and DAHDI an overhaul,
+ add 56k documentation, as well as a section on SS7 related
+ Asterisk variables.
+
+2008-08-12 20:50 +0000 [r209] Matthew Fredrickson <creslin@digium.com>
+
+ * NEWS-08-12-2008 (added), ss7linktest.c: Add latest NEWS update as
+ well as correct zap reference to dahdi
+
+2008-08-09 16:54 +0000 [r208] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Fix minor buglet in parsing code of
+ echo_control_info_dump. If we received spare or unknown values in
+ the hg bits, it would overwrite the dump output of the fe bits
+
+2008-08-06 18:49 +0000 [r205-207] Jason Parker <jparker@digium.com>
+
+ * Makefile: Remove useless SOSLINK
+
+ * Makefile: ldconfig won't create these links if you're using
+ INSTALL_PREFIX
+
+ * Makefile: Make INSTALL_PREFIX consistent with libpri (read: make
+ it use DESTDIR)
+
+2008-08-05 22:28 +0000 [r202] Kevin P. Fleming <kpfleming@digium.com>
+
+ * /, LICENSE (added): add LICENSE file
+
+2008-08-05 Kevin P. Fleming <kpfleming@digium.com>
+
+ * libss7 1.0.1 released
+
+2008-08-05 22:28 +0000 [r201-202] Kevin P. Fleming <kpfleming@digium.com>
+
+ * /, LICENSE (added): add LICENSE file
+
+ * Makefile, ss7.c, ss7test.c, ss7_internal.h, isup.c, mtp2.c,
+ parser_debug.c, ss7_sched.c, mtp3.c, isup.h, mtp2.h, libss7.h,
+ mtp3.h, ss7linktest.c: clean up license headers explicitly grant
+ additional license permissions when used with Asterisk build
+ ss7test and ss7linktest when DAHDI is found, not Zaptel stop
+ using DAHDI typedefs that no longer exist
+
+2008-07-30 15:42 +0000 [r200] Kevin P. Fleming <kpfleming@digium.com>
+
+ * Makefile, mkdep (removed), /: use new version and dependency
+ stuff here too
+
+2008-07-29 22:48 +0000 [r199] Jason Parker <jparker@digium.com>
+
+ * build_tools/make_version: I believe this is what was meant. (it
+ matches how Asterisk does it)
+
+2008-07-19 16:08 +0000 [r198] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c: Fix potential bug in which we might have lost the last
+ MSU received, but we never checked the new FSN in the following
+ FISUs which would cause us not to request retransmission of the
+ lost MSU and potentially cause the remote end's T7 (message
+ acknowledgement timer) to expire and reset the link
+
+2008-07-18 14:58 +0000 [r197] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Make sure we're populating the correct event types in FAA
+ and CGB
+
+2008-07-16 15:49 +0000 [r196] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7test.c: Fix ss7test.c to use new TRANSPORT definitions
+ (#13075)
+
+2008-07-11 21:30 Matthew Fredrickson <creslin@digium.com>
+
+ * Libss7 1.0.0 released!
+
+2008-07-11 21:30 +0000 [r185-186] Matthew Fredrickson <creslin@digium.com>
+
+ * parser_debug.c, ss7linktest.c: Make linktest program work with
+ new transport definitions
+
+ * ss7.c, libss7.h: Remove DAHDI dependency from libss7
+
+2008-06-29 01:56 +0000 [r184] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, ss7test.c, ss7linktest.c: Make libss7 compatible with
+ DAHDI. No more Zaptel (get 0.9.1 branch if you need Zaptel
+ support, although it is not going to be maintained)
+
+2008-06-28 14:37 +0000 [r183] Kevin P. Fleming <kpfleming@digium.com>
+
+ * ss7.c: remove unnecessary include of zaptel.h
+
+2008-06-27 19:06 +0000 [r181] Matthew Fredrickson <creslin@digium.com>
+
+ * libss7.h: Add work around for new DAHDI name
+
+2008-06-21 02:40 +0000 [r178-180] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c: Put zaptel header back in
+
+ * ss7.c, isup.c: Try to make the isup_find_call and __isup_new_call
+ logic in isup_receive less prone to instability caused by people
+ making mistakes when writing code for new events and messages.
+ This will make the default behavior to generate a new, unlinked
+ call for scratchpad purposes by default. There is much less
+ potential of free'ing an active call if we make the switch's
+ default to do this instead of having the default finding an
+ existing call
+
+ * isup.c: Make sure we don't lose our old call if CFN comes in
+
+2008-06-14 21:11 +0000 [r177] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, isup.c: Fix bug which occurred when messages are received
+ but no events were output. We were allocating a new event by
+ default, which sometimes would contain an old event. If we did
+ not fill in the newly allocated event, a duplicate of the
+ previous event was given to the user application, which sometimes
+ could cause a crash from an already free'd call being handed
+ back.
+
+2008-05-30 19:32 +0000 [r173-176] Matthew Fredrickson <creslin@digium.com>
+
+ * NEWS-09-27-2006 (added), README, NEWS-09-11-2006 (added),
+ NEWS-08-23-2006 (added): Add a few of the public service
+ announcments I have made on the Asterisk-ss7 mailing list as well
+ as update the README
+
+ * NEWS-05-30-2008 (added): Add latest news update for libss7
+
+ * isup.c: Don't need to output hex since we get it in the next line
+ (for message type)
+
+ * isup.c, mtp2.c: Remove duplicate error message, also make sure we
+ print message type and CIC before erroring out of ISUP dump
+
+2008-05-28 14:46 +0000 [r172] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: jip_transmit is a FUNC_SEND, not FUNC_RECV. Also, since
+ jip_number is a static field, we shouldn't have to check for it's
+ existance before we check to see if something is there
+
+2008-05-16 19:52 +0000 [r169-171] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: Add called_party_status_ind field to
+ event_acm
+
+ * isup.c: Fixed bug in functions :-)
+
+ * isup.c: Add dump for optional backward call indicator
+
+2008-05-14 18:17 +0000 [r162-168] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: In order to receive CPC, we have to actually copy it into
+ the event from which we read it :-)
+
+ * isup.c, isup.h, libss7.h: Add support for receiving of calling
+ party's category
+
+ * isup.c: Don't throw an error when don't output an event for a
+ message
+
+ * isup.c: Add support for CFN (confusion) message type
+
+ * isup.c: Report CIC number when debug message appears
+
+ * mtp2.c: Add the write flag in a couple of more places that might
+ need it. Basically, it needs to be set any time any MTP2
+ parameter changes (bib, fib, fsn, bsn)
+
+ * mtp2.c: Need to update write flag everytime we receive a valid
+ MSU since FISU's BSN needs to be updated
+
+2008-05-10 00:59 +0000 [r160-161] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, mtp2.c, mtp2.h, libss7.h, ss7linktest.c: Add support for
+ kernel MTP2 support
+
+ * mtp2.c: Remove some useless code in mtp2
+
+2008-05-01 23:04 +0000 [r159] Brett Bryant <bbryant@digium.com>
+
+ * Makefile, build_tools (added), build_tools/make_version (added),
+ build_tools/make_version_c (added), libss7.h: Add new API call to
+ libss7 ( ss7_get_version ) that will return a version string.
+
+2008-05-01 18:31 +0000 [r152-158] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c: Use the correct variable name too
+
+ * mtp2.c, mtp3.c: Make sure that if a link goes down during
+ operation for any reason, that we report it to MTP3
+
+ * isup.c: Make name for generic name transmit function match all
+ the rest of the transmit functions
+
+ * isup.c: Make sure we don't send generic name unless it's actually
+ set.
+
+ * Makefile: Remove sccp object from build
+
+ * Makefile: Initial 0.0.9 release
+
+2008-04-21 18:37 +0000 [r151] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, libss7.h: Libss7 portion of #12484. Allow transmission of
+ generic name.
+
+2008-04-12 23:52 +0000 [r150] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: Commit patch for #12325. Add support
+ for redirecting number and generic name parameters (Rx only).
+ Also add ANSI CVT and CVR message support
+
+2008-03-21 21:34 +0000 [r148-149] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, mtp3.c, isup.h, mtp3.h: Fix ANSI sls so that is actually
+ keeps the same sls for the duration of a call
+
+ * ss7_internal.h, isup.c, mtp3.c, isup.h, mtp3.h: Some
+ rearrangement for getting the SLS right for ANSI
+
+2008-03-18 17:14 +0000 [r146-147] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Revert previous commit because of bug
+
+ * isup.c: Add new cause code and make sure we don't include
+ variable parm length within the data dump
+
+2008-03-15 22:54 +0000 [r145] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Add more dump support for backward call indicator
+
+2008-03-07 23:34 +0000 [r143-144] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h: Add support for dumping generic name
+
+ * isup.c: Update continuity message indication to be correct
+
+2008-02-21 18:22 +0000 [r142] Joshua Colp <jcolp@digium.com>
+
+ * Makefile: Only build ss7test and ss7linktest if the zaptel
+ headers are available.
+
+2008-02-18 21:50 +0000 [r140-141] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: Libss7 support for #11964: add the
+ ability to get ORIG_CALLED_NUM
+
+ * isup.c, libss7.h: Fix for 11779. Allow different point codes in
+ same linkset
+
+2008-01-18 22:27 +0000 [r138-139] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Fix for sometimes stupid telco SLC settings
+
+ * mtp3.c: Make sure we don't send messages on links that are down
+ on a linkset
+
+2007-12-20 23:12 +0000 [r137] Matthew Fredrickson <creslin@digium.com>
+
+ * README, isup.c, isup.h, libss7.h: Add support for RLT on DMS
+ switches, JIP parameter additions, generic digits parameter, call
+ reference parameter, facility indicator, as well as facility
+ accept and facility reject message types. #11506 Thanks Alan.
+
+2007-11-17 23:48 +0000 [r132-136] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c: Hopefully the last update for making links automatically
+ reconnect
+
+ * mtp2.c, mtp3.c: Fix some more MTP2 automatic restart code
+
+ * isup.c: Make sure CICs over 256 work. Oops.
+
+ * isup.c, isup.h, libss7.h: Add generic address support. #11156.
+ Thanks Alan!
+
+ * mtp2.c: Make sure we retry realignment when we go down
+
+2007-11-06 21:45 +0000 [r130-131] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7test.c, parser_debug.c, ss7linktest.c: Make all the API
+ updates
+
+ * ss7.c, libss7.h: Add a new transport option for eventual SS7 over
+ IP support
+
+2007-10-27 00:36 +0000 [r129] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: Add circuit group query support
+
+2007-10-25 23:23 +0000 [r127-128] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Make sure we don't output incorrect message types for
+ net_mng
+
+ * isup.c, isup.h: Add debugging for a couple of previously unknown
+ parameters
+
+2007-10-19 16:22 +0000 [r126] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h: Add support for JIP (Juridiction Information
+ Parameter) #11031
+
+2007-10-16 00:29 +0000 [r125] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Take some mostly unimportant data out
+
+2007-10-12 15:03 +0000 [r116-124] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Don't print out every MTP3 message we get
+
+ * isup.c, isup.h: Add original called number dump support
+
+ * isup.c, isup.h: Add dump support for redirection info parameter
+
+ * isup.c: Clean up unknown paramter parsing a little more
+
+ * isup.c: Take out some duplicate code, add some additional info
+ for unkown parameters
+
+ * README: Updates to README file
+
+ * isup.c, isup.h, libss7.h: Remove oli preset field in favor of
+ implicitly being present or not (-1 for not there)
+
+ * isup.c: Minor coding style fix
+
+ * isup.c, isup.h, libss7.h: Add support for CCR test, specifiable
+ charge number in ANSI, and a few other things
+
+2007-10-09 19:31 +0000 [r115] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Make sure we display user part numerical equivalent. Also
+ some dump formatting updates
+
+2007-10-05 21:24 +0000 [r110-114] Matthew Fredrickson <creslin@digium.com>
+
+ * parser_debug.c: Make it easier to switch ss7 types
+
+ * mtp3.c: Make the ANSI point code format more familiar looking
+
+ * Makefile: Make sure we cleanup parser debug too
+
+ * isup.c: Add some more cause debug, also small update to avoid
+ potential bugs due to return errors on parm routines
+
+ * Makefile, parser_debug.c: Do some compiler trickery for big
+ endian machines
+
+2007-10-03 13:51 +0000 [r100-109] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, parser_debug.c: Add support for charge number dumping
+
+ * isup.c, parser_debug.c: Add dump support for transmission medium
+ requirements
+
+ * parser_debug.c: Make sure that we use exactly the right size
+
+ * isup.c: Add debugging for a couple more parameters
+
+ * isup.c: Add dump support for called party number
+
+ * isup.c: Continue to make dumping prettier
+
+ * isup.c: Continue to make dumping prettier
+
+ * isup.c: Cleanup our ISUP dumping a little bit
+
+ * isup.c, parser_debug.c: Add a fix in the dump code for
+ incorrectly sized parameter, as well as an addition to the parser
+ debug code
+
+ * Makefile, parser_debug.c (added): Add a parser debug utility
+
+2007-09-25 23:15 +0000 [r99] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Fix type in README
+
+2007-09-22 17:36 +0000 [r97-98] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Fix potential point of confusion
+
+ * README: Update the README file
+
+2007-09-06 16:32 +0000 [r96] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: Patch on #10575. Adds a few more ISUP
+ params and messages
+
+2007-06-29 22:21 +0000 [r94-95] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, ss7linktest.c: Current iteration of debug enhancements.
+ Still have more to do.
+
+ * isup.c, mtp2.c, mtp3.c: Add some preliminary ISUP parameter
+ dumping code
+
+2007-06-28 20:31 +0000 [r92-93] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, ss7linktest.c: Make sure when we match we match on dpc as
+ well as cic
+
+ * isup.c: Make sure we set the cic when we get supervision messages
+
+2007-06-25 23:07 +0000 [r90-91] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c, ss7linktest.c: Forgot to update the dump size so that it
+ looks correct
+
+ * isup.c: Fix ANSI RLC code so that we don't include optional
+ parameters
+
+2007-06-21 17:17 +0000 [r89] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, ss7_internal.h, isup.c, mtp2.c, mtp3.c, isup.h,
+ ss7linktest.c: Fix for not setting dpc on call when we receive a
+ new one. Also, don't parse zero length messages or messages less
+ than MTP2's minimum message size. Remove unused default dpc code
+
+2007-06-19 14:49 +0000 [r87-88] Matthew Fredrickson <creslin@digium.com>
+
+ * README, isup.c, isup.h, libss7.h, ss7linktest.c: Add support for
+ nature of address indicator, number presentation, and screening
+ indicator (#10000)
+
+ * ss7.c: Make debug output not quite as ugly (#9903)
+
+2007-06-17 00:08 +0000 [r86] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, ss7linktest.c: Fix some scenarios where a call could
+ potentially be written to while free'd already
+
+2007-06-08 15:40 +0000 [r85] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, ss7_internal.h, isup.c, mtp2.c, mtp3.c, ss7linktest.c:
+ Updates to add better debugging support
+
+2007-05-23 15:29 +0000 [r84] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, mtp2.c, libss7.h: Pass cause back up the stack for REL.
+ Also display SLC when debug message is printed
+
+2007-05-15 19:59 +0000 [r81-83] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, mtp3.c: Let's try to make the SLS field more correct in
+ ITU networks.
+
+ * mtp3.c: Make sure we update our internal state to be up when we
+ give an up event.
+
+ * mtp3.c: SLC is supposed to be shifted up four bits
+
+2007-05-02 15:47 +0000 [r79-80] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7linktest.c: Let's make sure we get that logic right...
+
+ * ss7linktest.c: Make the link test program easier to use and
+ configure
+
+2007-04-04 14:47 +0000 [r78] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Make sure we set the DPC on group messages
+
+2007-03-30 20:46 +0000 [r77] Matthew Fredrickson <creslin@digium.com>
+
+ * README, isup.c, mtp3.c, isup.h, libss7.h, ss7linktest.c: Add
+ support for mulitple DPCs and CIC groups. (#9423)
+
+2007-03-26 16:42 +0000 [r75-76] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7linktest.c: Make sure we update the test program for the new
+ API. Also, small bug fix
+
+ * isup.c, isup.h, libss7.h: Add support for group maintenance type
+
+2006-12-26 17:29 +0000 [r74] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c: Fix bug in buffer flushing code. Thanks Petr for pointing
+ it out!
+
+2006-11-25 21:28 +0000 [r72-73] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Make sure we do some checks before sending group messages
+ that are out of protocol spec
+
+ * isup.c: Make sure we check args if they're not used properly
+
+2006-11-08 22:48 +0000 [r67-71] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, mtp2.c: Make libss7 a little less verbose when used
+ against buggy implementations that don't know when the link has
+ gone down.
+
+ * isup.c, mtp2.c, isup.h, mtp2.h: Update retranmission counts as
+ well as ISUP support for additional optional parameter
+
+ * README: Update README files.
+
+ * mtp2.c: Now we do retransmission requests on MSUs that we don't
+ receive correctly!
+
+ * mtp2.c: More MTP2 stress test/hardening. Fixed bug where we
+ dropped MSUs after retransmission request.
+
+2006-11-03 21:26 +0000 [r63-66] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp2.c: Make notification that retransmission was requested
+
+ * mtp2.c: Forgot that our tx'd buf is in reverse order from which
+ we need to retransmit
+
+ * mtp3.c: Make sure we spell indicator correctly
+
+ * ss7_internal.h, mtp2.c, mtp3.c, mtp2.h: Updates so that we can
+ better support retransmission reqeusts.
+
+2006-11-02 16:19 +0000 [r61-62] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Make sure we reset with reason hardware failure
+
+ * ss7.c, ss7_internal.h, mtp2.c, mtp3.c, mtp2.h, mtp3.h: Let's do
+ better linkstate up and down management!
+
+2006-10-30 17:15 +0000 [r60] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, mtp3.c, mtp3.h: More MTP3 debug information
+
+2006-10-24 15:32 +0000 [r59] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Make sure we default to E.164 numbering plan
+
+2006-10-19 19:24 +0000 [r58] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Output our point codes in decimal format for the debug
+
+2006-10-06 17:18 +0000 [r57] Matthew Fredrickson <creslin@digium.com>
+
+ * README, ss7.c, ss7_internal.h, mtp2.c, mtp3.c, libss7.h: Make
+ sure my email address is my company email address
+
+2006-09-23 21:38 +0000 [r51-56] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c, mtp2.h: Sent tra at link startup
+
+ * mtp3.c: Stupid me
+
+ * mtp3.c: Update so that we respond to STD_TEST first. Before TRA.
+
+ * ss7linktest.c: Update test program
+
+ * ss7_internal.h, mtp3.c: Send TRA only once, after we get SLTM
+ from other end
+
+ * mtp2.c: Little update
+
+2006-09-22 15:47 +0000 [r50] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, ss7_internal.h, isup.c, mtp2.c, ss7_sched.c, mtp3.c,
+ isup.h, mtp2.h, libss7.h, mtp3.h: Make sure all of our copyright
+ notices are correct
+
+2006-09-21 15:44 +0000 [r49] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Updates to README, including info about first ANSI switch
+ testing.
+
+2006-09-19 23:04 +0000 [r48] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Did an outbound ANSI call!!!!
+
+2006-09-18 19:15 +0000 [r47] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h, ss7linktest.c: Updates for parameter
+ debugging
+
+2006-09-11 17:48 +0000 [r46] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Add a little more useful output if the network indiciator
+ is set incorrectly.
+
+2006-09-09 19:47 +0000 [r42-45] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Lets make sure we use the right character for ST
+
+ * README: README updates
+
+ * isup.c: Little update
+
+ * isup.c: We have to use User Service Info in ANSI IAMs instead of
+ transmission medium requirements.
+
+2006-09-08 02:35 +0000 [r38-41] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c: Use special test instead of standard test for ANSI links.
+
+ * mtp3.c: Make sure we set the priority field in ansi
+
+ * mtp3.c: Fixes to make MTP3 come up in ANSI. We got an ANSI link
+ to come up!!!! *jumps up and down*
+
+ * README, isup.c, isup.h, libss7.h: Add CPG message support
+
+2006-09-06 17:14 +0000 [r37] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c: Fix segfault due to but in alarm handling code
+
+2006-09-01 21:37 +0000 [r34-36] Matthew Fredrickson <creslin@digium.com>
+
+ * ss7.c, libss7.h: Add support for alarms
+
+ * ss7.c: Fix a little oops with debugging
+
+ * README: Make sure we update that we support RSC
+
+2006-08-30 21:53 +0000 [r32-33] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, libss7.h: Update to add call structure to RSC.
+
+ * README, isup.c, libss7.h: Add support for reset messages.
+
+2006-08-25 20:08 +0000 [r30-31] Matthew Fredrickson <creslin@digium.com>
+
+ * README: Update to documentation
+
+ * isup.c, isup.h, libss7.h, ss7linktest.c: Do blocking and
+ unblocking right
+
+2006-08-23 22:23 +0000 [r25-29] Matthew Fredrickson <creslin@digium.com>
+
+ * mtp3.c, ss7linktest.c: Updates to make sure we send STD_TEST
+ before we send TRA
+
+ * isup.c, libss7.h: Add circuit group blocking/unblocking support
+ as well as acknowledgement
+
+ * ss7test.c, mtp2.c, libss7.h: More updates.... for circuit
+ blocking/unblocking
+
+ * mtp2.c: Only output debug if debug is enabled.
+
+ * README, libss7.h: Add group block/unblock support.
+
+2006-08-18 22:40 +0000 [r13-24] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Forgot to add the translation of message type to string
+
+ * README, isup.c, libss7.h: Add a few more messages. Update the
+ readme
+
+ * Makefile: Update to build on x86-64 correctly (#7750)
+
+ * isup.h: Oh yeah, need the definition :-)
+
+ * README, isup.c: Update to README file, as well as another
+ parameter.
+
+ * README: Clarify a bit better on how it works.
+
+ * README: Added a tested switchtype section
+
+ * isup.c: Make sure we don't do a warning on optional parameters.
+
+ * isup.c: Make sure we terminate the number after we get the ST
+ character.
+
+ * isup.c: Apparently I broke it in the midst of doing ANSI support
+ :-(
+
+ * isup.c: Handle unrecognzied optional parameters more forgivingly
+
+ * isup.c: Make sure we don't return -1 on unknown optional
+ parameter
+
+2006-08-12 22:47 +0000 [r10-12] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c, isup.h, libss7.h: More continuity check work.
+
+ * isup.c, libss7.h: Rest of continuity check and continuty check
+ request events
+
+ * README, isup.c, isup.h: Add continuity and continuity check
+ request messages
+
+2006-08-04 17:32 +0000 [r2-9] Matthew Fredrickson <creslin@digium.com>
+
+ * isup.c: Fix more signedness issues. (#7658)
+
+ * ss7.c, mtp2.c, mtp3.c: Make sure we consistently use signed vs
+ unsigned types
+
+ * ss7test.c: Make sure we use the correct new location for zaptel.h
+ (#7657)
+
+ * isup.c, mtp3.c: Add support for ANSI style CICs
+
+ * ss7.c, mtp2.c, mtp2.h: Implement ANSI MTP2 timers.
+
+ * ss7.c, isup.c, libss7.h: Add support for the connect message.
+
+ * README (added): Add a small readme file
+
+ * Makefile (added), ss7.c (added), ss7test.c (added),
+ ss7_internal.h (added), mkdep (added), isup.c (added), mtp2.c
+ (added), ss7_sched.c (added), mtp3.c (added), isup.h (added),
+ mtp2.h (added), libss7.h (added), mtp3.h (added), ss7linktest.c
+ (added): Inital check-in of libss7. Yay!!!!
+
+2006-08-01 23:48 +0000 [r1] Kevin P. Fleming <kpfleming@digium.com>
+
+ * / (added): create basic directory structure
+
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/LICENSE
^
|
@@ -0,0 +1,341 @@
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/Makefile
^
|
@@ -1,12 +1,14 @@
CC=gcc
+GREP=grep
+AWK=awk
OSARCH=$(shell uname -s)
-INSTALL_PREFIX?=
+INSTALL_PREFIX=$(DESTDIR)
INSTALL_BASE=/usr
libdir?=$(INSTALL_BASE)/lib
-STATIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o
-DYNAMIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o
+STATIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o version.o
+DYNAMIC_OBJS=mtp2.o ss7_sched.o ss7.o mtp3.o isup.o version.o
STATIC_LIBRARY=libss7.a
DYNAMIC_LIBRARY=libss7.so.1.0
CFLAGS=-Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -fPIC
@@ -16,29 +18,36 @@
UTILITIES=parser_debug
-ifneq ($(wildcard /usr/include/zaptel/zaptel.h),)
- UTILITIES+=ss7test ss7linktest
+ifneq ($(wildcard /usr/include/dahdi/user.h),)
+UTILITIES+=ss7test ss7linktest
endif
-all: depend $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) $(UTILITIES)
+export SS7VERSION
-%.lo : %.c
- $(CC) -g -fPIC $(CFLAGS) -o $@ -c $<
+SS7VERSION:=$(shell GREP=$(GREP) AWK=$(AWK) build_tools/make_version .)
+
+all: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY) $(UTILITIES)
+
+MAKE_DEPS= -MD -MT $@ -MF .$(subst /,_,$@).d -MP
+
+%.o: %.c
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
+
+%.lo: %.c
+ $(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
clean:
rm -f *.o *.so *.lo *.so.1 *.so.1.0
rm -f parser_debug ss7linktest ss7test $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
- rm -f .depend
+ rm -f .*.d
install: $(STATIC_LIBRARY) $(DYNAMIC_LIBRARY)
mkdir -p $(INSTALL_PREFIX)$(libdir)
mkdir -p $(INSTALL_PREFIX)$(INSTALL_BASE)/include
-
install -m 644 libss7.h $(INSTALL_PREFIX)$(INSTALL_BASE)/include
install -m 755 $(DYNAMIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
- ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libss7.so.1 libss7.so ; $(SOSLINK) )
+ ( cd $(INSTALL_PREFIX)$(libdir) ; ln -sf libss7.so.1 libss7.so ; ln -sf libss7.so.1.0 libss7.so.1 )
install -m 644 $(STATIC_LIBRARY) $(INSTALL_PREFIX)$(libdir)
-
if test $$(id -u) = 0; then $(LDCONFIG); fi
$(STATIC_LIBRARY): $(STATIC_OBJS)
@@ -49,7 +58,12 @@
$(CC) -shared $(SOFLAGS) -o $@ $(DYNAMIC_OBJS)
$(LDCONFIG) $(LDCONFIG_FLAGS) .
ln -sf libss7.so.1 libss7.so
- $(SOSLINK)
+ ln -sf libss7.so.1.0 libss7.so.1
+
+version.c: FORCE
+ @build_tools/make_version_c > $@.tmp
+ @cmp -s $@.tmp $@ || mv $@.tmp $@
+ @rm -f $@.tmp
ss7test: ss7test.c $(STATIC_LIBRARY)
gcc -g -o ss7test ss7test.c libss7.a -lpthread
@@ -62,7 +76,10 @@
libss7: ss7_mtp.o mtp.o ss7.o ss7_sched.o
-depend: .depend
+.PHONY:
-.depend:
- ./mkdep ${CLAGS} `ls *.c`
+FORCE:
+
+ifneq ($(wildcard .*.d),)
+ include .*.d
+endif
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/NEWS-05-30-2008
^
|
@@ -0,0 +1,52 @@
+Hey all,
+
+It has been a while since I have made a status update with regards to libss7, so I think it is about time that I should do so.
+
+Library Related Updates:
+========================
+
+Many things have changed since the last status update. Some of the highlights include are listed.
+
+Lots of additional parameters and messages are supported and dumped....
+Many new channel variables are now added in chan_zap to receive SS7 specific information:
+
+SS7_CHARGE_NUMBER
+SS7_GENERIC_ADDRESS
+SS7_JIP
+SS7_GENERIC_DIGITS
+SS7_GENERIC_DIGTYPE (type of generic digits)
+SS7_GENERIC_DIGSCHEME
+SS7_ORIG_CALLED_NUM
+
+SS7_LSPI_IDENT (these three are used for RLT support on DMS switches)
+SS7_CALLREF_IDENT
+SS7_CALLREF_PC
+
+SS7_CALLING_PARTY_CATEGORY
+SS7_REDIRECTING_NUMBER
+SS7_GENERIC_NAME
+
+Most are fairly self explanatory as far as what they contain. It is also possible to set many of these parameters on outbound calls as well by prefixing the variable with an '_' when you set it.
+
+In addition, ANSI SS7 support has been improved extensively, thanks to Alan McMillan and Joseph (on this list). RLT support has been added for DMS switch types.
+
+*NOTE*: It is also recommended to all of you that are still using the trunk version of Asterisk for SS7 support to switch to the 1.6.0 branch (http://svn.digium.com/svn/asterisk/branches/1.6.0 to checkout via svn). When it is released it will be the first release branch to contain SS7 support. I am continuing to maintain and bugfix both 1.6.0 and trunk branches.
+
+Cool New Feature That You Should Use:
+=====================================
+
+Also, as many of you may have noticed, there was a new Zaptel release (1.4.11). So you maybe asking yourself, "Why should I care about a new Zaptel release, this is the asterisk-ss7 mailing list". In case you were, this is why:
+
+I recently added a new channel type to zaptel which performs most of the real time work required to keep an MTP2 link alive in the kernel instead of in Asterisk/libss7. What does this mean for you? It means your links are going to be much more stable under system load.
+
+For most cases, the only thing now that will be able to knock your SS7 link down is if you are trying to echo cancel more channels than your CPU can handle (as echo cancellation is done in the same place as the kernel level MTP2). So if you have link stability problems still, it is likely your echo cancellation load is too high and you need to get a better CPU or a hardware echo canceller.
+
+Now, in order to update to use it, you need to get the latest version of Zaptel (1.4.11), libss7, and asterisk-1.6.0 (or Asterisk-trunk if you really still want to use it). Compile them in that order, and in zaptel.conf where you have the "dchan=" line for the signalling channel, change that to "mtp2=", run ztcfg, and, Voila!, it is done. Your existing zapata.conf should require no changes.
+
+This update is highly recommended, since the kernel is a much more appropriate place to do the work of a real time task like keeping FISUs and LSSUs constantly being sent on the line.
+
+For those that want the technical details of the new channel type, here is an explanation.
+
+Basically, it is similar to a dchan, so it does all you HDLC encoding and decoding, as well as CRC calculation and checking. The difference is that when you write messages on that channel, it automatically repeats the last one written. On the receive side, it compares the most recently received message with the last one received off the signalling link, and if it is different, it wakes up the Asterisk/libss7 process. If it is the same, it ignores it (so as not to have excessive and unnecessary user/kernel context switches).
+
+As always, if you have any questions, I am available on this list to answer them.
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/NEWS-08-12-2008
^
|
@@ -0,0 +1,60 @@
+Hey all,
+
+It's that time again, time for a news/status update for what's going on
+with libss7.
+
+1.0.0 Release:
+==============
+First of all, to let everyone know, we had a 1.0.0 release of libss7 a
+few weeks ago (and recently a 1.0.1 as well), so that's a good thing. I
+also would like to thank all of you that have had issues that have come
+to me with them. Because of one person on this list in particular, I
+think we have eliminating all the remaining critical bugs in libss7 that
+were causing crash related problems (under particular circumstances).
+
+Astricon 2008:
+==============
+For all of you that did not see my post about it earlier, I would love
+to see as many of you as can show up at Astricon this year (end of
+September). Like I mentioned, I'm going to be giving a talk about
+Asterisk and SS7. I'm planning on discussing basic configuration setup,
+common configuration problems that people run into and debugging
+techniques which can be used, as well as advanced topics such as the
+current "state of the art" with where libss7 is and some potential
+directions for future development with Asterisk and SS7.
+
+Also, I would like to (if there is enough interest) try to get together
+with some of you sometime that week to talk about the status of Asterisk
+and SS7 and what kinds of things that we can improve upon and work on in
+the future.
+
+Confidence Boosters:
+====================
+There are some very good and very interesting things that have been
+happening. If any of you know Joseph on this list, he works for a
+mobile phone company in Kentucky. He is using Asterisk with libss7 to
+provide voicemail services to his mobile subscribers.
+
+He has quite a good setup for helping me find issues, and is also a good
+indicator for how well libss7 is doing stability and scalability wise.
+Well the news is that running a current version of libss7/Asterisk-1.6.0
+branch he has been running a load over 100,000 calls per day for close
+to a month, with no link related stability problems and no Asterisk issues.
+
+I have heard much positive feedback from many of you about the more
+recent versions of libss7/Asterisk-1.6.0. If there are any of you out
+there with a setup that you would like to share about (especially if you
+think your setup is unusual in any way, whether it be high number of
+T1/E1s or high volume of call traffic) I personally would be very
+interested in hearing about them, publicly or privately if you do not
+feel you can disclose it to the list.
+
+New Features and Changes:
+=========================
+- Aside from the few outstanding bugs that were fixed, there is not much
+to talk about. We are getting quite a robust set of supported messages
+and parameters, which is making this section less prone to change. :-)
+
+As always, any of you have any questions or concern, please let me know.
+ You can get in contact with me with my contact information below.
+
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/NEWS-08-23-2006
^
|
@@ -0,0 +1,5 @@
+Hey all, just wanted to let anybody know that attempted to test libss7/asterisk-ss7 this last weekend, that if you had any build problems, they should be resolved now. In the course of some major merges that went into asterisk-trunk this last weekend, automerge failed on most of the developer branches (including my asterisk-ss7 branch). I just got it fixed this morning, so everything should work now and build properly.
+
+For the record, in case nobody noticed, thanks to Luciano Ramos on the asterisk-ss7 list, libss7 was tested and successfully was able to receive a call on a Siemens EWSD switch running the ITU variant of SS7. I added a section to the README file which gives the tested switch types that I have tested libss7 on. As soon as we got that done, I started working on circuit blocking/unblocking support. That should be in the asterisk-ss7 branch now to be tested. I still haven't gotten an ANSI link to work on, so that is still in the works, however I seem to be getting a lot of good feedback and interest from everybody for testing. Also, if nobody noticed the message I wrote this last week, I added another option to zapata.conf called defaultdpc which is for layer4 message routing, in case your desired destination point code is not the same as your adjacent node's point code (i.e. you have an STP or something between you and the remote end of your bearer channels, or simple A link support). That's pretty much all I can remember for now, but I'll try to keep the feature list documented in the README file for libss7. For all of you that offered links and resources, thanks again! You have been a tremendous help. Stay tuned for more soon :-)
+
+Matthew Fredrickson
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/NEWS-09-11-2006
^
|
@@ -0,0 +1,16 @@
+Hey all, long time no see, but I just wanted to give a status update on what is going on with libss7. Last week I was able to commit my alarm detection code (in case you get an alarm on your spans that have signalling channels). It should restart the link when it comes out of alarm fine. I think I need to get some more testing in though, since I mostly just wrote the code and did very rudimentary testing on it. I also just added today support in zapata.conf for national_spare and international_spare networkindicator options in case your link uses the spare network indicator values (someone on the list today had a problem with that).
+
+On an entirely different note, I got an ANSI style link working this week!!!! I didn't ask permission to see if they minded being mentioned, so I won't mention any names for now, however it was a night to remember. It was over a 56kbps link channel, using an older switch. It went surprisingly easier than I thought it would. MTP2 was already working well, MTP3 only had slight modifications, and ISUP had the most changes. Other than the fact that I'd never seen a 56kbps link before. Basically, the difference was that they don't use the top bit in a DS0 timeslot for HDLC code. So if you want to try out libss7 on your ANSI link, this is how you do it:
+
+Disclaimer: You have to be using either a TE2xxp or TE4xxp for this to work, since I used the hardware hdlc features of the framer of that card to do the 56kbps link.
+
+Get current zaptel-trunk, libss7, and asterisk-ss7 from svn (You may also have to get libpri, I haven't checked if chan_zap compiles cleanly without libpri installed)
+Build them, and install them.
+
+If you are using 56kbps links, when you load the wct4xxp.ko module, you have to pass it the parameter hardhdlcmode=0x7f and instead of using "dchan" in zaptel.conf for your signalling channel, you need to use "hardhdlc" on that channel.
+
+In zapata.conf, setup your link following the pattern in the sample zapata.conf that comes with asterisk-ss7 and set your ss7type=ansi. That should pretty much be it. All the rest of the configuration is the same.
+
+As always, if you have any more questions, comments, requests, or anything else that matter, let me know. I'd love to get feedback.
+
+Matthew Fredrickson
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/NEWS-09-27-2006
^
|
@@ -0,0 +1,12 @@
+Hey all, long time no update. I've had a lot of my time caught up in other projects of late, so I haven't had quite as much time to make major changes, however, here is a short list of things that have changed. First of all, if you haven't been monitoring the threads, with the release of the 1.4 beta branch, I was able to commit all of my asterisk-ss7 branch changes back into trunk. No, this does not mean that it will be in 1.4, but I'll probably be maintaining a 1.4 based branch with the ss7 changes once 1.4 is officially release. For now, if you want to play with libss7 and Asterisk, you will need to check out the trunk version of asterisk (`svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk). You still need to have the trunk versions of zaptel (`svn co http://svn.digium.com/svn/zaptel/trunk zaptel-trunk`) or the 1.4 beta release as well as the trunk version of libss7 (`svn co http://svn.digium.com/svn/libss7/trunk libss7`).
+
+Feature wise, I just added support for doing remote block requests from the asterisk command line, with the "ss7 block cic <linkset> <cic>" syntax. The first number is the linkset that you want to block the CIC on (from zapata.conf) and the second is the CIC on that linkset you wish to block. There is also a parallel unblock command (ss7 unblock cic <linkset> <cic>). I have been working some more on multilink support, so that's something we'll see in the future. I actually had a conference call with a couple of members of the community about SS7 and future development directions all over an ANSI ss7 link using libss7 and asterisk. It was a quite satisfying experience :-) The primary topics of conversation were regarding making asterisk be able to handle more trunks from one point code. These were the two basic directions for doing that that we thought of:
+
+The first was to add support in chan_zap (or a layer below that) for talking to MGCP gateways and being able to control them through that interface. The CICs on them would exist as "virtual" zap channels, and would be controlled as such. The media would just come in as RTP to asterisk, and everything would work very similarly to how things work right now. RTP re-invites could probably be done do take Asterisk out of the media as needed. It would require very little functionality changes within asterisk and the dialplan for that to work.
+
+The other direction was to add support for M3UA or a similar protocol to pass ISUP messages on a signalling gateway to other Asterisk boxes that actually terminate the CIC that is relevant to that particular message. This is useful, because then you could use asterisk as a media gateway as well as a signalling gateway, and is very much how asterisk likes to be anyways.
+
+On the whole it was fairly productive, as I have thought more about the second path, but the first one I had trouble conceptualizing how it would easily integrate in until we had that call. Now it seems to be a very technically attainable idea. As always, if anyone has any comments or suggestions, peer review is always welcome.
+
+Matthew Fredrickson
+
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/README
^
|
@@ -27,7 +27,7 @@
COLT
Thanks to:
-=======
+==========
Mark Spencer, for writing Asterisk and libpri and being such a great friend and boss.
Luciano Ramos, for donating a link in getting the first "real" ITU switch working.
@@ -40,32 +40,36 @@
To Use:
=======
-In order to use libss7, you must get at least the following versions of Zaptel and Asterisk:
-Zaptel: 1.4.x
-libss7: trunk (currently, there *only* is a trunk release).
-Asterisk: trunk
+In order to use libss7, you must get at least the following versions of DAHDI and Asterisk:
+DAHDI: 2.0.x
+libss7: 1.0.x or trunk
+Asterisk: 1.6.x
You must then do a `make; make install` in each of the directories that you installed
-in the given order (Zaptel first, libss7 second, and Asterisk last).
+in the given order (DAHDI first, libss7 second, and Asterisk last).
NOTE: In order to check out the code, you must have the subversion client installed. This
is how to check them out from the public subversion server.
These are the commands you would type to install them:
-`svn co http://svn.digium.com/svn/zaptel/branches/1.4 zaptel-1.4`
-`cd zaptel-1.4`
+`svn co http://svn.digium.com/svn/dahdi/linux/trunk dahdi-trunk`
+`cd dahdi-trunk`
`make; make install`
+`svn co http://svn.digium.com/svn/dahdi/tools/trunk dahdi-tools`
+`cd dahdi-tools`
+`./configure; make; make install`
+
`svn co http://svn.digium.com/svn/libss7/trunk libss7-trunk`
`cd libss7-trunk`
`make; make install`
-`svn co http://svn.digium.com/svn/asterisk/trunk asterisk-trunk`
-`cd asterisk-trunk`
+`svn co http://svn.digium.com/svn/asterisk/branches/1.6.0 asterisk-1.6.0`
+`cd asterisk-1.6.0`
`./configure; make; make install;`
-This should build Zaptel, libss7, and Asterisk with SS7 support.
+This should build DAHDI, libss7, and Asterisk with SS7 support.
In the past, there was a special asterisk-ss7 branch to use which contained the SS7 code.
That code has been merged back into the trunk version of Asterisk, and the old asterisk-ss7
@@ -74,18 +78,35 @@
instead.
CONFIGURATION:
-In zaptel.conf, your signalling channel(s) should be a "dchan" and your bearers should
-be set as "bchan".
+In /etc/dahdi/system.conf, your signalling channel(s) should be a "mtp2" (or "dchan" with a
+non Digium card) and your bearers should be set as "bchan".
+
+For example:
+span=1,1,0,esf,b8zs
+bchan=1-15,17-31
+mtp2=16
+#dchan=16 for non Digium cards
+
+NOTE: For 56k ANSI links, you must additionally set in /etc/dahdi/system.conf "56k=[channel number]"
+where 56k is like a flag for the mtp2 or dchan.
+
+For example:
+span=1,1,0,esf,b8zs
+bchan=1-23
+mtp2=24
+56k=24
-In the asterisk-ss7 branch, there is a sample zapata.conf that is installed which
-contains sample configuration for setting up an E1 link.
+In the sample config file in Asterisk-1.6, there is a sample SS7 setup which you can
+use to configured your link.
In brief, here is a simple ss7 linkset setup:
+chan_dahdi.conf
+===========
signalling = ss7
ss7type = itu ; or ansi if you are using an ANSI link
-linkset = 1 ; Pick a number for your linkset identifier in zapata.conf
+linkset = 1 ; Pick a number for your linkset identifier in chan_dahdi.conf
pointcode = 28 ; The decimal form of your point code. If you are using an
; ANSI linkset, you can use the xxx-xxx-xxx notation for
@@ -98,35 +119,58 @@
; Now we configure our Bearer channels (CICs)
-cicbeginswith = 1 ; Number to start counting the CICs from. So if Zap/1 to
- ; Zap/15 are CICs 1-15, you would set this to 1 before you
+cicbeginswith = 1 ; Number to start counting the CICs from. So if DAHDI/1 to
+ ; DAHDI/15 are CICs 1-15, you would set this to 1 before you
; declare channel=1-15
-channel=1-15 ; Use Zap/1-15 and assign them to CICs 1-15
+channel=1-15 ; Use DAHDI/1-15 and assign them to CICs 1-15
-cicbeginswith = 17 ; Now for Zap/17 to Zap/31, they are CICs 17-31 so we initialize
+cicbeginswith = 17 ; Now for DAHDI/17 to DAHDI/31, they are CICs 17-31 so we initialize
; cicbeginswith to 17 before we declare those channels
channel = 17-31 ; This assigns CICs 17-31 to channels 17-31
-sigchan = 16 ; This is where you declare which Zap channel is your signalling
- ; channel. In our case it is Zap/16. You can add redundant
+sigchan = 16 ; This is where you declare which DAHDI channel is your signalling
+ ; channel. In our case it is DAHDI/16. You can add redundant
; signalling channels by adding additional sigchan= lines.
; If we want an alternate redundant signalling channel add this
sigchan = 48 ; This would put two signalling channels in our linkset, one at
- ; Zap/16 and one at Zap/48 which both would be used to send/receive
+ ; DAHDI/16 and one at DAHDI/48 which both would be used to send/receive
; ISUP traffic.
-; End of zapata.conf
+; End of chan_dahdi.conf
-This is how a basic linkset is setup. For more detailed zapata.conf SS7 config information
-as well as other options available for that file, see the default zapata.conf that comes
+This is how a basic linkset is setup. For more detailed chan_dahdi.conf SS7 config information
+as well as other options available for that file, see the default chan_dahdi.conf that comes
with the samples in asterisk. If you would like, you can do a `make samples` in your
-asterisk-trunk directory and it will install a sample zapata.conf for you that contains
+asterisk directory and it will install a sample chan_dahdi.conf for you that contains
more information about SS7 setup.
+Asterisk channel variables which map to SS7 parameters:
+=======================================================
+SS7_CHARGE_NUMBER
+SS7_GENERIC_ADDRESS
+SS7_JIP
+SS7_GENERIC_DIGITS
+SS7_GENERIC_DIGTYPE (type of generic digits)
+SS7_GENERIC_DIGSCHEME
+SS7_ORIG_CALLED_NUM
+
+SS7_LSPI_IDENT (these three are used for RLT support on DMS switches)
+SS7_CALLREF_IDENT
+SS7_CALLREF_PC
+
+SS7_CALLING_PARTY_CATEGORY
+SS7_REDIRECTING_NUMBER
+SS7_GENERIC_NAME
+
+Most are fairly self explanatory as far as what they contain. It is also possible to set
+many of these parameters on outbound calls as well by prefixing the variable with an '_'
+when you set it.
+
+
Completed:
==========
MTP2 - Retransmissions are done correctly now from both sides.
@@ -148,6 +192,9 @@
Hop counter parameter
Carrier identification parameter - (very simple, not configurable)
SS7 debug looks *MUCH* nicer
+Kernel level MTP2 support (woohoo!) - See NEWS-05-30-2008 for more info
+* Many more messages are supported than are listed. isup.c is the best place to look.
+
TODO:
=====
@@ -157,7 +204,7 @@
Timer for last SU received so we know if layer2 goes out under us
long term:
-SCCP support
+SCTP support (seems more people are interested in that than SCCP)
For more information, please use the Asterisk-ss7 or Asterisk-dev mailing
lists (I monitor them regularly) or email me directly.
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/build_tools
^
|
+(directory)
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/build_tools/make_version
^
|
@@ -0,0 +1,72 @@
+#!/bin/sh
+
+if [ -f ${1}/.version ]; then
+ cat ${1}/.version
+elif [ -d .svn ]; then
+ PARTS=`LANG=C svn info ${1} | ${GREP} URL | ${AWK} '{print $2;}' | sed -e 's:^.*/svn/libss7/::' | sed -e 's:/: :g'`
+ BRANCH=0
+ TEAM=0
+ TAG=0
+
+ REV=`svnversion -c ${1} | cut -d: -f2`
+
+ BASE=`LANG=C svn pg svnmerge-integrated ${1} | cut -d: -f1`
+
+ if [ "${PARTS}" = "trunk" ] ; then
+ echo SVN-trunk-r${REV}
+ exit 0
+ fi
+
+ for PART in $PARTS ; do
+ if [ ${TAG} != 0 ] ; then
+ if [ "${PART}" = "autotag_for_be" ] ; then
+ continue
+ fi
+ if [ "${PART}" = "autotag_for_sx00i" ] ; then
+ continue
+ fi
+ RESULT="${PART}"
+ break
+ fi
+
+ if [ ${BRANCH} != 0 ] ; then
+ if [ -z ${RESULT} ] ; then
+ RESULT="${PART}"
+ else
+ RESULT="${RESULT}-${PART}"
+ fi
+ break
+ fi
+
+ if [ ${TEAM} != 0 ] ; then
+ if [ -z ${RESULT} ] ; then
+ RESULT="${PART}"
+ else
+ RESULT="${RESULT}-${PART}"
+ fi
+ continue
+ fi
+
+ if [ "${PART}" = "branches" ] ; then
+ BRANCH=1
+ RESULT="branch"
+ continue
+ fi
+
+ if [ "${PART}" = "tags" ] ; then
+ TAG=1
+ continue
+ fi
+
+ if [ "${PART}" = "team" ] ; then
+ TEAM=1
+ continue
+ fi
+ done
+
+ if [ ${TAG} != 0 ] ; then
+ echo ${RESULT}
+ else
+ echo SVN-${RESULT}-r${REV}${BASE:+-${BASE}}
+ fi
+fi
|
[-]
[+]
|
Added |
libss7-1.0.2.tar.gz/build_tools/make_version_c
^
|
@@ -0,0 +1,24 @@
+#!/bin/sh
+if [ ! -f ../.flavor ]; then
+ EXTRA=""
+else
+ aadkver=`cat ../.version`
+ aadkflavor=`cat ../.flavor`
+ EXTRA=" (${aadkflavor} ${aadkver})"
+fi
+cat << END
+/*
+ * version.c
+ * Automatically generated
+ */
+
+#include "libss7.h"
+
+static const char ss7_version[] = "${SS7VERSION}${EXTRA}";
+
+const char *ss7_get_version(void)
+{
+ return ss7_version;
+}
+
+END
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/isup.c
^
|
@@ -1,17 +1,33 @@
/*
-libss7: An implementation of Signalling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C) 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
-
-Contains definitions and data structurs for the ISUP portion of SS7
-*/
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
#include <string.h>
#include <stdlib.h>
@@ -109,7 +125,8 @@
{ISUP_CQM, 0, 1, 0, greset_params},
{ISUP_CQR, 0, 2, 0, cqr_params},
{ISUP_FAA, 1, 0, 1, faa_params},
- {ISUP_FAR, 1, 0, 1, far_params}
+ {ISUP_FAR, 1, 0, 1, far_params},
+ {ISUP_CFN, 0, 1, 0, rel_params}
};
static int isup_send_message(struct ss7 *ss7, struct isup_call *c, int messagetype, int parms[]);
@@ -169,6 +186,8 @@
return "CVT";
case ISUP_CVR:
return "CVR";
+ case ISUP_CFN:
+ return "CFN";
default:
return "Unknown";
}
@@ -423,6 +442,7 @@
static FUNC_RECV(calling_party_cat_receive)
{
+ c->calling_party_cat = parm[0];
return 1;
}
@@ -461,6 +481,15 @@
case 11:
cattype = "Calling subscriber with priority";
break;
+ case 12:
+ cattype = "Data Call (voice band data)";
+ break;
+ case 13:
+ cattype = "Test Call";
+ break;
+ case 15:
+ cattype = "Payphone";
+ break;
default:
cattype = "Unknown";
break;
@@ -592,6 +621,7 @@
static FUNC_RECV(backward_call_ind_receive)
{
+ c->called_party_status_ind = (parm[0] >> 2) & 0x3;
return 2;
}
@@ -638,6 +668,16 @@
static FUNC_DUMP(opt_backward_call_ind_dump)
{
+ unsigned char a, b, c, d;
+ a = parm[0] & 1;
+ b = (parm[0] >> 1) & 1;
+ c = (parm[0] >> 2) & 1;
+ d = (parm[0] >> 3) & 1;
+
+ ss7_message(ss7, "\t\t\tIn-band information indicator: %d\n", a);
+ ss7_message(ss7, "\t\t\tCall diversion may occur indicator: %d\n", b);
+ ss7_message(ss7, "\t\t\tSimple segmentation indicator: %d\n", c);
+ ss7_message(ss7, "\t\t\tMLPP user indicator: %d\n", d);
return 1;
}
@@ -1116,11 +1156,11 @@
return len;
}
-static FUNC_RECV(jip_transmit)
+static FUNC_SEND(jip_transmit)
{
int oddeven, datalen;
- if (c->jip_number && c->jip_number[0]) {
+ if (c->jip_number[0]) {
isup_put_number(&parm[0], c->jip_number, &datalen, &oddeven);
return datalen;
}
@@ -1420,10 +1460,14 @@
return len;
}
-static FUNC_SEND(generic_name_send)
+static FUNC_SEND(generic_name_transmit)
{
int namelen = strlen(c->generic_name);
+ /* Check to see if generic name is set before we try to add it */
+ if (!c->generic_name[0])
+ return 0;
+
parm[0] = (c->generic_name_typeofname << 5) | ((c->generic_name_avail & 0x1) << 4) | (c->generic_name_presentation & 0x3);
memcpy(&parm[1], c->generic_name, namelen);
@@ -1639,10 +1683,10 @@
hg_str = "incoming echo control device deactivation request";
break;
case 3:
- fe_str = "spare";
+ hg_str = "spare";
break;
default:
- fe_str = "unknown";
+ hg_str = "unknown";
break;
}
@@ -1932,7 +1976,7 @@
static struct parm_func parms[] = {
{ISUP_PARM_NATURE_OF_CONNECTION_IND, "Nature of Connection Indicator", nature_of_connection_ind_dump, nature_of_connection_ind_receive, nature_of_connection_ind_transmit },
{ISUP_PARM_FORWARD_CALL_IND, "Forward Call Indicators", forward_call_ind_dump, forward_call_ind_receive, forward_call_ind_transmit },
- {ISUP_PARM_CALLING_PARTY_CAT, "Calling Party Category", calling_party_cat_dump, calling_party_cat_receive, calling_party_cat_transmit},
+ {ISUP_PARM_CALLING_PARTY_CAT, "Calling Party's Category", calling_party_cat_dump, calling_party_cat_receive, calling_party_cat_transmit},
{ISUP_PARM_TRANSMISSION_MEDIUM_REQS, "Transmission Medium Requirements", transmission_medium_reqs_dump, transmission_medium_reqs_receive, transmission_medium_reqs_transmit},
{ISUP_PARM_USER_SERVICE_INFO, "User Service Information", NULL, user_service_info_receive, user_service_info_transmit},
{ISUP_PARM_CALLED_PARTY_NUM, "Called Party Number", called_party_num_dump, called_party_num_receive, called_party_num_transmit},
@@ -1951,7 +1995,7 @@
{ISUP_PARM_EGRESS_SERV, "Egress Service"},
{ISUP_PARM_GENERIC_ADDR, "Generic Address", generic_address_dump, generic_address_receive, generic_address_transmit},
{ISUP_PARM_GENERIC_DIGITS, "Generic Digits", generic_digits_dump, generic_digits_receive, generic_digits_transmit},
- {ISUP_PARM_GENERIC_NAME, "Generic Name", generic_name_dump, generic_name_receive, generic_name_send},
+ {ISUP_PARM_GENERIC_NAME, "Generic Name", generic_name_dump, generic_name_receive, generic_name_transmit},
{ISUP_PARM_TRANSIT_NETWORK_SELECTION, "Transit Network Selection", tns_dump, tns_receive, tns_transmit},
{ISUP_PARM_GENERIC_NOTIFICATION_IND, "Generic Notification Indication"},
{ISUP_PARM_PROPAGATION_DELAY, "Propagation Delay Counter", propagation_delay_cntr_dump},
@@ -1973,6 +2017,7 @@
{ISUP_PARM_LOCAL_SERVICE_PROVIDER_IDENTIFICATION, "Local Service Provider ID", lspi_dump, lspi_receive, lspi_transmit},
{ISUP_PARM_FACILITY_IND, "Facility Indicator", facility_ind_dump, facility_ind_receive, facility_ind_transmit},
{ISUP_PARM_REDIRECTING_NUMBER, "Redirecting Number", redirecting_number_dump, redirecting_number_receive, redirecting_number_transmit},
+ {ISUP_PARM_ACCESS_DELIVERY_INFO, "Access Delivery Information", },
};
static char * param2str(int parm)
@@ -2437,6 +2482,12 @@
} else {
cic = mh->cic[0] | ((mh->cic[1] & 0x3f) << 8);
}
+
+ ss7_message(ss7, "\t\tCIC: %d\n", cic);
+ ss7_dump_buf(ss7, 2, buf, 2);
+ ss7_message(ss7, "\t\tMessage Type: %s\n", message2str(mh->type), mh->type & 0xff);
+ ss7_dump_buf(ss7, 2, &buf[2], 1);
+
/* Find us in the message list */
for (x = 0; x < sizeof(messages)/sizeof(struct message_data); x++)
if (messages[x].messagetype == mh->type)
@@ -2447,11 +2498,6 @@
return -1;
}
- ss7_message(ss7, "\t\tCIC: %d\n", cic);
- ss7_dump_buf(ss7, 2, buf, 2);
- ss7_message(ss7, "\t\tMessage Type: %s\n", message2str(mh->type), mh->type & 0xff);
- ss7_dump_buf(ss7, 2, &buf[2], 1);
-
fixedparams = messages[ourmessage].mand_fixed_params;
varparams = messages[ourmessage].mand_var_params;
parms = messages[ourmessage].param_list;
@@ -2563,7 +2609,7 @@
if (ourmessage < 0) {
- ss7_error(ss7, "!! Unable to handle message of type 0x%x\n", mh->type);
+ ss7_error(ss7, "!! Unable to handle message of type 0x%x on CIC %d\n", mh->type, cic);
return -1;
}
@@ -2587,25 +2633,26 @@
/* Make sure we don't hijack a call associated isup_call for non call
* associated messages */
switch (mh->type) {
- case ISUP_BLO:
- case ISUP_BLA:
- case ISUP_UBL:
- case ISUP_UBA:
- case ISUP_CGB:
- case ISUP_CGBA:
- case ISUP_CGUA:
- case ISUP_CGU:
- case ISUP_UCIC:
- case ISUP_LPA:
- case ISUP_CCR:
- case ISUP_CVT:
- case ISUP_CVR:
+ /* All of these messages are ones where a persistent call is associated with them and
+ should not generate a new, unlinked call, or free a call (unless explicitly done, link in RLC) */
+ case ISUP_IAM:
+ case ISUP_ANM:
+ case ISUP_ACM:
+ case ISUP_CPG:
+ case ISUP_COT:
+ case ISUP_CON:
+ case ISUP_REL:
+ case ISUP_RLC:
+ case ISUP_RSC:
+ case ISUP_FAA:
+ case ISUP_FAR:
+ c = isup_find_call(ss7, rl, cic);
+ break;
+ default:
c = __isup_new_call(ss7, 1);
c->dpc = rl->opc;
c->cic = cic;
break;
- default:
- c = isup_find_call(ss7, rl, cic);
}
if (!c) {
@@ -2665,14 +2712,14 @@
}
}
- e = ss7_next_empty_event(ss7);
- if (!e) {
- ss7_error(ss7, "Event queue full, unable to get next empty event\n");
- return -1;
- }
-
switch (mh->type) {
case ISUP_IAM:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_IAM;
e->iam.cic = c->cic;
e->iam.transcap = c->transcap;
@@ -2712,10 +2759,17 @@
e->iam.redirecting_num_nai = c->redirecting_num_nai;
e->iam.redirecting_num_presentation_ind = c->redirecting_num_presentation_ind;
e->iam.redirecting_num_screening_ind = c->redirecting_num_screening_ind;
+ e->iam.calling_party_cat = c->calling_party_cat;
e->iam.call = c;
e->iam.opc = opc; /* keep OPC information */
return 0;
case ISUP_CQM:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CQM;
e->cqm.startcic = cic;
e->cqm.endcic = cic + c->range;
@@ -2723,6 +2777,12 @@
isup_free_call(ss7, c); /* Won't need this again */
return 0;
case ISUP_GRS:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_GRS;
e->grs.startcic = cic;
e->grs.endcic = cic + c->range;
@@ -2730,6 +2790,12 @@
e->grs.opc = opc; /* keep OPC information */
return 0;
case ISUP_GRA:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_GRA;
e->gra.startcic = cic;
e->gra.endcic = cic + c->range;
@@ -2740,12 +2806,24 @@
isup_free_call(ss7, c); /* Won't need this again */
return 0;
case ISUP_RSC:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_RSC;
e->rsc.cic = cic;
e->rsc.call = c;
e->rsc.opc = opc; /* keep OPC information */
return 0;
case ISUP_REL:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_REL;
e->rel.cic = c->cic;
e->rel.call = c;
@@ -2753,32 +2831,63 @@
e->rel.opc = opc; /* keep OPC information */
return 0;
case ISUP_ACM:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_ACM;
e->acm.cic = c->cic;
e->acm.call_ref_ident = c->call_ref_ident;
e->acm.call_ref_pc = c->call_ref_pc;
e->acm.call = c;
e->acm.opc = opc; /* keep OPC information */
+ e->acm.called_party_status_ind = c->called_party_status_ind;
return 0;
case ISUP_CON:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CON;
e->con.cic = c->cic;
e->con.call = c;
e->con.opc = opc; /* keep OPC information */
return 0;
case ISUP_ANM:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_ANM;
e->anm.cic = c->cic;
e->anm.call = c;
e->anm.opc = opc; /* keep OPC information */
return 0;
case ISUP_RLC:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_RLC;
e->rlc.cic = c->cic;
e->rlc.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_COT:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_COT;
e->cot.cic = c->cic;
e->cot.passed = c->cot_check_passed;
@@ -2786,51 +2895,99 @@
e->cot.opc = opc; /* keep OPC information */
return 0;
case ISUP_CCR:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CCR;
e->ccr.cic = c->cic;
e->ccr.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_CVT:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CVT;
e->cvt.cic = c->cic;
isup_free_call(ss7, c);
return 0;
case ISUP_BLO:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_BLO;
e->blo.cic = c->cic;
e->blo.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_UBL:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_UBL;
e->ubl.cic = c->cic;
e->ubl.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_BLA:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_BLA;
e->bla.cic = c->cic;
e->bla.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_LPA:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_LPA;
e->lpa.cic = c->cic;
e->lpa.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_UBA:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_UBA;
e->uba.cic = c->cic;
e->uba.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_CGB:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CGB;
e->cgb.startcic = cic;
e->cgb.endcic = cic + c->range;
- e->cgu.type = c->cicgroupsupervisiontype;
+ e->cgb.type = c->cicgroupsupervisiontype;
for (i = 0; i < (c->range + 1); i++)
e->cgb.status[i] = c->status[i];
@@ -2839,6 +2996,12 @@
isup_free_call(ss7, c);
return 0;
case ISUP_CGU:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CGU;
e->cgu.startcic = cic;
e->cgu.endcic = cic + c->range;
@@ -2851,26 +3014,50 @@
isup_free_call(ss7, c);
return 0;
case ISUP_CPG:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_CPG;
e->cpg.cic = c->cic;
e->cpg.opc = opc; /* keep OPC information */
e->cpg.event = c->event_info;
return 0;
case ISUP_UCIC:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_UCIC;
e->ucic.cic = c->cic;
e->ucic.opc = opc; /* keep OPC information */
isup_free_call(ss7, c);
return 0;
case ISUP_FAA:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_FAA;
e->faa.cic = c->cic;
e->faa.call_ref_ident = c->call_ref_ident;
e->faa.call_ref_pc = c->call_ref_pc;
- e->ucic.opc = opc; /* keep OPC information */
+ e->faa.opc = opc; /* keep OPC information */
e->faa.call = c;
return 0;
case ISUP_FAR:
+ e = ss7_next_empty_event(ss7);
+ if (!e) {
+ isup_free_call(ss7, c);
+ return -1;
+ }
+
e->e = ISUP_EVENT_FAR;
e->far.cic = c->cic;
e->far.call_ref_ident = c->call_ref_ident;
@@ -2879,8 +3066,8 @@
e->far.call = c;
return 0;
default:
- ss7_error(ss7, "!! Unable to handle message type %s\n", message2str(mh->type));
- return -1;
+ isup_free_call(ss7, c);
+ return 0;
}
}
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/isup.h
^
|
@@ -1,17 +1,34 @@
/*
-libss7: An implementation of Signalling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C) 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-Contains definitions and data structurs for the ISUP portion of SS7
-*/
#ifndef _SS7_ISUP_H
#define _SS7_ISUP_H
@@ -115,6 +132,7 @@
#define ISUP_PARM_LOCAL_SERVICE_PROVIDER_IDENTIFICATION 0xe4
#define ISUP_PARM_FACILITY_IND 0x18
#define ISUP_PARM_REDIRECTING_NUMBER 0x0b
+#define ISUP_PARM_ACCESS_DELIVERY_INFO 0x2e
/* ISUP Parameter Pseudo-type */
struct isup_parm_opt {
@@ -140,6 +158,7 @@
char called_party_num[ISUP_MAX_NUM];
unsigned char called_nai;
char calling_party_num[ISUP_MAX_NUM];
+ unsigned char calling_party_cat;
unsigned char calling_nai;
unsigned char presentation_ind;
unsigned char screening_ind;
@@ -191,6 +210,8 @@
struct isup_call *next;
/* set DPC according to CIC's DPC, not linkset */
unsigned int dpc;
+ /* Backward Call Indicator variables */
+ unsigned char called_party_status_ind;
};
int isup_receive(struct ss7 *ss7, struct mtp2 *sl, struct routing_label *rl, unsigned char *sif, int len);
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/libss7.h
^
|
@@ -1,16 +1,34 @@
/*
-libss7: An implementation of Signaling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-*/
#ifndef _LIBSS7_H
#define _LIBSS7_H
@@ -97,8 +115,9 @@
#define CPG_EVENT_CFU 0x06
/* SS7 transport types */
-#define SS7_TRANSPORT_ZAP 0
-#define SS7_TRANSPORT_TCP 1
+#define SS7_TRANSPORT_DAHDIDCHAN 0
+#define SS7_TRANSPORT_DAHDIMTP2 1
+#define SS7_TRANSPORT_TCP 2
struct ss7;
struct isup_call;
@@ -111,6 +130,7 @@
char called_party_num[50];
unsigned char called_nai;
char calling_party_num[50];
+ unsigned char calling_party_cat;
unsigned char calling_nai;
unsigned char presentation_ind;
unsigned char screening_ind;
@@ -192,6 +212,8 @@
unsigned int call_ref_pc;
unsigned int opc;
struct isup_call *call;
+ /* Backward call indicator */
+ unsigned char called_party_status_ind;
} ss7_event_acm;
typedef struct {
@@ -310,6 +332,9 @@
char * ss7_event2str(int event);
+const char *ss7_get_version(void);
+
+int ss7_pollflags(struct ss7 *ss7, int fd);
/* ISUP call related message functions */
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/mtp2.c
^
|
@@ -1,17 +1,33 @@
/*
-libss7: An implementation of Signaling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
-
-Contains user interface to ss7 library
-*/
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
#include "ss7_internal.h"
#include "mtp3.h"
@@ -67,14 +83,18 @@
static inline void init_mtp2_header(struct mtp2 *link, struct mtp_su_head *h, int new, int nack)
{
- if (new)
+ if (new) {
link->curfsn += 1;
+ link->flags |= MTP2_FLAG_WRITE;
+ }
h->fib = link->curfib;
h->fsn = link->curfsn;
- if (nack)
+ if (nack) {
link->curbib = !link->curbib;
+ link->flags |= MTP2_FLAG_WRITE;
+ }
h->bib = link->curbib;
h->bsn = link->lastfsnacked;
@@ -119,10 +139,19 @@
link->curbib = 1;
link->lastfsnacked = 127;
link->retransmissioncount = 0;
+ link->flags |= MTP2_FLAG_WRITE;
flush_bufs(link);
}
+
+static void mtp2_request_retransmission(struct mtp2 *link)
+{
+ link->retransmissioncount++;
+ link->curbib = !link->curbib;
+ link->flags |= MTP2_FLAG_WRITE;
+}
+
static int mtp2_queue_su(struct mtp2 *link, struct ss7_msg *m)
{
struct ss7_msg *cur;
@@ -217,6 +246,7 @@
{
struct ss7_msg *m;
+ link->flags |= MTP2_FLAG_WRITE;
/* Have to invert the current fib */
link->curfib = !link->curfib;
@@ -291,6 +321,10 @@
add_txbuf(link, m);
}
}
+
+ if (h == buf) { /* We just sent a non MSU */
+ link->flags &= ~MTP2_FLAG_WRITE;
+ }
}
return res;
@@ -301,6 +335,8 @@
int len = m->size - MTP2_SIZE;
struct mtp_su_head *h = (struct mtp_su_head *) m->buf;
+ link->flags |= MTP2_FLAG_WRITE;
+
init_mtp2_header(link, h, 1, 0);
if (len > MTP2_LI_MAX)
@@ -318,26 +354,15 @@
static int mtp2_lssu(struct mtp2 *link, int lssu_status)
{
+ link->flags |= MTP2_FLAG_WRITE;
link->autotxsutype = lssu_status;
return 0;
}
static int mtp2_fisu(struct mtp2 *link, int nack)
{
- struct ss7_msg *m;
- if (!nack) {
- link->autotxsutype = FISU;
- return 0;
- }
-
- /* We can't nack unless we actually send something */
- m = ss7_msg_new();
- if (!m) return -1;
-
- if (nack) make_fisu(link, m->buf, &m->size, nack);
-
- mtp2_queue_su(link, m);
-
+ link->flags |= MTP2_FLAG_WRITE;
+ link->autotxsutype = FISU;
return 0;
}
@@ -381,8 +406,6 @@
static int fisu_rx(struct mtp2 *link, struct mtp_su_head *h, int len)
{
- int res = 0;
-
if (link->lastsurxd == FISU)
return 0;
else
@@ -393,15 +416,19 @@
return mtp2_setstate(link, MTP_ALIGNEDREADY);
/* Just in case our timers are a little off */
case MTP_ALIGNEDREADY:
- return mtp2_setstate(link, MTP_INSERVICE);
+ mtp2_setstate(link, MTP_INSERVICE);
case MTP_INSERVICE:
+ if (h->fsn != link->lastfsnacked) {
+ mtp_message(link->master, "Received out of sequence FISU w/ fsn of %d, lastfsnacked = %d, requesting retransmission\n", h->fsn, link->lastfsnacked);
+ mtp2_request_retransmission(link);
+ }
break;
default:
mtp_message(link->master, "Huh?! Got FISU in link state %d\n", link->state);
return -1;
}
- return res;
+ return 0;
}
static void t1_expiry(void *data)
@@ -571,7 +598,17 @@
link->state = newstate;
return 0;
case MTP_INSERVICE:
- return to_idle(link);
+ if (newstate != MTP_INSERVICE) {
+ e = ss7_next_empty_event(link->master);
+ if (!e) {
+ mtp_error(link->master, "Could not queue event\n");
+ return -1;
+ }
+ e->gen.e = MTP2_LINK_DOWN;
+ e->gen.data = link->slc;
+ return to_idle(link);
+ }
+ break;
}
return 0;
}
@@ -668,18 +705,17 @@
if (h->fsn != ((link->lastfsnacked+1) % 128)) {
mtp_message(link->master, "Received out of sequence MSU w/ fsn of %d, lastfsnacked = %d, requesting retransmission\n", h->fsn, link->lastfsnacked);
- link->retransmissioncount++;
- link->curbib = !link->curbib;
+ mtp2_request_retransmission(link);
return 0;
}
/* Ok, it's a valid MSU now and we can accept it */
link->lastfsnacked = h->fsn;
+ /* Set write flag since we need to update the FISUs with our new BSN */
+ link->flags |= MTP2_FLAG_WRITE;
/* The big function */
res = mtp3_receive(link->master, link, h->data, len - MTP2_SU_HEAD_SIZE);
- if (res < 0) /* Problem in higher layer */
- mtp_error(link->master, "Received error from mtp3 layer: %d\n", res);
return res;
}
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/mtp2.h
^
|
@@ -1,15 +1,34 @@
/*
-libss7: An implementation of Signalling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C) 2006
-All Rights Reserved.
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
-*/
#ifndef _SS7_MTP_H
#define _SS7_MTP_H
@@ -90,6 +109,7 @@
unsigned char lastfsnacked:7;
unsigned char curbib:1;
int fd;
+ int flags;
/* Timers */
int t1;
@@ -118,6 +138,10 @@
struct ss7 *master;
};
+/* Flags for the struct mtp2 flags parameter */
+#define MTP2_FLAG_ZAPMTP2 (1 << 0)
+#define MTP2_FLAG_WRITE (1 << 1)
+
/* Initialize MTP link */
int mtp2_start(struct mtp2 *link, int emergency);
int mtp2_stop(struct mtp2 *link);
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/mtp3.c
^
|
@@ -1,16 +1,34 @@
/*
-libss7: An implementation of Signaling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
@@ -546,6 +564,14 @@
std_test_send(link);
}
+static void mtp3_event_link_down(struct mtp2 *link)
+{
+ struct ss7 *ss7 = link->master;
+
+ /* Make sure we notify MTP3 that the link went down beneath us */
+ mtp3_setstate_mtp2link(ss7, link, MTP2_LINKSTATE_DOWN);
+}
+
static struct mtp2 * slc_to_mtp2(struct ss7 *ss7, unsigned int slc)
{
int i = 0;
@@ -572,6 +598,10 @@
link = slc_to_mtp2(ss7, e->gen.data);
mtp3_event_link_up(link);
return e;
+ case MTP2_LINK_DOWN:
+ link = slc_to_mtp2(ss7, e->gen.data);
+ mtp3_event_link_down(link);
+ return e;
default:
return e;
}
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/mtp3.h
^
|
@@ -1,16 +1,34 @@
/*
-libss7: An implementation of Signaling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <matt@fredricknet.net>
-
-Copyright Digium, Inc. (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-*/
#ifndef _MTP3_H
#define _MTP3_H
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/parser_debug.c
^
|
@@ -1,3 +1,34 @@
+/*
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
+
#include <stdio.h>
#include <string.h>
#include "libss7.h"
@@ -43,7 +74,7 @@
printf("\n");
- ss7_add_link(ss7, SS7_TRANSPORT_ZAP, 10);
+ ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, 10);
ss7->debug = SS7_DEBUG_MTP2 | SS7_DEBUG_MTP3 | SS7_DEBUG_ISUP;
ss7->links[0]->state = MTP_INSERVICE;
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/ss7.c
^
|
@@ -1,22 +1,40 @@
/*
-libss7: An implementation of Signalling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
-
-Contains user interface to ss7 library
-*/
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <stdarg.h>
+#include <sys/ioctl.h>
+#include <sys/poll.h>
#include "libss7.h"
#include "ss7_internal.h"
#include "mtp2.h"
@@ -121,8 +139,10 @@
{
ss7_event *e;
- if (ss7->ev_len == MAX_EVENTS)
+ if (ss7->ev_len == MAX_EVENTS) {
+ ss7_error(ss7, "Event queue full!\n");
return NULL;
+ }
e = &ss7->ev_q[(ss7->ev_h + ss7->ev_len) % MAX_EVENTS];
ss7->ev_len += 1;
@@ -168,7 +188,15 @@
if (ss7->numlinks >= SS7_MAX_LINKS)
return -1;
- if (transport == SS7_TRANSPORT_ZAP) {
+ if (transport == SS7_TRANSPORT_TCP) {
+ }
+
+ if ((transport == SS7_TRANSPORT_DAHDIDCHAN) || (transport == SS7_TRANSPORT_DAHDIMTP2)) {
+ int zapmtp2 = 0;
+
+ if (transport == SS7_TRANSPORT_DAHDIMTP2)
+ zapmtp2 = 1;
+
m = mtp2_new(fd, ss7->switchtype);
if (!m)
@@ -177,15 +205,38 @@
m->slc = ss7->numlinks;
ss7->numlinks += 1;
m->master = ss7;
+ if (zapmtp2)
+ m->flags |= MTP2_FLAG_ZAPMTP2;
ss7->links[ss7->numlinks - 1] = m;
}
- if (transport == SS7_TRANSPORT_TCP) {
- /* TODO */
+ return 0;
+}
+
+int ss7_pollflags(struct ss7 *ss7, int fd)
+{
+ int i;
+ int winner = -1;
+ int flags = POLLPRI | POLLIN;
+
+ for (i = 0; i < ss7->numlinks; i++) {
+ if (ss7->links[i]->fd == fd) {
+ winner = i;
+ break;
+ }
}
+
+ if (winner < 0)
+ return -1;
- return 0;
+ if (ss7->links[winner]->flags & MTP2_FLAG_ZAPMTP2) {
+ if (ss7->links[winner]->flags & MTP2_FLAG_WRITE)
+ flags |= POLLOUT;
+ } else
+ flags |= POLLOUT;
+
+ return flags;
}
/* TODO: Add entry to routing table instead */
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/ss7_internal.h
^
|
@@ -1,16 +1,34 @@
/*
-libss7: An implementation of Signaling System 7
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
-Written by Matthew Fredrickson <creslin@digium.com>
-
-Copyright Digium, Inc. (C), 2006
-All Rights Reserved.
-
-This program is free software; you can redistribute it under the
-terms of the GNU General Public License as published by the Free
-Software Foundation
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
-*/
#ifndef _SS7_H
#define _SS7_H
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/ss7_sched.c
^
|
@@ -5,23 +5,28 @@
*
* scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
*
- * Copyright (C) 2005, Digium, Inc
+ * Copyright (C) 2006-2008, Digium, Inc
* All Rights Reserved.
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
*
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
*/
#include "libss7.h"
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/ss7linktest.c
^
|
@@ -1,3 +1,34 @@
+/*
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
+
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -10,7 +41,7 @@
#include <pthread.h>
#include <errno.h>
#include <time.h>
-#include <zaptel/zaptel.h>
+#include <dahdi/user.h>
#include "libss7.h"
struct linkset {
@@ -75,7 +106,7 @@
nextms += tv.tv_usec / 1000;
}
poller.fd = linkset->fd;
- poller.events = POLLIN | POLLOUT | POLLPRI;
+ poller.events = ss7_pollflags(ss7, linkset->fd);
poller.revents = 0;
res = poll(&poller, 1, nextms);
@@ -92,17 +123,17 @@
}
if (poller.revents & POLLPRI) {
- if (ioctl(linkset->fd, ZT_GETEVENT, &x)) {
+ if (ioctl(linkset->fd, DAHDI_GETEVENT, &x)) {
perror("Error in exception retrieval!\n");
}
switch (x) {
- case ZT_EVENT_OVERRUN:
+ case DAHDI_EVENT_OVERRUN:
printf("Overrun detected!\n");
break;
- case ZT_EVENT_BADFCS:
+ case DAHDI_EVENT_BADFCS:
printf("Bad FCS!\n");
break;
- case ZT_EVENT_ABORT:
+ case DAHDI_EVENT_ABORT:
printf("HDLC Abort!\n");
break;
default:
@@ -194,23 +225,34 @@
printf("%s", fmt);
}
-int zap_open(int devnum)
+int zap_open(int devnum, int *ismtp2)
{
int fd;
- ZT_BUFFERINFO bi;
- fd = open("/dev/zap/channel", O_RDWR|O_NONBLOCK, 0600);
- if ((fd < 0) || (ioctl(fd, ZT_SPECIFY, &devnum) == -1)) {
+ struct dahdi_bufferinfo bi;
+ struct dahdi_params z;
+ fd = open("/dev/dahdi/channel", O_RDWR|O_NONBLOCK, 0600);
+ if ((fd < 0) || (ioctl(fd, DAHDI_SPECIFY, &devnum) == -1)) {
printf("Could not open device %d: %s\n", devnum, strerror(errno));
return -1;
}
- bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
- bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+ bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+ bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
bi.numbufs = NUM_BUFS;
bi.bufsize = 512;
- if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+ if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
+ close(fd);
+ return -1;
+ }
+
+ if (ioctl(fd, DAHDI_GET_PARAMS, &z)) {
close(fd);
return -1;
}
+
+ if (z.sigtype == DAHDI_SIG_MTP2)
+ *ismtp2 = 1;
+ else
+ *ismtp2 = 0;
return fd;
}
@@ -220,7 +262,7 @@
printf("ss7linktest [sigchan number] [ss7 style - itu or ansi] [OPC - in decimal] [DPC - in decimal]\n");
printf("Example:\n");
printf("ss7linktest 16 itu 1 2\n");
- printf("This would run the linktest program on zap/16 with ITU style signalling, with an OPC of 1 and a DPC of 2\n");
+ printf("This would run the linktest program on dahdi/16 with ITU style signalling, with an OPC of 1 and a DPC of 2\n");
}
int main(int argc, char *argv[])
@@ -229,6 +271,7 @@
struct ss7 *ss7;
pthread_t tmp;
int channum;
+ int ismtp2;
unsigned int type;
if (argc < 5) {
@@ -249,7 +292,7 @@
opc = atoi(argv[3]);
dpc = atoi(argv[4]);
- fd = zap_open(channum);
+ fd = zap_open(channum, &ismtp2);
if (fd == -1)
return -1;
@@ -267,7 +310,7 @@
ss7_set_network_ind(ss7, SS7_NI_NAT);
ss7_set_debug(ss7, 0xfffffff);
- if ((ss7_add_link(ss7, SS7_TRANSPORT_ZAP, fd))) {
+ if ((ss7_add_link(ss7, ismtp2 ? SS7_TRANSPORT_DAHDIMTP2 : SS7_TRANSPORT_DAHDIDCHAN, fd))) {
perror("ss7_add_link");
exit(1);
}
|
[-]
[+]
|
Changed |
libss7-1.0.2.tar.gz/ss7test.c
^
|
@@ -1,3 +1,34 @@
+/*
+ * libss7: An implementation of Signalling System 7
+ *
+ * Written by Matthew Fredrickson <creslin@digium.com>
+ *
+ * scheduling routines taken from libpri by Mark Spencer <markster@digium.com>
+ *
+ * Copyright (C) 2006-2008, Digium, Inc
+ * All Rights Reserved.
+ */
+
+/*
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2 as published by the
+ * Free Software Foundation. See the LICENSE file included with
+ * this program for more details.
+ *
+ * In addition, when this program is distributed with Asterisk in
+ * any form that would qualify as a 'combined work' or as a
+ * 'derivative work' (but not mere aggregation), you can redistribute
+ * and/or modify the combination under the terms of the license
+ * provided with that copy of Asterisk, instead of the license
+ * terms granted here.
+ */
+
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
@@ -8,9 +39,7 @@
#include <pthread.h>
#include <errno.h>
#include <time.h>
-#ifdef LINUX
-#include <zaptel/zaptel.h>
-#endif
+#include <dahdi/user.h>
#include "libss7.h"
struct linkset {
@@ -73,7 +102,7 @@
#if LINUX
if (FD_ISSET(linkset->fd, &efds)) {
int x;
- if (ioctl(linkset->fd, ZT_GETEVENT, &x)) {
+ if (ioctl(linkset->fd, DAHDI_GETEVENT, &x)) {
perror("Error in exception retrieval!\n");
exit(-1);
}
@@ -132,17 +161,17 @@
int zap_open(int devnum)
{
int fd;
- ZT_BUFFERINFO bi;
- fd = open("/dev/zap/channel", O_RDWR|O_NONBLOCK, 0600);
- if ((fd < 0) || (ioctl(fd, ZT_SPECIFY, &devnum) == -1)) {
+ struct dahdi_bufferinfo bi;
+ fd = open("/dev/dahdi/channel", O_RDWR|O_NONBLOCK, 0600);
+ if ((fd < 0) || (ioctl(fd, DAHDI_SPECIFY, &devnum) == -1)) {
printf("Could not open device %d: %s\n", strerror(errno));
return -1;
}
- bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
- bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
+ bi.txbufpolicy = DAHDI_POLICY_IMMEDIATE;
+ bi.rxbufpolicy = DAHDI_POLICY_IMMEDIATE;
bi.numbufs = NUM_BUFS;
bi.bufsize = 512;
- if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
+ if (ioctl(fd, DAHDI_SET_BUFINFO, &bi)) {
close(fd);
return -1;
}
@@ -189,7 +218,7 @@
ss7_set_error(myprintf);
ss7_set_debug(ss7, 0xffffffff);
- if ((ss7_add_link(ss7, SS7_TRANSPORT_ZAP, fds[0]))) {
+ if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[0]))) {
perror("ss7_add_link");
exit(1);
}
@@ -206,7 +235,7 @@
ss7_set_debug(ss7, 0xffffffff);
linkset[1].linkno = 1;
- if ((ss7_add_link(ss7, SS7_TRANSPORT_ZAP, fds[1]))) {
+ if ((ss7_add_link(ss7, SS7_TRANSPORT_DAHDIDCHAN, fds[1]))) {
perror("ss7_add_link");
exit(1);
}
|
[-]
[+]
|
Deleted |
libss7-svn.tar.gz/mkdep
^
|
@@ -1,125 +0,0 @@
-#!/bin/bash -
-#
-# $OpenBSD: mkdep.gcc.sh,v 1.8 1998/09/02 06:40:07 deraadt Exp $
-# $NetBSD: mkdep.gcc.sh,v 1.9 1994/12/23 07:34:59 jtc Exp $
-#
-# Copyright (c) 1991, 1993
-# The Regents of the University of California. All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in the
-# documentation and/or other materials provided with the distribution.
-# 3. All advertising materials mentioning features or use of this software
-# must display the following acknowledgement:
-# This product includes software developed by the University of
-# California, Berkeley and its contributors.
-# 4. Neither the name of the University nor the names of its contributors
-# may be used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
-# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
-# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-# SUCH DAMAGE.
-#
-# @(#)mkdep.gcc.sh 8.1 (Berkeley) 6/6/93
-#
-
-D=.depend # default dependency file is .depend
-append=0
-pflag=
-
-while :
- do case "$1" in
- # -a appends to the depend file
- -a)
- append=1
- shift ;;
-
- # -f allows you to select a makefile name
- -f)
- D=$2
- shift; shift ;;
-
- # the -p flag produces "program: program.c" style dependencies
- # so .o's don't get produced
- -p)
- pflag=p
- shift ;;
- *)
- break ;;
- esac
-done
-
-if [ $# = 0 ] ; then
- echo 'usage: mkdep [-p] [-f depend_file] [cc_flags] file ...'
- exit 1
-fi
-
-DTMP=/tmp/mkdep$$
-TMP=$DTMP/mkdep
-
-um=`umask`
-umask 022
-if ! mkdir $DTMP ; then
- echo failed to create tmp dir $DTMP
- exit 1
-fi
-
-umask $um
-trap 'rm -rf $DTMP ; trap 2 ; kill -2 $$' 1 2 3 13 15
-
-if [ x$pflag = x ]; then
- ${CC:-cc} -M "$@" 2>/dev/null | sed -e 's; \./; ;g' > $TMP
-else
- ${CC:-cc} -M "$@" 2>/dev/null | sed -e 's;\.o :; :;' -e 's; \./; ;g' > $TMP
-fi
-
-if [ $? != 0 ]; then
- echo 'mkdep: compile failed.'
- rm -rf $DTMP
- exit 1
-fi
-
-if [ $append = 1 ]; then
- cat $TMP >> $D
- if [ $? != 0 ]; then
- echo 'mkdep: append failed.'
- rm -rf $DTMP
- exit 1
- fi
- cat $TMP | sed -e 's/\.o:/.lo:/g' >>$D
- if [ $? != 0 ]; then
- echo 'mkdep: append failed.'
- rm -rf $DTMP
- exit 1
- fi
-else
- cat $TMP > $D
- if [ $? != 0 ]; then
- echo 'mkdep: overwrite failed.'
- rm -rf $DTMP
- exit 1
- fi
- cat $TMP | sed -e 's/\.o:/.lo:/g' >>$D
- if [ $? != 0 ]; then
- echo 'mkdep: append failed.'
- rm -rf $DTMP
- exit 1
- fi
-fi
-
-rm -rf $DTMP
-exit 0
|