[Asterisk-Dev] channel module ast_rtp questions

Kevin P. Fleming kpfleming at starnetworks.us
Mon Mar 14 21:57:50 MST 2005


Alper Akçan wrote:


> 1. I call asterisk from IP phone (SIP)
> 2. asterisk sip channel creates a rtp struct for ip phone, and says 
> "congradulations, ..." over rtp.
> 3. I dial the extension of my channel module, and asterisk calls 
> module_call() function.
> 4. I get the ip telephones ip and the rtp port from last_one, and tell 
> the device "start rtp connections with this ip:port". so bypassing the 
> asterisk.

Yeah, that's pretty ugly... but you already know that.

> 1. create a rtp for the device via ast_rtp_new() when astersik calls
> module_answer()
> 2. call ast_rtp_read() when module_read() function called. Get the rtp data
> from the device and give it to asterisk.
> 3. call ast_rtp_write() when module_write() function called. get the rtp
> data from asterisk and give it to the device.

You'll have to use one of the existing RTP-using modules as a template; 
chan_mgcp is probably the best one to try to learn from, as it's smaller 
and simpler than chan_sip and chan_h323.



More information about the asterisk-dev mailing list