[asterisk-dev] asterisk tests for libpri

Richard Mudgett rmudgett at digium.com
Tue Mar 29 10:03:16 CDT 2011


> There are a number of build-time tests in the Asterisk configure
> scripts
> for features in libpri. Here is a list of them:
> 
> Name: Function tested: First appeared in:
> PRI_DISPLAY_TEXT pri_display_text -
> PRI_MWI pri_mwi_indicate 1.4.12-beta1
> PRI_MCID pri_mcid_enable 1.4.12-beta1
> PRI_CALL_WAITING pri_connect_ack_enable 1.4.12-beta1
> PRI_AOC_EVENTS pri_aoc_events_enable 1.4.12-beta1
> PRI_TRANSFER pri_transfer_enable 1.4.12-beta1
> PRI_CCSS pri_cc_enable 1.4.12-beta1
> PRI_HANGUP_FIX pri_hangup_fix_enable 1.4.11
> PRI_SUBADDR pri_sr_set_called_subaddress 1.4.11
> PRI_CALL_HOLD pri_hold_enable 1.4.11
> PRI_CALL_REROUTING pri_reroute_enable 1.4.11
> PRI_SETUP_KEYPAD pri_sr_set_keypad_digits 1.4.11
> PRI_SERVICE_MESSAGES pri_maintenance_service 1.4.11
> PRI_REVERSE_CHARGE pri_sr_set_reversecharge 1.4.11
> PRI_PROG_W_CAUSE pri_progress_with_cause 1.4.8
> PRI_INBANDDISCONNECT pri_set_inbanddisconnect 1.4.6
> 
> There are a number of places where the results of those tests are used
> to conditionally build code. E.g.:
> 
> #ifdef PRI_MWI
> some code that may use pri_mwi_indicate()
> #endif
> 
> This works well as long as we stay on the same system. But what
> happens
> if the same Asterisk (or rather: chan_dahdi.so) binary is then copied
> over to a system with libpri 1.4.11 (or older)?

It depends.

If chan_dahdi is from:
Asterisk v1.4 or v1.6.2 then nothing because those versions of Asterisk do not know how to use the new features.
Asterisk v1.8 or trunk then you will get unresolved externals because that version knows how to use the new features.

Building chan_dahdi with a particular version of libpri means that chan_dahdi expects that version of libpri as a minimum.

Richard



More information about the asterisk-dev mailing list