1 #ifndef __SIP_CLIENT_H__
2 #define __SIP_CLIENT_H__
4 #include <tapi-stream.h>
5 #include <tapi-device.h>
9 #include <pjsip_simple.h>
10 #include <pjlib-util.h>
14 #include <sys/socket.h>
20 struct sip_client_config
{
28 const char *stun_host
;
33 const struct sip_client_config
*config
;
35 struct tapi_device
*tdev
;
36 struct stun_client
*stun
;
38 struct sockaddr_storage public_addr
;
39 struct sockaddr_storage local_addr
;
43 pj_thread_t
*sip_thread
;
46 pjsip_endpoint
*sip_endpt
;
48 pj_str_t local_contact
;
53 int (*incoming_call_cb
)(struct sip_client
*client
, struct sip_agent
*agent
);
56 void sip_client_init(struct sip_client
*client
, struct tapi_device
*dev
,
57 const struct sip_client_config
*config
);
59 struct sip_agent
*sip_client_alloc_agent(struct sip_client
*client
, const char *dst_uri
);