diff --git a/pri_internal.h b/pri_internal.h index 3f496cd..861cbdc 100644 --- a/pri_internal.h +++ b/pri_internal.h @@ -604,6 +604,15 @@ static inline int BRI_TE_PTMP(struct pri *mypri) return pri->bri && (((pri)->localtype == PRI_CPE) && ((pri)->tei == Q921_TEI_GROUP)); } +static inline int PRI_PTP(struct pri *mypri) +{ + struct pri *pri; + + pri = PRI_MASTER(mypri); + + return !pri->bri; +} + #define Q931_DUMMY_CALL_REFERENCE -1 /*! diff --git a/q921.c b/q921.c index c6d9cd0..a653927 100644 --- a/q921.c +++ b/q921.c @@ -1220,8 +1220,8 @@ static pri_event *__q921_receive_qualified(struct pri *pri, q921_h *h, int len) /* Acknowledge */ q921_send_ua(pri, h->u.p_f); ev = q921_dchannel_down(pri); - if (BRI_TE_PTMP(pri)) { - q921_restart(pri, 0); + if (BRI_TE_PTMP(pri) || PRI_PTP(pri)) { + q921_restart(pri, PRI_PTP(pri) ? 1 : 0); } return ev; case 3: