From: Matteo Brancaleoni Date: Mon, 29 Oct 2012 10:58:22 +0000 (+0100) Subject: ftmod_libpri: Always send PROGRESS messages with PROGRESS INDICATOR IE X-Git-Tag: v1.3.1~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d090357cfef389e705d7e27cfdcf5a9a940170f;p=thirdparty%2Ffreeswitch.git ftmod_libpri: Always send PROGRESS messages with PROGRESS INDICATOR IE PROGRESS without PROGRESS INDICATOR IE is invalid according to Q.931, so always call pri_progress() with info flag set, even if we do not have media yet. Signed-off-by: Stefan Knoblich --- diff --git a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c index 3b819df718..2f1a5ff9ed 100644 --- a/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c +++ b/libs/freetdm/src/ftmod/ftmod_libpri/ftmod_libpri.c @@ -974,7 +974,13 @@ static ftdm_status_t state_advance(ftdm_channel_t *chan) ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_HANGUP); } } else if (call) { - pri_progress(isdn_data->spri.pri, call, ftdm_channel_get_id(chan), 0); + /* + * Even if we have no media, sending progress without PI is forbidden + * by Q.931 3.1.8, so a protocol error will be issued from libpri + * and from remote equipment. + * So just pretend we have PI. + */ + pri_progress(isdn_data->spri.pri, call, ftdm_channel_get_id(chan), 1); } else { ftdm_set_state_locked(chan, FTDM_CHANNEL_STATE_RESTART); }