<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
Hello,<br>I am writing my own freeswitch module and have implemented 2 hooks for reading and writing audio (I did not implement the endpoint interface).<br>My problem is that the channel_write_frame and channel_read_frame callback-functions are only called if I make an intercept with another session (switch_ivr_intercept_session), but my usecase has only one single Session for getting and putting audio data in my module. <br><br>How can I achieve this? <br>scaram<br><br>/* on channel init I answer the session and set hooks */<br>static switch_status_t channel_on_init(switch_core_session_t *session)<br>{<br>&nbsp;&nbsp; &nbsp;switch_channel_t *channel = switch_core_session_get_channel(session);<br>&nbsp;&nbsp; &nbsp;switch_channel_answer(channel);<br><br>&nbsp;&nbsp; &nbsp;switch_channel_set_state(channel, CS_EXCHANGE_MEDIA);<br>&nbsp;&nbsp; &nbsp;switch_set_flag(tech_pvt, TFLAG_IO);<br><br>&nbsp;&nbsp; &nbsp;switch_core_event_hook_add_write_frame(session, &amp;channel_write_frame);<br>&nbsp;&nbsp; &nbsp;switch_core_event_hook_add_read_frame(session, &amp;channel_read_frame);<br>}<br><br>static switch_status_t channel_write_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)<br>{<br>&nbsp;&nbsp; &nbsp;/* is only called when I intercept 2 Sessions */<br>}<br>static switch_status_t channel_read_frame(switch_core_session_t *session, switch_frame_t *frame, switch_io_flag_t flags, int stream_id)<br>{<br>&nbsp;&nbsp; &nbsp;/* is only called when I intercept 2 Sessions */<br>}<br><br><br>                                               <br /><hr />Ein Postfach für Alles –   <a href='http://redirect.gimas.net/?n=M1003HM5Adressen' target='_new'>bei Hotmail 5 E-Mail-Adressen online verwalten!</a></body>
</html>