@@ -1391,7 +1391,7 @@ cdef class Invitation:
13911391# Callback functions
13921392#
13931393
1394- cdef void _Invitation_cb_state (pjsip_inv_session * inv, pjsip_event * e) with gil:
1394+ cdef void _Invitation_cb_state_impl (pjsip_inv_session * inv, pjsip_event * e) with gil:
13951395 cdef pjsip_rx_data * rdata = NULL
13961396 cdef pjsip_tx_data * tdata = NULL
13971397 cdef object state
@@ -1466,7 +1466,11 @@ cdef void _Invitation_cb_state(pjsip_inv_session *inv, pjsip_event *e) with gil:
14661466 except :
14671467 ua._handle_exception(1 )
14681468
1469- cdef void _Invitation_cb_sdp_done(pjsip_inv_session * inv, int status) with gil:
1469+ cdef void _Invitation_cb_state(pjsip_inv_session * inv, pjsip_event * e) noexcept nogil:
1470+ with gil:
1471+ _Invitation_cb_state_impl(inv, e)
1472+
1473+ cdef void _Invitation_cb_sdp_done_impl(pjsip_inv_session * inv, int status) with gil:
14701474 cdef Invitation invitation
14711475 cdef PJSIPUA ua
14721476 cdef SDPCallbackTimer timer
@@ -1516,7 +1520,11 @@ cdef void _Invitation_cb_sdp_done(pjsip_inv_session *inv, int status) with gil:
15161520 except :
15171521 ua._handle_exception(1 )
15181522
1519- cdef int _Invitation_cb_rx_reinvite(pjsip_inv_session * inv, pjmedia_sdp_session_ptr_const offer, pjsip_rx_data * rdata) with gil:
1523+ cdef void _Invitation_cb_sdp_done(pjsip_inv_session * inv, int status) noexcept nogil:
1524+ with gil:
1525+ _Invitation_cb_sdp_done_impl(inv, status)
1526+
1527+ cdef int _Invitation_cb_rx_reinvite_impl(pjsip_inv_session * inv, pjmedia_sdp_session_ptr_const offer, pjsip_rx_data * rdata) with gil:
15201528 cdef int status
15211529 cdef pjsip_tx_data * answer_tdata
15221530 cdef object rdata_dict = None
@@ -1560,7 +1568,13 @@ cdef int _Invitation_cb_rx_reinvite(pjsip_inv_session *inv, pjmedia_sdp_session_
15601568 ua._handle_exception(1 )
15611569 return 1
15621570
1563- cdef void _Invitation_cb_tsx_state_changed(pjsip_inv_session * inv, pjsip_transaction * tsx, pjsip_event * e) with gil:
1571+ cdef int _Invitation_cb_rx_reinvite(pjsip_inv_session * inv, pjmedia_sdp_session_ptr_const offer, pjsip_rx_data * rdata) noexcept nogil:
1572+ cdef int result
1573+ with gil:
1574+ result = _Invitation_cb_rx_reinvite_impl(inv, offer, rdata)
1575+ return result
1576+
1577+ cdef void _Invitation_cb_tsx_state_changed_impl(pjsip_inv_session * inv, pjsip_transaction * tsx, pjsip_event * e) with gil:
15641578 cdef pjsip_rx_data * rdata = NULL
15651579 cdef pjsip_tx_data * tdata = NULL
15661580 cdef object rdata_dict = None
@@ -1628,11 +1642,19 @@ cdef void _Invitation_cb_tsx_state_changed(pjsip_inv_session *inv, pjsip_transac
16281642 except :
16291643 ua._handle_exception(1 )
16301644
1631- cdef void _Invitation_cb_new(pjsip_inv_session * inv, pjsip_event * e) with gil:
1645+ cdef void _Invitation_cb_tsx_state_changed(pjsip_inv_session * inv, pjsip_transaction * tsx, pjsip_event * e) noexcept nogil:
1646+ with gil:
1647+ _Invitation_cb_tsx_state_changed_impl(inv, tsx, e)
1648+
1649+ cdef void _Invitation_cb_new_impl(pjsip_inv_session * inv, pjsip_event * e) with gil:
16321650 # As far as I can tell this is never actually called!
16331651 pass
16341652
1635- cdef void _Invitation_transfer_cb_state(pjsip_evsub * sub, pjsip_event * event) with gil:
1653+ cdef void _Invitation_cb_new(pjsip_inv_session * inv, pjsip_event * e) noexcept nogil:
1654+ with gil:
1655+ _Invitation_cb_new_impl(inv, e)
1656+
1657+ cdef void _Invitation_transfer_cb_state_impl(pjsip_evsub * sub, pjsip_event * event) with gil:
16361658 cdef void * invitation_void
16371659 cdef Invitation invitation
16381660 cdef object state
@@ -1680,7 +1702,11 @@ cdef void _Invitation_transfer_cb_state(pjsip_evsub *sub, pjsip_event *event) wi
16801702 except :
16811703 ua._handle_exception(1 )
16821704
1683- cdef void _Invitation_transfer_cb_tsx(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) with gil:
1705+ cdef void _Invitation_transfer_cb_state(pjsip_evsub * sub, pjsip_event * event) noexcept nogil:
1706+ with gil:
1707+ _Invitation_transfer_cb_state_impl(sub, event)
1708+
1709+ cdef void _Invitation_transfer_cb_tsx_impl(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) with gil:
16841710 cdef void * invitation_void
16851711 cdef Invitation invitation
16861712 cdef pjsip_rx_data * rdata
@@ -1714,7 +1740,11 @@ cdef void _Invitation_transfer_cb_tsx(pjsip_evsub *sub, pjsip_transaction *tsx,
17141740 except :
17151741 ua._handle_exception(1 )
17161742
1717- cdef void _Invitation_transfer_cb_notify(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
1743+ cdef void _Invitation_transfer_cb_tsx(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) noexcept nogil:
1744+ with gil:
1745+ _Invitation_transfer_cb_tsx_impl(sub, tsx, event)
1746+
1747+ cdef void _Invitation_transfer_cb_notify_impl(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
17181748 pj_str_t ** p_st_text, pjsip_hdr * res_hdr, pjsip_msg_body ** p_body) with gil:
17191749 cdef void * invitation_void
17201750 cdef Invitation invitation
@@ -1742,11 +1772,20 @@ cdef void _Invitation_transfer_cb_notify(pjsip_evsub *sub, pjsip_rx_data *rdata,
17421772 except :
17431773 ua._handle_exception(1 )
17441774
1745- cdef void _Invitation_transfer_cb_refresh(pjsip_evsub * sub) with gil:
1775+ cdef void _Invitation_transfer_cb_notify(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
1776+ pj_str_t ** p_st_text, pjsip_hdr * res_hdr, pjsip_msg_body ** p_body) noexcept nogil:
1777+ with gil:
1778+ _Invitation_transfer_cb_notify_impl(sub, rdata, p_st_code, p_st_text, res_hdr, p_body)
1779+
1780+ cdef void _Invitation_transfer_cb_refresh_impl(pjsip_evsub * sub) with gil:
17461781 # We want to handle the refresh timer oursevles, ignore the PJSIP provided timer
17471782 pass
17481783
1749- cdef void _Invitation_transfer_in_cb_rx_refresh(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
1784+ cdef void _Invitation_transfer_cb_refresh(pjsip_evsub * sub) noexcept nogil:
1785+ with gil:
1786+ _Invitation_transfer_cb_refresh_impl(sub)
1787+
1788+ cdef void _Invitation_transfer_in_cb_rx_refresh_impl(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
17501789 pj_str_t ** p_st_text, pjsip_hdr * res_hdr, pjsip_msg_body ** p_body) with gil:
17511790 cdef void * invitation_void
17521791 cdef dict rdata_dict
@@ -1780,7 +1819,12 @@ cdef void _Invitation_transfer_in_cb_rx_refresh(pjsip_evsub *sub, pjsip_rx_data
17801819 except :
17811820 ua._handle_exception(1 )
17821821
1783- cdef void _Invitation_transfer_in_cb_server_timeout(pjsip_evsub * sub) with gil:
1822+ cdef void _Invitation_transfer_in_cb_rx_refresh(pjsip_evsub * sub, pjsip_rx_data * rdata, int * p_st_code,
1823+ pj_str_t ** p_st_text, pjsip_hdr * res_hdr, pjsip_msg_body ** p_body) noexcept nogil:
1824+ with gil:
1825+ _Invitation_transfer_in_cb_rx_refresh_impl(sub, rdata, p_st_code, p_st_text, res_hdr, p_body)
1826+
1827+ cdef void _Invitation_transfer_in_cb_server_timeout_impl(pjsip_evsub * sub) with gil:
17841828 cdef void * invitation_void
17851829 cdef Invitation invitation
17861830 cdef Timer timer
@@ -1804,7 +1848,11 @@ cdef void _Invitation_transfer_in_cb_server_timeout(pjsip_evsub *sub) with gil:
18041848 except :
18051849 ua._handle_exception(1 )
18061850
1807- cdef void _Invitation_transfer_in_cb_tsx(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) with gil:
1851+ cdef void _Invitation_transfer_in_cb_server_timeout(pjsip_evsub * sub) noexcept nogil:
1852+ with gil:
1853+ _Invitation_transfer_in_cb_server_timeout_impl(sub)
1854+
1855+ cdef void _Invitation_transfer_in_cb_tsx_impl(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) with gil:
18081856 cdef void * invitation_void
18091857 cdef Invitation invitation
18101858 cdef PJSIPUA ua
@@ -1840,6 +1888,10 @@ cdef void _Invitation_transfer_in_cb_tsx(pjsip_evsub *sub, pjsip_transaction *ts
18401888 ua._handle_exception(1 )
18411889
18421890
1891+ cdef void _Invitation_transfer_in_cb_tsx(pjsip_evsub * sub, pjsip_transaction * tsx, pjsip_event * event) noexcept nogil:
1892+ with gil:
1893+ _Invitation_transfer_in_cb_tsx_impl(sub, tsx, event)
1894+
18431895# Globals
18441896#
18451897
0 commit comments