mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-12 20:27:19 +00:00
improved phase_b_handler
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9436 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
41f7634d89
commit
3b964e9a57
@ -46,10 +46,12 @@ static void span_message(int level, const char *msg)
|
|||||||
{
|
{
|
||||||
int fs_log_level;
|
int fs_log_level;
|
||||||
|
|
||||||
// TODO: maybe is better to use switch_assert here?
|
/* TODO: maybe is better to use switch_assert here?
|
||||||
if (msg==NULL) {
|
if (msg==NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
switch_assert(msg!=NULL);
|
||||||
|
|
||||||
switch (level)
|
switch (level)
|
||||||
{
|
{
|
||||||
@ -85,25 +87,18 @@ static void span_message(int level, const char *msg)
|
|||||||
static int phase_b_handler(t30_state_t *s, void *user_data, int result)
|
static int phase_b_handler(t30_state_t *s, void *user_data, int result)
|
||||||
{
|
{
|
||||||
int session;
|
int session;
|
||||||
|
const char *u = NULL;
|
||||||
switch_assert(user_data != NULL);
|
switch_assert(user_data != NULL);
|
||||||
session = (intptr_t) user_data;
|
session = (intptr_t) user_data;
|
||||||
/* TODO */
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "==============================================================================\n");
|
||||||
#if TODO
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Phase B: handler on session %d - (0x%X) %s\n", session, result, t30_frametype(result));
|
||||||
if ((u = t30_get_rx_ident(s)))
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote ident: %s\n", t30_get_rx_ident(s));
|
||||||
printf("%d: Phase B: remote ident '%s'\n", i, u);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote sub-address: %s\n", t30_get_rx_sub_address(s));
|
||||||
if ((u = t30_get_rx_sub_address(s)))
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote polled sub-address: %s\n", t30_get_rx_polled_sub_address(s));
|
||||||
printf("%d: Phase B: remote sub-address '%s'\n", i, u);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote sel. polling addr.: %s\n", t30_get_rx_selective_polling_address(s));
|
||||||
if ((u = t30_get_rx_polled_sub_address(s)))
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote sender ident: %s\n", t30_get_rx_sender_ident(s));
|
||||||
printf("%d: Phase B: remote polled sub-address '%s'\n", i, u);
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "remote password: %s\n", t30_get_rx_password(s));
|
||||||
if ((u = t30_get_rx_selective_polling_address(s)))
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "==============================================================================\n");
|
||||||
printf("%d: Phase B: remote selective polling address '%s'\n", i, u);
|
|
||||||
if ((u = t30_get_rx_sender_ident(s)))
|
|
||||||
printf("%d: Phase B: remote sender ident '%s'\n", i, u);
|
|
||||||
if ((u = t30_get_rx_password(s)))
|
|
||||||
printf("%d: Phase B: remote password '%s'\n", i, u);
|
|
||||||
printf("%d: Phase B handler on channel %d - (0x%X) %s\n", i, i, result, t30_frametype(result));
|
|
||||||
#endif
|
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Phase B handler on session %d - (0x%X) %s\n", session, result, t30_frametype(result));
|
|
||||||
return T30_ERR_OK;
|
return T30_ERR_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user