#include <ortp/rtpsession.h>
Include dependency graph for telephonyevents.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Definition in file telephonyevents.h.
int rtp_session_add_telephone_event | ( | RtpSession * | session, | |
mblk_t * | packet, | |||
uint8_t | event, | |||
int | end, | |||
uint8_t | volume, | |||
uint16_t | duration | |||
) |
session | a rtp session. | |
packet | a rtp packet as a mblk_t | |
event | the event type as described in rfc2833, ie one of the TEV_* macros. | |
end | a boolean to indicate if the end bit should be set. (end of tone) | |
volume | the volume of the telephony tone, as described in rfc2833 | |
duration | the duration of the telephony tone, in timestamp unit. |
Definition at line 136 of file telephonyevents.c.
References msgb::b_cont, msgb::b_datap, msgb::b_wptr, datab::db_lim, _telephone_event::duration, _telephone_event::E, _telephone_event::event, _telephone_event::R, TELEPHONY_EVENTS_ALLOCATED_SIZE, and _telephone_event::volume.
mblk_t* rtp_session_create_telephone_event_packet | ( | RtpSession * | session, | |
int | start | |||
) |
Allocates a new rtp packet to be used to add named telephony events. The application can use then rtp_session_add_telephone_event() to add named events to the packet. Finally the packet has to be sent with rtp_session_sendm_with_ts().
session | a rtp session. | |
start | boolean to indicate if the marker bit should be set. |
Definition at line 95 of file telephonyevents.c.
References msgb::b_rptr, msgb::b_wptr, rtp_header::cc, rtp_header::extbit, rtp_header::markbit, rtp_header::padbit, rtp_header::paytype, _RtpSession::snd, _RtpSession::ssrc, rtp_header::ssrc, _RtpSession::telephone_events_pt, TELEPHONY_EVENTS_ALLOCATED_SIZE, and rtp_header::version.
int rtp_session_read_telephone_event | ( | RtpSession * | session, | |
mblk_t * | packet, | |||
telephone_event_t ** | tab | |||
) |
Reads telephony events from a rtp packet. * points to the beginning of the event buffer.
session | a rtp session from which telephony events are received. | |
packet | a rtp packet as a mblk_t. | |
tab | the address of a pointer. |
Definition at line 304 of file telephonyevents.c.
References msgb::b_cont, msgb::b_rptr, rtp_header::paytype, _RtpSession::rcv, and _RtpSession::telephone_events_pt.
int rtp_session_recv_telephone_events_supported | ( | RtpSession * | session | ) |
Tells whether telephone event payload type is supported for receiving within the context of the rtp session.
session | a rtp session |
Definition at line 74 of file telephonyevents.c.
int rtp_session_send_dtmf | ( | RtpSession * | session, | |
char | dtmf, | |||
uint32_t | userts | |||
) |
This functions creates telephony events packets for dtmf and sends them. It uses rtp_session_create_telephone_event_packet() and rtp_session_add_telephone_event() to create them and finally rtp_session_sendm_with_ts() to send them.
session | a rtp session | |
dtmf | a character meaning the dtmf (ex: '1', '#' , '9' ...) | |
userts | the timestamp |
Definition at line 172 of file telephonyevents.c.
int rtp_session_send_dtmf2 | ( | RtpSession * | session, | |
char | dtmf, | |||
uint32_t | userts, | |||
int | duration | |||
) |
A variation of rtp_session_send_dtmf() with duration specified.
session | a rtp session | |
dtmf | a character meaning the dtmf (ex: '1', '#' , '9' ...) | |
userts | the timestamp | |
duration | duration of the dtmf in timestamp units |
Definition at line 186 of file telephonyevents.c.
References TEV_DTMF_0, TEV_DTMF_1, TEV_DTMF_2, TEV_DTMF_3, TEV_DTMF_4, TEV_DTMF_5, TEV_DTMF_6, TEV_DTMF_7, TEV_DTMF_8, TEV_DTMF_9, TEV_DTMF_A, TEV_DTMF_B, TEV_DTMF_C, TEV_DTMF_D, TEV_DTMF_POUND, TEV_DTMF_STAR, and TEV_FLASH.
int rtp_session_send_telephone_events_supported | ( | RtpSession * | session | ) |
Tells whether telephone event payload type is supported for send within the context of the rtp session.
session | a rtp session |
Definition at line 60 of file telephonyevents.c.
References _RtpSession::profile, _RtpSession::snd, and _RtpSession::telephone_events_pt.
int rtp_session_telephone_events_supported | ( | RtpSession * | session | ) |
Tells whether telephony events payload type is supported within the context of the rtp session.
session | a rtp session |
Definition at line 43 of file telephonyevents.c.
References _RtpSession::profile, _RtpSession::rcv, _RtpSession::snd, and _RtpSession::telephone_events_pt.