diff --git a/libbaresip/baresip/include/baresip.h b/libbaresip/baresip/include/baresip.h index 5e75ee9..74b1011 100644 --- a/libbaresip/baresip/include/baresip.h +++ b/libbaresip/baresip/include/baresip.h @@ -322,6 +322,7 @@ struct config_audio { int enc_fmt; /**< Audio encoder sample format */ int dec_fmt; /**< Audio decoder sample format */ struct range buffer; /**< Audio receive buffer in [ms] */ + uint32_t telev_pt; /**< Payload type for tel.-event */ }; /** Video */ @@ -753,6 +754,7 @@ enum ua_event { UA_EVENT_CALL_ESTABLISHED, UA_EVENT_CALL_CLOSED, UA_EVENT_CALL_TRANSFER, + UA_EVENT_CALL_BLIND_TRANSFER, UA_EVENT_CALL_TRANSFER_FAILED, UA_EVENT_CALL_DTMF_START, UA_EVENT_CALL_DTMF_END, @@ -853,6 +855,9 @@ void uag_enable_sip_trace(bool enable); int uag_reset_transp(bool reg, bool reinvite); void uag_set_sub_handler(sip_msg_h *subh); int uag_set_extra_params(const char *eprm); +int uag_enable_udp(bool en); +int uag_enable_tcp(bool en); +int uag_enable_tls(bool en); struct ua *uag_find(const struct pl *cuser); struct ua *uag_find_msg(const struct sip_msg *msg); struct ua *uag_find_aor(const char *aor); @@ -1063,7 +1068,6 @@ const struct vidisp *vidisp_find(const struct list *vidispl, const char *name); /** Audio Codec parameters */ struct auenc_param { - uint32_t ptime; /**< Packet time in [ms] */ uint32_t bitrate; /**< Wanted bitrate in [bit/s] */ }; @@ -1382,6 +1386,7 @@ struct stun_uri { enum stun_scheme scheme; /**< STUN Scheme */ char *host; /**< Hostname or IP-address */ uint16_t port; /**< Port number */ + int proto; /**< Transport protocol */ }; int stunuri_decode(struct stun_uri **sup, const struct pl *pl); diff --git a/libbaresip/baresip/libbaresip.a b/libbaresip/baresip/libbaresip.a index 0840987..5e685be 100644 Binary files a/libbaresip/baresip/libbaresip.a and b/libbaresip/baresip/libbaresip.a differ diff --git a/libbaresip/openssl/libcrypto.a b/libbaresip/openssl/libcrypto.a index da7e17b..633fe93 100644 Binary files a/libbaresip/openssl/libcrypto.a and b/libbaresip/openssl/libcrypto.a differ diff --git a/libbaresip/openssl/libssl.a b/libbaresip/openssl/libssl.a index d992b85..4a5ea2d 100644 Binary files a/libbaresip/openssl/libssl.a and b/libbaresip/openssl/libssl.a differ diff --git a/libbaresip/opus/libopus.a b/libbaresip/opus/libopus.a index 6ef58db..e70e58c 100644 Binary files a/libbaresip/opus/libopus.a and b/libbaresip/opus/libopus.a differ diff --git a/libbaresip/re/include/re_fmt.h b/libbaresip/re/include/re_fmt.h index 0660ad9..cf599d0 100644 --- a/libbaresip/re/include/re_fmt.h +++ b/libbaresip/re/include/re_fmt.h @@ -105,6 +105,7 @@ uint8_t ch_hex(char ch); /* String functions */ +int str_bool(bool *val, const char *str); int str_hex(uint8_t *hex, size_t len, const char *str); void str_ncpy(char *dst, const char *src, size_t n); int str_dup(char **dst, const char *src); @@ -140,6 +141,8 @@ typedef void (fmt_param_h)(const struct pl *name, const struct pl *val, void *arg); bool fmt_param_exists(const struct pl *pl, const char *pname); +bool fmt_param_sep_get(const struct pl *pl, const char *pname, char sep, + struct pl *val); bool fmt_param_get(const struct pl *pl, const char *pname, struct pl *val); void fmt_param_apply(const struct pl *pl, fmt_param_h *ph, void *arg); diff --git a/libbaresip/re/include/re_http.h b/libbaresip/re/include/re_http.h index 1fb77e4..9155218 100644 --- a/libbaresip/re/include/re_http.h +++ b/libbaresip/re/include/re_http.h @@ -4,6 +4,8 @@ * Copyright (C) 2010 Creytiv.com */ +/* forward declarations */ +struct tls; /** HTTP Header ID (perfect hash value) */ enum http_hdrid { @@ -144,6 +146,8 @@ typedef void (http_conn_h)(struct tcp_conn *tc, struct tls_conn *sc, void *arg); int http_client_alloc(struct http_cli **clip, struct dnsc *dnsc); +int http_client_set_tls(struct http_cli *cli, struct tls *tls); +int http_client_get_tls(struct http_cli *cli, struct tls **tls); int http_client_set_config(struct http_cli *cli, struct http_conf *conf); int http_request(struct http_req **reqp, struct http_cli *cli, const char *met, const char *uri, http_resp_h *resph, http_data_h *datah, diff --git a/libbaresip/re/include/re_net.h b/libbaresip/re/include/re_net.h index eb0aa45..a23ff00 100644 --- a/libbaresip/re/include/re_net.h +++ b/libbaresip/re/include/re_net.h @@ -40,7 +40,7 @@ struct sa; /* Net generic */ int net_hostaddr(int af, struct sa *ip); -int net_dst_source_addr_get(struct sa *dst, struct sa *ip); +int net_dst_source_addr_get(const struct sa *dst, struct sa *ip); int net_default_source_addr_get(int af, struct sa *ip); int net_default_gateway_get(int af, struct sa *gw); diff --git a/libbaresip/re/include/re_sa.h b/libbaresip/re/include/re_sa.h index 4492922..f17ce0b 100644 --- a/libbaresip/re/include/re_sa.h +++ b/libbaresip/re/include/re_sa.h @@ -48,6 +48,7 @@ int sa_af(const struct sa *sa); uint32_t sa_in(const struct sa *sa); void sa_in6(const struct sa *sa, uint8_t *addr); int sa_ntop(const struct sa *sa, char *buf, int size); +int sa_pton(const char *addr, struct sa *sa); uint16_t sa_port(const struct sa *sa); bool sa_isset(const struct sa *sa, int flag); uint32_t sa_hash(const struct sa *sa, int flag); @@ -59,5 +60,8 @@ bool sa_is_linklocal(const struct sa *sa); bool sa_is_loopback(const struct sa *sa); bool sa_is_any(const struct sa *sa); +void sa_set_scopeid(struct sa *sa, uint32_t scopeid); +uint32_t sa_scopeid(const struct sa *sa); + struct re_printf; int sa_print_addr(struct re_printf *pf, const struct sa *sa); diff --git a/libbaresip/re/include/re_sip.h b/libbaresip/re/include/re_sip.h index b087a9f..655fa6c 100644 --- a/libbaresip/re/include/re_sip.h +++ b/libbaresip/re/include/re_sip.h @@ -4,6 +4,8 @@ * Copyright (C) 2010 Creytiv.com */ +/* forward declarations */ +struct tls; enum { SIP_PORT = 5060, @@ -269,7 +271,7 @@ int sip_transp_add(struct sip *sip, enum sip_transp tp, const struct sa *laddr, ...); int sip_transp_add_websock(struct sip *sip, enum sip_transp tp, const struct sa *laddr, - bool server, const char *cert); + bool server, const char *cert, struct tls *tls); int sip_transp_add_ccert(struct sip *sip, const struct uri *uri, const char *ccertfile); void sip_transp_flush(struct sip *sip); @@ -347,6 +349,7 @@ int sip_dialog_fork(struct sip_dialog **dlgp, struct sip_dialog *odlg, int sip_dialog_update(struct sip_dialog *dlg, const struct sip_msg *msg); bool sip_dialog_rseq_valid(struct sip_dialog *dlg, const struct sip_msg *msg); const char *sip_dialog_callid(const struct sip_dialog *dlg); +const char *sip_dialog_uri(const struct sip_dialog *dlg); uint32_t sip_dialog_lseq(const struct sip_dialog *dlg); bool sip_dialog_established(const struct sip_dialog *dlg); bool sip_dialog_cmp(const struct sip_dialog *dlg, const struct sip_msg *msg); diff --git a/libbaresip/re/include/re_sipsess.h b/libbaresip/re/include/re_sipsess.h index e74d046..7248fca 100644 --- a/libbaresip/re/include/re_sipsess.h +++ b/libbaresip/re/include/re_sipsess.h @@ -20,6 +20,8 @@ typedef void (sipsess_refer_h)(struct sip *sip, const struct sip_msg *msg, void *arg); typedef void (sipsess_close_h)(int err, const struct sip_msg *msg, void *arg); +typedef void (sipsess_redirect_h)(const struct sip_msg *msg, + const char *uri, void *arg); int sipsess_listen(struct sipsess_sock **sockp, struct sip *sip, int htsize, sipsess_conn_h *connh, void *arg); @@ -45,6 +47,9 @@ int sipsess_accept(struct sipsess **sessp, struct sipsess_sock *sock, sipsess_refer_h *referh, sipsess_close_h *closeh, void *arg, const char *fmt, ...); +int sipsess_set_redirect_handler(struct sipsess *sess, + sipsess_redirect_h *redirecth); + int sipsess_progress(struct sipsess *sess, uint16_t scode, const char *reason, struct mbuf *desc, const char *fmt, ...); diff --git a/libbaresip/re/libre.a b/libbaresip/re/libre.a index 62737d5..a7f3d99 100644 Binary files a/libbaresip/re/libre.a and b/libbaresip/re/libre.a differ diff --git a/libbaresip/rem/librem.a b/libbaresip/rem/librem.a index 4bd8455..89bba86 100644 Binary files a/libbaresip/rem/librem.a and b/libbaresip/rem/librem.a differ