diff --git a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c index 2ab181b268..351e2b65c2 100644 --- a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c +++ b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/ozmod_sangoma_boost.c @@ -326,6 +326,9 @@ static ZIO_CHANNEL_REQUEST_FUNCTION(sangoma_boost_channel_request) event.calling_number_screening_ind = caller_data->screen; event.calling_number_presentation = caller_data->pres; + if (sangoma_boost_data->sigmod) { + event.span = span->channels[1]->physical_span_id; + } OUTBOUND_REQUESTS[r].status = BST_WAITING; OUTBOUND_REQUESTS[r].span = span; diff --git a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c index 2030500ffc..43b159ff75 100644 --- a/libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c +++ b/libs/freetdm/src/ozmod/ozmod_sangoma_boost/sangoma_boost_client.c @@ -368,9 +368,11 @@ sangomabc_event_t *__sangomabc_connection_readp(sangomabc_connection_t *mcon, in if (mcon->sigmod) { e = zap_queue_dequeue(mcon->boost_queue); - bytes = e->size; - memcpy(&mcon->event, e->boostmsg, bytes); - zap_safe_free(e); + if (e) { + bytes = e->size; + memcpy(&mcon->event, e->boostmsg, bytes); + zap_safe_free(e); + } } else { bytes = recvfrom(mcon->socket, &mcon->event, sizeof(mcon->event), MSG_DONTWAIT, (struct sockaddr *) &mcon->local_addr, &fromlen); }