cleanup
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@129 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
40824bc41a
commit
7db337c1e3
|
@ -13,3 +13,4 @@ mod_iaxchan
|
|||
#mod_opalchan
|
||||
mod_codec_g729
|
||||
mod_event_test
|
||||
mod_portaudio
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
LDFLAGS += -lportaudio -L/usr/local/lib
|
||||
|
||||
$(MOD).so: $(MOD).c
|
||||
$(CC) $(CFLAGS) -fPIC -c $(MOD).c -o $(MOD).o
|
||||
$(CC) -shared -Xlinker -x -o $(MOD).so $(MOD).o $(LDFLAGS)
|
||||
|
||||
all: $(MOD).so
|
||||
|
||||
clean:
|
||||
rm -fr *.so *.o *~
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
static const char modname[] = "mod_portaudio";
|
||||
|
||||
static switch_memory_pool *module_pool;
|
||||
static int running = 1;
|
||||
//static int running = 1;
|
||||
|
||||
#define SAMPLE_TYPE paInt16
|
||||
typedef short SAMPLE;
|
||||
|
@ -112,8 +112,8 @@ static int get_dev_by_name(char *name, int in);
|
|||
static switch_status place_call(char *dest, char *out, size_t outlen);
|
||||
static switch_status hup_call(char *callid, char *out, size_t outlen);
|
||||
static switch_status call_info(char *callid, char *out, size_t outlen);
|
||||
static void send_dtmf(char *callid, char *out, size_t outlen);
|
||||
static void answer_call(char *callid, char *out, size_t outlen);
|
||||
static switch_status send_dtmf(char *callid, char *out, size_t outlen);
|
||||
static switch_status answer_call(char *callid, char *out, size_t outlen);
|
||||
|
||||
/*
|
||||
State methods they get called when the state changes to the specific state
|
||||
|
@ -268,7 +268,6 @@ static switch_status channel_outgoing_channel(switch_core_session *session, swit
|
|||
struct private_object *tech_pvt;
|
||||
switch_channel *channel, *orig_channel;
|
||||
switch_caller_profile *caller_profile, *originator_caller_profile = NULL;
|
||||
unsigned int req = 0, cap = 0;
|
||||
|
||||
if ((tech_pvt = (struct private_object *) switch_core_session_alloc(*new_session, sizeof(struct private_object)))) {
|
||||
memset(tech_pvt, 0, sizeof(*tech_pvt));
|
||||
|
@ -808,13 +807,13 @@ static switch_status hup_call(char *callid, char *out, size_t outlen)
|
|||
}
|
||||
|
||||
|
||||
static void send_dtmf(char *callid, char *out, size_t outlen)
|
||||
static switch_status send_dtmf(char *callid, char *out, size_t outlen)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_channel *channel = NULL;
|
||||
char *dtmf;
|
||||
|
||||
if (dtmf = strchr(callid, ' ')) {
|
||||
if ((dtmf = strchr(callid, ' '))) {
|
||||
*dtmf++ = '\0';
|
||||
} else {
|
||||
dtmf = "";
|
||||
|
@ -828,9 +827,11 @@ static void send_dtmf(char *callid, char *out, size_t outlen)
|
|||
} else {
|
||||
strncpy(out, "NO SUCH CALL", outlen - 1);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static void answer_call(char *callid, char *out, size_t outlen)
|
||||
static switch_status answer_call(char *callid, char *out, size_t outlen)
|
||||
{
|
||||
struct private_object *tech_pvt = NULL;
|
||||
switch_channel *channel = NULL;
|
||||
|
@ -843,6 +844,7 @@ static void answer_call(char *callid, char *out, size_t outlen)
|
|||
} else {
|
||||
strncpy(out, "NO SUCH CALL", outlen - 1);
|
||||
}
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
|
@ -879,4 +881,4 @@ static switch_status call_info(char *callid, char *out, size_t outlen)
|
|||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue