[commit] r5161 - in freeswitch/trunk: libs/iax/src src/mod/endpoints/mod_iax
Author: mikej Date: Fri May 11 22:09:59 2007 New Revision: 5161 Modified: freeswitch/trunk/libs/iax/src/iax.c freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Log: expose a few more iax packets to the application and kindof handle them. Modified: freeswitch/trunk/libs/iax/src/iax.c ============================================================================== --- freeswitch/trunk/libs/iax/src/iax.c (original) +++ freeswitch/trunk/libs/iax/src/iax.c Fri May 11 22:09:59 2007 @@ -1586,7 +1586,7 @@ case IAX_EVENT_POKE: event->etype = IAX_EVENT_PONG; iax_send_pong(event->session, event->ts); - destroy_session(event->session); + iax_destroy(event->session); iax_event_free(event); break; default: @@ -2683,7 +2683,8 @@ case IAX_COMMAND_POKE: e->etype = IAX_EVENT_POKE; e->ts = ts; - break; case IAX_COMMAND_PING: + break; + case IAX_COMMAND_PING: /* PINGS and PONGS don't get scheduled; */ e->etype = IAX_EVENT_PING; e->ts = ts; @@ -2718,6 +2719,14 @@ } e = schedule_delivery(e, ts, updatehistory); break; + case IAX_COMMAND_REGREQ: + e->etype = IAX_EVENT_REGREQ; + e = schedule_delivery(e, ts, updatehistory); + break; + case IAX_COMMAND_REGREL: + e->etype = IAX_EVENT_REGREQ; + e = schedule_delivery(e, ts, updatehistory); + break; case IAX_COMMAND_REGACK: e->etype = IAX_EVENT_REGACK; e = schedule_delivery(e, ts, updatehistory); Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c Fri May 11 22:09:59 2007 @@ -1036,6 +1036,12 @@ case IAX_EVENT_REGREJ: switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Registration failed.\n"); break; + case IAX_EVENT_REGREQ: + /* what is the right way to handle this? */ + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "Registration request ignored, not implemented.\n"); + iax_destroy(iaxevent->session); + iaxevent->session = NULL; + break; case IAX_EVENT_TIMEOUT: break; case IAX_EVENT_ACCEPT:
participants (1)
-
Freeswitch SVN