Changes to allow receiving japanese callerid (Bug #5928)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7842 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Fredrickson
2006-01-06 20:03:20 +00:00
parent 1fe5108763
commit 4401b7e67f
3 changed files with 322 additions and 9 deletions

View File

@@ -41,6 +41,7 @@
#define CID_SIG_BELL 1
#define CID_SIG_V23 2
#define CID_SIG_DTMF 3
#define CID_SIG_V23_JP 4
#define CID_START_RING 1
#define CID_START_POLARITY 2
@@ -92,6 +93,18 @@ extern struct callerid_state *callerid_new(int cid_signalling);
*/
extern int callerid_feed(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
/*! \brief Read samples into the state machine.
* \param cid Which state machine to act upon
* \param ubuf containing your samples
* \param samples number of samples contained within the buffer.
* \param codec which codec (AST_FORMAT_ALAW or AST_FORMAT_ULAW)
*
* Send received audio to the Caller*ID demodulator (for japanese style lines).
* \return Returns -1 on error, 0 for "needs more samples",
* and 1 if the CallerID spill reception is complete.
*/
extern int callerid_feed_jp(struct callerid_state *cid, unsigned char *ubuf, int samples, int codec);
/*! \brief Extract info out of callerID state machine. Flags are listed above
* \param cid Callerid state machine to act upon
* \param number Pass the address of a pointer-to-char (will contain the phone number)