| 1 | #ifndef __PHCALL_H__ |
|---|
| 2 | #define __PHCALL_H__ 1 |
|---|
| 3 | |
|---|
| 4 | #ifndef PH_MAX_CALLS |
|---|
| 5 | #define PH_MAX_CALLS 32 |
|---|
| 6 | #endif |
|---|
| 7 | #define PH_MAX_STREAMS 8 |
|---|
| 8 | |
|---|
| 9 | #ifdef __cplusplus |
|---|
| 10 | extern "C" |
|---|
| 11 | { |
|---|
| 12 | #endif |
|---|
| 13 | |
|---|
| 14 | struct ph_config_s; |
|---|
| 15 | |
|---|
| 16 | struct ph_msession_s; |
|---|
| 17 | |
|---|
| 18 | struct phcall { |
|---|
| 19 | int cid; |
|---|
| 20 | int did; |
|---|
| 21 | int tid; /* FIXME: transaction id for incoming calls */ |
|---|
| 22 | int txcid; /* call id to which we're trasferring this call */ |
|---|
| 23 | int vlid; /* virtual line id */ |
|---|
| 24 | int redirs; |
|---|
| 25 | char remote_sdp_audio_ip[64]; |
|---|
| 26 | int remote_sdp_audio_port; |
|---|
| 27 | char remote_sdp_video_ip[64]; |
|---|
| 28 | int remote_sdp_video_port; |
|---|
| 29 | char audio_payload_name[32]; |
|---|
| 30 | int audio_payload; |
|---|
| 31 | char video_payload_name[32]; |
|---|
| 32 | int video_payload; |
|---|
| 33 | int wanted_streams; |
|---|
| 34 | int local_sdp_audio_port; |
|---|
| 35 | int local_sdp_video_port; |
|---|
| 36 | struct ph_config_s *cfg; |
|---|
| 37 | int _hasaudio; |
|---|
| 38 | int isringing; |
|---|
| 39 | int remotehold; |
|---|
| 40 | int localhold; |
|---|
| 41 | int localresume; |
|---|
| 42 | int localrefer; |
|---|
| 43 | int remoterefer; |
|---|
| 44 | #if 0 |
|---|
| 45 | void *ph_audio_stream; |
|---|
| 46 | #endif |
|---|
| 47 | void *ph_video_stream; /* structure holding specific information on the video stream. NULL when the stream is not activated */ |
|---|
| 48 | int rcid; /* Call ID for the call created by REFER */ |
|---|
| 49 | int rdid; /* REFER did */ |
|---|
| 50 | int closereq; /* close requested by lowerl layer */ |
|---|
| 51 | char cng_name[32]; |
|---|
| 52 | char cname[64]; /* CNAME Field for RTCP reports */ |
|---|
| 53 | int cng; |
|---|
| 54 | int nego_mflags; /* current negociated media flags for the call */ |
|---|
| 55 | int user_mflags; /* user media flags for the call (flags given by the user when placing or accepting the call) */ |
|---|
| 56 | struct ph_msession_s *mses; |
|---|
| 57 | char *audiodev; |
|---|
| 58 | char *videodev; |
|---|
| 59 | struct _sdp_context *sdpctx; |
|---|
| 60 | struct ph_stream_params *streams[PH_MAX_STREAMS]; |
|---|
| 61 | }; |
|---|
| 62 | |
|---|
| 63 | typedef struct phcall phcall_t; |
|---|
| 64 | |
|---|
| 65 | /* |
|---|
| 66 | * phcall search functions |
|---|
| 67 | * |
|---|
| 68 | */ |
|---|
| 69 | |
|---|
| 70 | phcall_t *ph_locate_call_by_cid(int cid); |
|---|
| 71 | phcall_t *ph_locate_call_by_rcid(int cid); |
|---|
| 72 | phcall_t *ph_locate_call_by_rdid(int did); |
|---|
| 73 | |
|---|
| 74 | #ifdef __cplusplus |
|---|
| 75 | } |
|---|
| 76 | #endif |
|---|
| 77 | |
|---|
| 78 | #endif |
|---|