aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--BUGS2
-rw-r--r--CHANGES27
-rw-r--r--Makefile53
-rw-r--r--Makefile.moddir_rules2
-rw-r--r--UPGRADE-1.8.txt2
-rw-r--r--UPGRADE-10.txt81
-rw-r--r--UPGRADE.txt30
-rw-r--r--addons/app_mysql.c2
-rw-r--r--addons/app_saycountpl.c2
-rw-r--r--addons/cdr_mysql.c2
-rw-r--r--addons/chan_mobile.c1
-rw-r--r--addons/chan_ooh323.c771
-rw-r--r--addons/format_mp3.c1
-rw-r--r--addons/ooh323c/src/ooGkClient.c32
-rw-r--r--addons/res_config_mysql.c1
-rw-r--r--agi/eagi-test.c4
-rw-r--r--apps/app_adsiprog.c1
-rw-r--r--apps/app_alarmreceiver.c4
-rw-r--r--apps/app_amd.c3
-rw-r--r--apps/app_authenticate.c4
-rw-r--r--apps/app_cdr.c4
-rw-r--r--apps/app_chanisavail.c4
-rw-r--r--apps/app_channelredirect.c4
-rw-r--r--apps/app_chanspy.c4
-rw-r--r--apps/app_confbridge.c48
-rw-r--r--apps/app_controlplayback.c4
-rw-r--r--apps/app_dahdibarge.c3
-rw-r--r--apps/app_dahdiras.c1
-rw-r--r--apps/app_db.c4
-rw-r--r--apps/app_dial.c4
-rw-r--r--apps/app_dictate.c4
-rw-r--r--apps/app_directed_pickup.c12
-rw-r--r--apps/app_directory.c10
-rw-r--r--apps/app_disa.c4
-rw-r--r--apps/app_dumpchan.c4
-rw-r--r--apps/app_echo.c4
-rw-r--r--apps/app_exec.c3
-rw-r--r--apps/app_externalivr.c4
-rw-r--r--apps/app_fax.c1
-rw-r--r--apps/app_festival.c4
-rw-r--r--apps/app_flash.c1
-rw-r--r--apps/app_followme.c1
-rw-r--r--apps/app_forkcdr.c4
-rw-r--r--apps/app_getcpeid.c4
-rw-r--r--apps/app_ices.c4
-rw-r--r--apps/app_image.c4
-rw-r--r--apps/app_ivrdemo.c1
-rw-r--r--apps/app_jack.c1
-rw-r--r--apps/app_macro.c5
-rw-r--r--apps/app_meetme.c19
-rw-r--r--apps/app_milliwatt.c4
-rw-r--r--apps/app_minivm.c4
-rw-r--r--apps/app_mixmonitor.c28
-rw-r--r--apps/app_morsecode.c4
-rw-r--r--apps/app_mp3.c4
-rw-r--r--apps/app_nbscat.c4
-rw-r--r--apps/app_originate.c4
-rw-r--r--apps/app_osplookup.c1
-rw-r--r--apps/app_page.c1
-rw-r--r--apps/app_parkandannounce.c4
-rw-r--r--apps/app_playback.c6
-rw-r--r--apps/app_playtones.c4
-rw-r--r--apps/app_privacy.c4
-rw-r--r--apps/app_queue.c3
-rw-r--r--apps/app_read.c4
-rw-r--r--apps/app_readexten.c4
-rw-r--r--apps/app_readfile.c6
-rw-r--r--apps/app_record.c4
-rw-r--r--apps/app_rpt.c1
-rw-r--r--apps/app_saycounted.c1
-rw-r--r--apps/app_sayunixtime.c4
-rw-r--r--apps/app_senddtmf.c4
-rw-r--r--apps/app_sendtext.c4
-rw-r--r--apps/app_setcallerid.c8
-rw-r--r--apps/app_skel.c1
-rw-r--r--apps/app_sms.c4
-rw-r--r--apps/app_softhangup.c4
-rw-r--r--apps/app_speech_utils.c4
-rw-r--r--apps/app_stack.c1
-rw-r--r--apps/app_talkdetect.c6
-rw-r--r--apps/app_test.c4
-rw-r--r--apps/app_transfer.c4
-rw-r--r--apps/app_url.c4
-rw-r--r--apps/app_userevent.c4
-rw-r--r--apps/app_verbose.c4
-rw-r--r--apps/app_voicemail.c33
-rw-r--r--apps/app_waitforring.c4
-rw-r--r--apps/app_waitforsilence.c4
-rw-r--r--apps/app_waituntil.c4
-rw-r--r--apps/app_while.c4
-rw-r--r--apps/app_zapateller.c4
-rw-r--r--apps/confbridge/conf_config_parser.c6
-rw-r--r--apps/confbridge/include/confbridge.h1
-rw-r--r--bridges/bridge_builtin_features.c4
-rw-r--r--bridges/bridge_multiplexed.c4
-rw-r--r--bridges/bridge_simple.c4
-rw-r--r--bridges/bridge_softmix.c37
-rw-r--r--cdr/cdr_adaptive_odbc.c1
-rw-r--r--cdr/cdr_csv.c4
-rw-r--r--cdr/cdr_custom.c4
-rw-r--r--cdr/cdr_manager.c4
-rw-r--r--cdr/cdr_odbc.c1
-rw-r--r--cdr/cdr_pgsql.c1
-rw-r--r--cdr/cdr_radius.c1
-rw-r--r--cdr/cdr_sqlite.c3
-rw-r--r--cdr/cdr_sqlite3_custom.c1
-rw-r--r--cdr/cdr_syslog.c3
-rw-r--r--cdr/cdr_tds.c1
-rw-r--r--cel/cel_custom.c4
-rw-r--r--cel/cel_manager.c4
-rw-r--r--cel/cel_odbc.c1
-rw-r--r--cel/cel_pgsql.c1
-rw-r--r--cel/cel_radius.c1
-rw-r--r--cel/cel_sqlite3_custom.c1
-rw-r--r--cel/cel_tds.c1
-rw-r--r--channels/chan_agent.c1
-rw-r--r--channels/chan_alsa.c1
-rw-r--r--channels/chan_bridge.c4
-rw-r--r--channels/chan_console.c1
-rw-r--r--channels/chan_dahdi.c22
-rw-r--r--channels/chan_gtalk.c10
-rw-r--r--channels/chan_h323.c4
-rw-r--r--channels/chan_iax2.c1
-rw-r--r--channels/chan_jingle.c2
-rw-r--r--channels/chan_local.c4
-rw-r--r--channels/chan_mgcp.c1
-rw-r--r--channels/chan_misdn.c1
-rw-r--r--channels/chan_multicast_rtp.c4
-rw-r--r--channels/chan_nbs.c1
-rw-r--r--channels/chan_oss.c1
-rw-r--r--channels/chan_phone.c1
-rw-r--r--channels/chan_sip.c104
-rw-r--r--channels/chan_skinny.c755
-rw-r--r--channels/chan_unistim.c4
-rw-r--r--channels/chan_usbradio.c1
-rw-r--r--channels/chan_vpb.cc2
-rw-r--r--channels/sig_pri.c46
-rw-r--r--codecs/codec_a_mu.c4
-rw-r--r--codecs/codec_adpcm.c4
-rw-r--r--codecs/codec_alaw.c4
-rw-r--r--codecs/codec_g722.c4
-rw-r--r--codecs/codec_g726.c4
-rw-r--r--codecs/codec_gsm.c1
-rw-r--r--codecs/codec_ilbc.c1
-rw-r--r--codecs/codec_lpc10.c4
-rw-r--r--codecs/codec_resample.c5
-rw-r--r--codecs/codec_speex.c1
-rw-r--r--codecs/codec_ulaw.c4
-rw-r--r--configs/chan_dahdi.conf.sample7
-rw-r--r--configs/chan_ooh323.conf.sample12
-rw-r--r--configs/codecs.conf.sample19
-rw-r--r--configs/confbridge.conf.sample23
-rw-r--r--configs/features.conf.sample4
-rwxr-xr-xconfigure924
-rw-r--r--configure.ac6
-rwxr-xr-xcontrib/scripts/live_ast9
-rw-r--r--formats/format_g719.c4
-rw-r--r--formats/format_g723.c4
-rw-r--r--formats/format_g726.c4
-rw-r--r--formats/format_g729.c4
-rw-r--r--formats/format_gsm.c4
-rw-r--r--formats/format_h263.c4
-rw-r--r--formats/format_h264.c4
-rw-r--r--formats/format_ilbc.c4
-rw-r--r--formats/format_jpeg.c4
-rw-r--r--formats/format_ogg_vorbis.c1
-rw-r--r--formats/format_pcm.c4
-rw-r--r--formats/format_siren14.c4
-rw-r--r--formats/format_siren7.c4
-rw-r--r--formats/format_sln.c170
-rw-r--r--formats/format_sln16.c142
-rw-r--r--formats/format_vox.c4
-rw-r--r--formats/format_wav.c4
-rw-r--r--formats/format_wav_gsm.c4
-rw-r--r--funcs/func_aes.c1
-rw-r--r--funcs/func_audiohookinherit.c4
-rw-r--r--funcs/func_base64.c4
-rw-r--r--funcs/func_blacklist.c4
-rw-r--r--funcs/func_callcompletion.c4
-rw-r--r--funcs/func_callerid.c4
-rw-r--r--funcs/func_cdr.c4
-rw-r--r--funcs/func_channel.c4
-rw-r--r--funcs/func_config.c4
-rw-r--r--funcs/func_curl.c1
-rw-r--r--funcs/func_cut.c4
-rw-r--r--funcs/func_db.c4
-rw-r--r--funcs/func_devstate.c4
-rw-r--r--funcs/func_dialgroup.c4
-rw-r--r--funcs/func_dialplan.c4
-rw-r--r--funcs/func_enum.c4
-rw-r--r--funcs/func_env.c4
-rw-r--r--funcs/func_extstate.c4
-rw-r--r--funcs/func_frame_trace.c4
-rw-r--r--funcs/func_global.c4
-rw-r--r--funcs/func_groupcount.c4
-rw-r--r--funcs/func_iconv.c3
-rw-r--r--funcs/func_lock.c4
-rw-r--r--funcs/func_logic.c4
-rw-r--r--funcs/func_math.c4
-rw-r--r--funcs/func_md5.c4
-rw-r--r--funcs/func_module.c5
-rw-r--r--funcs/func_odbc.c3
-rw-r--r--funcs/func_pitchshift.c4
-rw-r--r--funcs/func_rand.c4
-rw-r--r--funcs/func_sha1.c4
-rw-r--r--funcs/func_shell.c4
-rw-r--r--funcs/func_speex.c1
-rw-r--r--funcs/func_sprintf.c4
-rw-r--r--funcs/func_srv.c4
-rw-r--r--funcs/func_strings.c4
-rw-r--r--funcs/func_sysinfo.c4
-rw-r--r--funcs/func_timeout.c4
-rw-r--r--funcs/func_uri.c4
-rw-r--r--funcs/func_version.c4
-rw-r--r--funcs/func_vmcount.c4
-rw-r--r--funcs/func_volume.c4
-rw-r--r--include/asterisk/bridging.h13
-rw-r--r--include/asterisk/celt.h37
-rw-r--r--include/asterisk/dsp.h3
-rw-r--r--include/asterisk/extconf.h2
-rw-r--r--include/asterisk/format.h2
-rw-r--r--include/asterisk/jingle.h1
-rw-r--r--include/asterisk/linkedlists.h9
-rw-r--r--include/asterisk/netsock2.h2
-rw-r--r--include/asterisk/pbx.h2
-rw-r--r--include/asterisk/rtp_engine.h4
-rw-r--r--main/Makefile18
-rw-r--r--main/asterisk.c41
-rw-r--r--main/bridging.c49
-rw-r--r--main/channel.c12
-rw-r--r--main/db.c618
-rw-r--r--main/dsp.c147
-rw-r--r--main/features.c8
-rw-r--r--main/format.c54
-rw-r--r--main/frame.c4
-rw-r--r--main/http.c4
-rw-r--r--main/manager.c18
-rw-r--r--main/pbx.c266
-rw-r--r--main/rtp_engine.c23
-rw-r--r--pbx/pbx_ael.c1
-rw-r--r--pbx/pbx_config.c4
-rw-r--r--pbx/pbx_dundi.c1
-rw-r--r--pbx/pbx_loopback.c4
-rw-r--r--pbx/pbx_lua.c1
-rw-r--r--pbx/pbx_realtime.c4
-rw-r--r--pbx/pbx_spool.c4
-rw-r--r--res/res_adsi.c4
-rw-r--r--res/res_ael_share.c4
-rw-r--r--res/res_agi.c4
-rw-r--r--res/res_ais.c1
-rw-r--r--res/res_calendar.c4
-rw-r--r--res/res_calendar_caldav.c2
-rw-r--r--res/res_calendar_ews.c2
-rw-r--r--res/res_calendar_exchange.c2
-rw-r--r--res/res_calendar_icalendar.c2
-rw-r--r--res/res_clialiases.c3
-rw-r--r--res/res_clioriginate.c4
-rw-r--r--res/res_config_curl.c1
-rw-r--r--res/res_config_ldap.c1
-rw-r--r--res/res_config_odbc.c14
-rw-r--r--res/res_config_pgsql.c1
-rw-r--r--res/res_config_sqlite.c1
-rw-r--r--res/res_convert.c4
-rw-r--r--res/res_crypto.c1
-rw-r--r--res/res_fax.c132
-rw-r--r--res/res_fax_spandsp.c1
-rw-r--r--res/res_format_attr_celt.c181
-rw-r--r--res/res_format_attr_silk.c (renamed from formats/format_attr_silk.c)0
-rw-r--r--res/res_http_post.c3
-rw-r--r--res/res_jabber.c1
-rw-r--r--res/res_limit.c3
-rw-r--r--res/res_monitor.c4
-rw-r--r--res/res_musiconhold.c1
-rw-r--r--res/res_mutestream.c4
-rw-r--r--res/res_odbc.c1
-rw-r--r--res/res_phoneprov.c4
-rw-r--r--res/res_pktccops.c1
-rw-r--r--res/res_realtime.c4
-rw-r--r--res/res_rtp_asterisk.c23
-rw-r--r--res/res_rtp_multicast.c4
-rw-r--r--res/res_security_log.c4
-rw-r--r--res/res_smdi.c4
-rw-r--r--res/res_snmp.c1
-rw-r--r--res/res_speech.c4
-rw-r--r--res/res_srtp.c3
-rw-r--r--res/res_stun_monitor.c4
-rw-r--r--res/res_timing_dahdi.c1
-rw-r--r--res/res_timing_kqueue.c1
-rw-r--r--res/res_timing_pthread.c4
-rw-r--r--res/res_timing_timerfd.c29
-rw-r--r--sounds/Makefile23
-rw-r--r--tests/test_acl.c1
-rw-r--r--tests/test_amihooks.c1
-rw-r--r--tests/test_aoc.c1
-rw-r--r--tests/test_app.c1
-rw-r--r--tests/test_ast_format_str_reduce.c1
-rw-r--r--tests/test_astobj2.c1
-rw-r--r--tests/test_db.c28
-rw-r--r--tests/test_devicestate.c1
-rw-r--r--tests/test_dlinklists.c1
-rw-r--r--tests/test_event.c1
-rw-r--r--tests/test_expr.c1
-rw-r--r--tests/test_func_file.c1
-rw-r--r--tests/test_gosub.c1
-rw-r--r--tests/test_heap.c1
-rw-r--r--tests/test_linkedlists.c215
-rw-r--r--tests/test_locale.c1
-rw-r--r--tests/test_logger.c1
-rw-r--r--tests/test_netsock2.c5
-rw-r--r--tests/test_pbx.c1
-rw-r--r--tests/test_poll.c1
-rw-r--r--tests/test_sched.c1
-rw-r--r--tests/test_security_events.c1
-rw-r--r--tests/test_skel.c1
-rw-r--r--tests/test_stringfields.c1
-rw-r--r--tests/test_strings.c1
-rw-r--r--tests/test_substitution.c4
-rw-r--r--tests/test_time.c1
-rw-r--r--tests/test_utils.c1
-rw-r--r--utils/Makefile10
-rw-r--r--utils/ael_main.c5
-rw-r--r--utils/astcanary.c4
-rw-r--r--utils/astdb2sqlite3.c231
-rw-r--r--utils/astman.c4
-rw-r--r--utils/check_expr.c4
-rw-r--r--utils/conf2ael.c1
-rw-r--r--utils/db1-ast/Makefile (renamed from main/db1-ast/Makefile)0
-rw-r--r--utils/db1-ast/btree/bt_close.c (renamed from main/db1-ast/btree/bt_close.c)0
-rw-r--r--utils/db1-ast/btree/bt_conv.c (renamed from main/db1-ast/btree/bt_conv.c)0
-rw-r--r--utils/db1-ast/btree/bt_debug.c (renamed from main/db1-ast/btree/bt_debug.c)0
-rw-r--r--utils/db1-ast/btree/bt_delete.c (renamed from main/db1-ast/btree/bt_delete.c)0
-rw-r--r--utils/db1-ast/btree/bt_get.c (renamed from main/db1-ast/btree/bt_get.c)0
-rw-r--r--utils/db1-ast/btree/bt_open.c (renamed from main/db1-ast/btree/bt_open.c)0
-rw-r--r--utils/db1-ast/btree/bt_overflow.c (renamed from main/db1-ast/btree/bt_overflow.c)0
-rw-r--r--utils/db1-ast/btree/bt_page.c (renamed from main/db1-ast/btree/bt_page.c)0
-rw-r--r--utils/db1-ast/btree/bt_put.c (renamed from main/db1-ast/btree/bt_put.c)0
-rw-r--r--utils/db1-ast/btree/bt_search.c (renamed from main/db1-ast/btree/bt_search.c)0
-rw-r--r--utils/db1-ast/btree/bt_seq.c (renamed from main/db1-ast/btree/bt_seq.c)0
-rw-r--r--utils/db1-ast/btree/bt_split.c (renamed from main/db1-ast/btree/bt_split.c)0
-rw-r--r--utils/db1-ast/btree/bt_utils.c (renamed from main/db1-ast/btree/bt_utils.c)0
-rw-r--r--utils/db1-ast/btree/btree.h (renamed from main/db1-ast/btree/btree.h)0
-rw-r--r--utils/db1-ast/btree/extern.h (renamed from main/db1-ast/btree/extern.h)0
-rw-r--r--utils/db1-ast/db/db.c (renamed from main/db1-ast/db/db.c)0
-rw-r--r--utils/db1-ast/hash/README (renamed from main/db1-ast/hash/README)0
-rw-r--r--utils/db1-ast/hash/extern.h (renamed from main/db1-ast/hash/extern.h)0
-rw-r--r--utils/db1-ast/hash/hash.c (renamed from main/db1-ast/hash/hash.c)0
-rw-r--r--utils/db1-ast/hash/hash.h (renamed from main/db1-ast/hash/hash.h)0
-rw-r--r--utils/db1-ast/hash/hash_bigkey.c (renamed from main/db1-ast/hash/hash_bigkey.c)0
-rw-r--r--utils/db1-ast/hash/hash_buf.c (renamed from main/db1-ast/hash/hash_buf.c)0
-rw-r--r--utils/db1-ast/hash/hash_func.c (renamed from main/db1-ast/hash/hash_func.c)0
-rw-r--r--utils/db1-ast/hash/hash_log2.c (renamed from main/db1-ast/hash/hash_log2.c)0
-rw-r--r--utils/db1-ast/hash/hash_page.c (renamed from main/db1-ast/hash/hash_page.c)0
-rw-r--r--utils/db1-ast/hash/hsearch.c (renamed from main/db1-ast/hash/hsearch.c)0
-rw-r--r--utils/db1-ast/hash/ndbm.c (renamed from main/db1-ast/hash/ndbm.c)0
-rw-r--r--utils/db1-ast/hash/page.h (renamed from main/db1-ast/hash/page.h)0
-rw-r--r--utils/db1-ast/hash/search.h (renamed from main/db1-ast/hash/search.h)0
-rw-r--r--utils/db1-ast/include/circ-queue.h (renamed from main/db1-ast/include/circ-queue.h)0
-rw-r--r--utils/db1-ast/include/compat.h (renamed from main/db1-ast/include/compat.h)0
-rw-r--r--utils/db1-ast/include/db.h (renamed from main/db1-ast/include/db.h)0
-rw-r--r--utils/db1-ast/include/mpool.h (renamed from main/db1-ast/include/mpool.h)0
-rw-r--r--utils/db1-ast/include/ndbm.h (renamed from main/db1-ast/include/ndbm.h)0
-rw-r--r--utils/db1-ast/libdb.map (renamed from main/db1-ast/libdb.map)0
-rw-r--r--utils/db1-ast/mpool/README (renamed from main/db1-ast/mpool/README)0
-rw-r--r--utils/db1-ast/mpool/mpool.c (renamed from main/db1-ast/mpool/mpool.c)6
-rw-r--r--utils/db1-ast/recno/extern.h (renamed from main/db1-ast/recno/extern.h)0
-rw-r--r--utils/db1-ast/recno/rec_close.c (renamed from main/db1-ast/recno/rec_close.c)0
-rw-r--r--utils/db1-ast/recno/rec_delete.c (renamed from main/db1-ast/recno/rec_delete.c)0
-rw-r--r--utils/db1-ast/recno/rec_get.c (renamed from main/db1-ast/recno/rec_get.c)0
-rw-r--r--utils/db1-ast/recno/rec_open.c (renamed from main/db1-ast/recno/rec_open.c)0
-rw-r--r--utils/db1-ast/recno/rec_put.c (renamed from main/db1-ast/recno/rec_put.c)0
-rw-r--r--utils/db1-ast/recno/rec_search.c (renamed from main/db1-ast/recno/rec_search.c)0
-rw-r--r--utils/db1-ast/recno/rec_seq.c (renamed from main/db1-ast/recno/rec_seq.c)0
-rw-r--r--utils/db1-ast/recno/rec_utils.c (renamed from main/db1-ast/recno/rec_utils.c)0
-rw-r--r--utils/db1-ast/recno/recno.h (renamed from main/db1-ast/recno/recno.h)0
-rw-r--r--utils/extconf.c5
-rw-r--r--utils/hashtest.c4
-rw-r--r--utils/hashtest2.c4
-rw-r--r--utils/muted.c4
-rw-r--r--utils/refcounter.c4
-rw-r--r--utils/smsq.c4
-rw-r--r--utils/stereorize.c4
-rw-r--r--utils/streamplayer.c4
-rw-r--r--utils/utils.xml3
383 files changed, 4762 insertions, 1713 deletions
diff --git a/BUGS b/BUGS
index 86fbb76fd..624459ea5 100644
--- a/BUGS
+++ b/BUGS
@@ -4,7 +4,7 @@ Asterisk Bug Tracking Information
To learn about and report Asterisk bugs, please visit
the official Asterisk Bug Tracker at:
- https://issues.asterisk.org
+ https://issues.asterisk.org/jira
For more information on using the bug tracker, or to
learn how you can contribute by acting as a bug marshal
diff --git a/CHANGES b/CHANGES
index 53587b598..869f2d0e4 100644
--- a/CHANGES
+++ b/CHANGES
@@ -9,7 +9,7 @@
==============================================================================
------------------------------------------------------------------------------
---- Functionality changes from Asterisk 1.8 to Asterisk 1.10 -----------------
+--- Functionality changes from Asterisk 1.8 to Asterisk 10 -------------------
------------------------------------------------------------------------------
Text Messaging
@@ -75,6 +75,11 @@ CODECS
--------------------------
* Ability to define custom SILK formats in codecs.conf.
* Addition of speex32 audio format with translation.
+ * CELT codec pass-through support and ability to define
+ custom CELT formats in codecs.conf.
+ * Ability to read raw signed linear files with sample rates
+ ranging from 8khz - 192khz. The new file extensions introduced
+ are .sln12, .sln24, .sln32, .sln44, .sln48, .sln96, .sln192.
ConfBridge
--------------------------
@@ -82,11 +87,14 @@ ConfBridge
mixing audio at sample rates ranging from 8khz-96khz.
* CONFBRIDGE dialplan function capable of creating dynamic ConfBridge user
and bridge profiles on a channel.
- * CONFBRIDGE_INFO dialplan function capable of retreiving information
+ * CONFBRIDGE_INFO dialplan function capable of retrieving information
about a conference such as locked status and number of parties, admins,
and marked users.
* Addition of video_mode option in confbridge.conf for adding video support
into a bridge profile.
+ * Addition of the follow_talker video_mode in confbridge.conf. This video
+ mode dynamically switches the video feed to always display the loudest talker
+ supplying video in the conference.
Dialplan Variables
------------------
@@ -148,7 +156,7 @@ pbx_lua
in the sample extensions.lua file for syntax details.
* Applications that perform jumps in the dialplan such as Goto will now
execute properly. When pbx_lua detects that the context, extension, or
- priority we are executing on has changed it will immediatly return control
+ priority we are executing on has changed it will immediately return control
to the asterisk PBX engine. Currently the engine cannot detect a Goto to
the priority after the currently executing priority.
* An autoservice is now started by default for pbx_lua channels. It can be
@@ -188,6 +196,19 @@ Applications
* Added ability to include '@parkinglot' to ParkedCall extension in order to specify
a specific parkinglot on which to search the extension.
+Asterisk Database
+-----------------
+ * The internal Asterisk database has been switched from Berkeley DB 1.86 to
+ SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
+ utility in the UTILS section of menuselect. If an existing astdb is found and no
+ astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
+ convert an existing astdb to the SQLite3 version automatically at runtime.
+
+Asterisk Modules
+----------------
+ * Modules marked as deprecated are no longer marked as building by default. Enabling
+ these modules is still available via menuselect.
+
------------------------------------------------------------------------------
--- Functionality changes from Asterisk 1.6.2 to Asterisk 1.8 ----------------
------------------------------------------------------------------------------
diff --git a/Makefile b/Makefile
index 0615d60c8..87139c118 100644
--- a/Makefile
+++ b/Makefile
@@ -467,9 +467,9 @@ datafiles: _all doc/core-en_US.xml
# improved a lot. I'll put it here for now.
for x in static-http/*; do \
- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/static-http" ; \
+ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/static-http ; \
done
- $(INSTALL) -m 644 doc/core-en_US.xml "$(DESTDIR)$(ASTDATADIR)/static-http";
+ $(INSTALL) -m 644 doc/core-en_US.xml $(DESTDIR)$(ASTDATADIR)/static-http;
if [ -d doc/tex/asterisk ] ; then \
$(INSTALL) -d "$(DESTDIR)$(ASTDATADIR)/static-http/docs" ; \
for n in doc/tex/asterisk/* ; do \
@@ -477,7 +477,7 @@ datafiles: _all doc/core-en_US.xml
done \
fi
for x in images/*.jpg; do \
- $(INSTALL) -m 644 $$x "$(DESTDIR)$(ASTDATADIR)/images" ; \
+ $(INSTALL) -m 644 $$x $(DESTDIR)$(ASTDATADIR)/images ; \
done
$(MAKE) -C sounds install
@@ -576,21 +576,21 @@ bininstall: _all installdirs $(SUBDIRS_INSTALL)
rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
fi
- $(INSTALL) -m 644 doc/core-*.xml "$(DESTDIR)$(ASTDATADIR)/documentation"
- $(INSTALL) -m 644 doc/appdocsxml.dtd "$(DESTDIR)$(ASTDATADIR)/documentation"
- $(INSTALL) -m 644 doc/asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
- $(INSTALL) -m 644 contrib/scripts/astgenkey.8 "$(DESTDIR)$(ASTMANDIR)/man8"
- $(INSTALL) -m 644 contrib/scripts/autosupport.8 "$(DESTDIR)$(ASTMANDIR)/man8"
- $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 "$(DESTDIR)$(ASTMANDIR)/man8"
+ $(INSTALL) -m 644 doc/core-*.xml $(DESTDIR)$(ASTDATADIR)/documentation
+ $(INSTALL) -m 644 doc/appdocsxml.dtd $(DESTDIR)$(ASTDATADIR)/documentation
+ $(INSTALL) -m 644 doc/asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
+ $(INSTALL) -m 644 contrib/scripts/astgenkey.8 $(DESTDIR)$(ASTMANDIR)/man8
+ $(INSTALL) -m 644 contrib/scripts/autosupport.8 $(DESTDIR)$(ASTMANDIR)/man8
+ $(INSTALL) -m 644 contrib/scripts/safe_asterisk.8 $(DESTDIR)$(ASTMANDIR)/man8
if [ -f contrib/firmware/iax/iaxy.bin ] ; then \
- $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin "$(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin"; \
+ $(INSTALL) -m 644 contrib/firmware/iax/iaxy.bin $(DESTDIR)$(ASTDATADIR)/firmware/iax/iaxy.bin; \
fi
$(SUBDIRS_INSTALL):
+@DESTDIR="$(DESTDIR)" ASTSBINDIR="$(ASTSBINDIR)" $(SUBMAKE) -C $(@:-install=) install
NEWMODS:=$(foreach d,$(MOD_SUBDIRS),$(notdir $(wildcard $(d)/*.so)))
-OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard "$(DESTDIR)$(MODULES_DIR)/*.so")))
+OLDMODS=$(filter-out $(NEWMODS),$(notdir $(wildcard $(DESTDIR)$(MODULES_DIR)/*.so)))
oldmodcheck:
@if [ -n "$(OLDMODS)" ]; then \
@@ -698,33 +698,33 @@ samples: adsi
rm -f $(DESTDIR)$(ASTCONFPATH).tmp ; \
fi ; \
$(INSTALL) -d $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default/1234/INBOX
- build_tools/make_sample_voicemail "$(DESTDIR)$(ASTDATADIR)" "$(DESTDIR)$(ASTSPOOLDIR)"
+ build_tools/make_sample_voicemail $(DESTDIR)/$(ASTDATADIR) $(DESTDIR)/$(ASTSPOOLDIR)
@for x in phoneprov/*; do \
dst="$(DESTDIR)$(ASTDATADIR)/$$x" ; \
- if [ -f "$${dst}" ]; then \
+ if [ -f $${dst} ]; then \
if [ "$(OVERWRITE)" = "y" ]; then \
- if cmp -s "$${dst}" $$x ; then \
+ if cmp -s $${dst} $$x ; then \
echo "Config file $$x is unchanged"; \
continue; \
fi ; \
- mv -f "$${dst}" "$${dst}.old" ; \
+ mv -f $${dst} $${dst}.old ; \
else \
echo "Skipping config file $$x"; \
continue; \
fi ;\
fi ; \
echo "Installing file $$x"; \
- $(INSTALL) -m 644 $$x "$${dst}" ;\
+ $(INSTALL) -m 644 $$x $${dst} ;\
done
webvmail:
@[ -d $(DESTDIR)$(HTTP_DOCSDIR)/ ] || ( printf "http docs directory not found.\nUpdate assignment of variable HTTP_DOCSDIR in Makefile!\n" && exit 1 )
@[ -d $(DESTDIR)$(HTTP_CGIDIR) ] || ( printf "cgi-bin directory not found.\nUpdate assignment of variable HTTP_CGIDIR in Makefile!\n" && exit 1 )
- $(INSTALL) -m 4755 contrib/scripts/vmail.cgi "$(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi"
+ $(INSTALL) -m 4755 contrib/scripts/vmail.cgi $(DESTDIR)$(HTTP_CGIDIR)/vmail.cgi
$(INSTALL) -d $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk
for x in images/*.gif; do \
- $(INSTALL) -m 644 $$x "$(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/"; \
+ $(INSTALL) -m 644 $$x $(DESTDIR)$(HTTP_DOCSDIR)/_asterisk/; \
done
@echo " +--------- Asterisk Web Voicemail ----------+"
@echo " + +"
@@ -838,17 +838,18 @@ sounds:
cleantest:
@cmp -s .cleancount .lastclean || $(MAKE) clean
+ @[ -f "$(DESTDIR)$(ASTDBDIR)/astdb.sqlite3" ] || [ ! -f "$(DESTDIR)$(ASTDBDIR)/astdb" ] || [ ! -f menuselect.makeopts ] || grep -q MENUSELECT_UTILS=.*astdb2sqlite3 menuselect.makeopts || (sed -i.orig -e's/MENUSELECT_UTILS=\(.*\)/MENUSELECT_UTILS=\1 astdb2sqlite3/' menuselect.makeopts && echo "Updating menuselect.makeopts to include astdb2sqlite3" && echo "Original version backed up to menuselect.makeopts.orig")
$(SUBDIRS_UNINSTALL):
+@$(SUBMAKE) -C $(@:-uninstall=) uninstall
_uninstall: $(SUBDIRS_UNINSTALL)
- rm -f "$(DESTDIR)$(MODULES_DIR)/*"
+ rm -f $(DESTDIR)$(MODULES_DIR)/*
rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
rm -rf $(DESTDIR)$(ASTHEADERDIR)
- rm -rf "$(DESTDIR)$(ASTDATADIR)/firmware"
+ rm -rf $(DESTDIR)$(ASTDATADIR)/firmware
rm -f $(DESTDIR)$(ASTMANDIR)/man8/asterisk.8
rm -f $(DESTDIR)$(ASTMANDIR)/man8/astgenkey.8
rm -f $(DESTDIR)$(ASTMANDIR)/man8/autosupport.8
@@ -870,12 +871,12 @@ uninstall: _uninstall
@echo " +-------------------------------------------+"
uninstall-all: _uninstall
- rm -rf "$(DESTDIR)$(ASTLIBDIR)"
- rm -rf "$(DESTDIR)$(ASTVARLIBDIR)"
- rm -rf "$(DESTDIR)$(ASTDATADIR)"
- rm -rf "$(DESTDIR)$(ASTSPOOLDIR)"
- rm -rf "$(DESTDIR)$(ASTETCDIR)"
- rm -rf "$(DESTDIR)$(ASTLOGDIR)"
+ rm -rf $(DESTDIR)$(ASTLIBDIR)
+ rm -rf $(DESTDIR)$(ASTVARLIBDIR)
+ rm -rf $(DESTDIR)$(ASTDATADIR)
+ rm -rf $(DESTDIR)$(ASTSPOOLDIR)
+ rm -rf $(DESTDIR)$(ASTETCDIR)
+ rm -rf $(DESTDIR)$(ASTLOGDIR)
menuconfig: menuselect
diff --git a/Makefile.moddir_rules b/Makefile.moddir_rules
index b0bc148ac..b883548af 100644
--- a/Makefile.moddir_rules
+++ b/Makefile.moddir_rules
@@ -122,7 +122,7 @@ clean::
install:: all
@echo "Installing modules from `basename $(CURDIR)`..."
- @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x "$(DESTDIR)$(MODULES_DIR)" ; done
+ @for x in $(LOADABLE_MODS:%=%.so); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall::
diff --git a/UPGRADE-1.8.txt b/UPGRADE-1.8.txt
index 5d40e2eb1..b70ff07f6 100644
--- a/UPGRADE-1.8.txt
+++ b/UPGRADE-1.8.txt
@@ -20,6 +20,8 @@
From 1.6.2 to 1.8:
+* Asterisk now requires libpri 1.4.11+ for PRI support.
+
* A couple of CLI commands in res_ais were changed back to their original form:
"ais show clm members" --> "ais clm show members"
"ais show evt event channels" --> "ais evt show event channels"
diff --git a/UPGRADE-10.txt b/UPGRADE-10.txt
new file mode 100644
index 000000000..c5d927b51
--- /dev/null
+++ b/UPGRADE-10.txt
@@ -0,0 +1,81 @@
+===========================================================
+===
+=== Information for upgrading between Asterisk versions
+===
+=== These files document all the changes that MUST be taken
+=== into account when upgrading between the Asterisk
+=== versions listed below. These changes may require that
+=== you modify your configuration files, dialplan or (in
+=== some cases) source code if you have your own Asterisk
+=== modules or patches. These files also include advance
+=== notice of any functionality that has been marked as
+=== 'deprecated' and may be removed in a future release,
+=== along with the suggested replacement functionality.
+===
+=== UPGRADE-1.2.txt -- Upgrade info for 1.0 to 1.2
+=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
+=== UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
+=== UPGRADE-1.8.txt -- Upgrade info for 1.6 to 1.8
+===
+===========================================================
+
+From 1.8 to 10:
+
+cel_pgsql:
+ - This module now expects an 'extra' column in the database for data added
+ using the CELGenUserEvent() application.
+
+ConfBridge
+ - ConfBridge's dialplan arguments have changed and are not
+ backwards compatible.
+
+File Interpreters
+ - The format interpreter formats/format_sln16.c for the file extension
+ '.sln16' has been removed. The '.sln16' file interpreter now exists
+ in the formats/format_sln.c module along with new support for sln12,
+ sln24, sln32, sln44, sln48, sln96, and sln192 file extensions.
+
+HTTP:
+ - A bindaddr must be specified in order for the HTTP server
+ to run. Previous versions would default to 0.0.0.0 if no
+ bindaddr was specified.
+
+Gtalk:
+ - The default value for 'context' and 'parkinglots' in gtalk.conf has
+ been changed to 'default', previously they were empty.
+
+chan_dahdi:
+ - The mohinterpret=passthrough setting is deprecated in favor of
+ moh_signaling=notify.
+
+pbx_lua:
+ - Execution no longer continues after applications that do dialplan jumps
+ (such as app.goto). Now when an application such as app.goto() is called,
+ control is returned back to the pbx engine and the current extension
+ function stops executing.
+ - the autoservice now defaults to being on by default
+ - autoservice_start() and autoservice_start() no longer return a value.
+
+Queue:
+ - Mark QUEUE_MEMBER_PENALTY Deprecated it never worked for realtime members
+ - QUEUE_MEMBER is now R/W supporting setting paused, ignorebusy and penalty.
+
+Asterisk Database:
+ - The internal Asterisk database has been switched from Berkeley DB 1.86 to
+ SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
+ utility in the UTILS section of menuselect. If an existing astdb is found and no
+ astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
+ convert an existing astdb to the SQLite3 version automatically at runtime.
+
+Module Support Level
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ formats, funcs, pbx, and res have been updated to include MODULEINFO data
+ that includes <support_level> tags with a value of core, extended, or deprecated.
+ More information is available on the Asterisk wiki at
+ https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
+
+ Deprecated modules are now marked to not build by default and must be explicitly
+ enabled in menuselect.
+
+===========================================================
+===========================================================
diff --git a/UPGRADE.txt b/UPGRADE.txt
index dfa85684e..d7803b4d3 100644
--- a/UPGRADE.txt
+++ b/UPGRADE.txt
@@ -16,10 +16,15 @@
=== UPGRADE-1.4.txt -- Upgrade info for 1.2 to 1.4
=== UPGRADE-1.6.txt -- Upgrade info for 1.4 to 1.6
=== UPGRADE-1.8.txt -- Upgrade info for 1.6 to 1.8
+=== UPGRADE-10.txt -- Upgrade info for 1.8 to 10
===
===========================================================
-From 1.8 to 1.10:
+From 10 to 12:
+
+* No significant changes as of yet.
+
+From 1.8 to 10:
cel_pgsql:
- This module now expects an 'extra' column in the database for data added
@@ -29,6 +34,12 @@ ConfBridge
- ConfBridge's dialplan arguments have changed and are not
backwards compatible.
+File Interpreters
+ - The format interpreter formats/format_sln16.c for the file extension
+ '.sln16' has been removed. The '.sln16' file interpreter now exists
+ in the formats/format_sln.c module along with new support for sln12,
+ sln24, sln32, sln44, sln48, sln96, and sln192 file extensions.
+
HTTP:
- A bindaddr must be specified in order for the HTTP server
to run. Previous versions would default to 0.0.0.0 if no
@@ -54,5 +65,22 @@ Queue:
- Mark QUEUE_MEMBER_PENALTY Deprecated it never worked for realtime members
- QUEUE_MEMBER is now R/W supporting setting paused, ignorebusy and penalty.
+Asterisk Database:
+ - The internal Asterisk database has been switched from Berkeley DB 1.86 to
+ SQLite 3. An existing Berkeley astdb file can be converted with the astdb2sqlite3
+ utility in the UTILS section of menuselect. If an existing astdb is found and no
+ astdb.sqlite3 exists, astdb2sqlite3 will be compiled automatically. Asterisk will
+ convert an existing astdb to the SQLite3 version automatically at runtime.
+
+Module Support Level
+ - All modules in the addons, apps, bridge, cdr, cel, channels, codecs,
+ formats, funcs, pbx, and res have been updated to include MODULEINFO data
+ that includes <support_level> tags with a value of core, extended, or deprecated.
+ More information is available on the Asterisk wiki at
+ https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
+
+ Deprecated modules are now marked to not build by default and must be explicitly
+ enabled in menuselect.
+
===========================================================
===========================================================
diff --git a/addons/app_mysql.c b/addons/app_mysql.c
index 589b23823..5649166a7 100644
--- a/addons/app_mysql.c
+++ b/addons/app_mysql.c
@@ -26,6 +26,8 @@
/*** MODULEINFO
<depend>mysqlclient</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>func_odbc</replacement>
***/
#include "asterisk.h"
diff --git a/addons/app_saycountpl.c b/addons/app_saycountpl.c
index 915779899..b4441f24f 100644
--- a/addons/app_saycountpl.c
+++ b/addons/app_saycountpl.c
@@ -22,6 +22,8 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>say.conf</replacement>
***/
#include "asterisk.h"
diff --git a/addons/cdr_mysql.c b/addons/cdr_mysql.c
index 60abae2d9..ecdfaea0b 100644
--- a/addons/cdr_mysql.c
+++ b/addons/cdr_mysql.c
@@ -36,6 +36,8 @@
/*** MODULEINFO
<depend>mysqlclient</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>cdr_adaptive_odbc</replacement>
***/
#include "asterisk.h"
diff --git a/addons/chan_mobile.c b/addons/chan_mobile.c
index 5495c7f22..7c1492729 100644
--- a/addons/chan_mobile.c
+++ b/addons/chan_mobile.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>bluetooth</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 5c2131c93..32d1cf7d4 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -19,11 +19,48 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "chan_ooh323.h"
#include <math.h>
+/*** DOCUMENTATION
+ <function name="OOH323" language="en_US">
+ <synopsis>
+ Allow Setting / Reading OOH323 Settings
+ </synopsis>
+ <syntax>
+ <parameter name="name" required="true">
+ <enumlist>
+ <enum name="faxdetect">
+ <para>Fax Detect [R/W]</para>
+ <para>Returns 0 or 1</para>
+ <para>Write yes or no</para>
+ </enum>
+ </enumlist>
+ <enumlist>
+ <enum name="t38support">
+ <para>t38support [R/W]</para>
+ <para>Returns 0 or 1</para>
+ <para>Write yes or no</para>
+ </enum>
+ </enumlist>
+ <enumlist>
+ <enum name="h323id">
+ <para>Returns h323id [R]</para>
+ </enum>
+ </enumlist>
+ </parameter>
+ </syntax>
+ <description>
+ <para>Read and set channel parameters in the dialplan.
+ <replaceable>name</replaceable> is one of the above only those with a [W] can be writen to.
+ </para>
+ </description>
+ </function>
+***/
+
#define FORMAT_STRING_SIZE 512
/* Defaults */
@@ -49,6 +86,9 @@
#define T38_ENABLED 1
#define T38_FAXGW 1
+#define FAXDETECT_CNG 1
+#define FAXDETECT_T38 2
+
/* Channel description */
static const char type[] = "OOH323";
static const char tdesc[] = "Objective Systems H323 Channel Driver";
@@ -138,6 +178,8 @@ static struct ooh323_pvt {
struct ast_rtp_instance *vrtp; /* Placeholder for now */
int t38support; /* T.38 mode - disable, transparent, faxgw */
+ int faxdetect;
+ int faxdetected;
int rtptimeout;
struct ast_udptl *udptl;
int faxmode;
@@ -199,25 +241,26 @@ AST_MUTEX_DEFINE_STATIC(iflock);
/* Profile of H.323 user registered with PBX*/
struct ooh323_user{
ast_mutex_t lock;
- char name[256];
- char context[AST_MAX_EXTENSION];
- int incominglimit;
- unsigned inUse;
- char accountcode[20];
- int amaflags;
+ char name[256];
+ char context[AST_MAX_EXTENSION];
+ int incominglimit;
+ unsigned inUse;
+ char accountcode[20];
+ int amaflags;
struct ast_format_cap *cap;
struct ast_codec_pref prefs;
- int dtmfmode;
- int dtmfcodec;
- int t38support;
- int rtptimeout;
- int mUseIP; /* Use IP address or H323-ID to search user */
- char mIP[4*8+7+2]; /* Max for IPv6 - 2 brackets, 8 4hex, 7 - : */
- struct OOH323Regex *rtpmask;
- char rtpmaskstr[120];
- int rtdrcount, rtdrinterval;
- int faststart, h245tunneling;
- int g729onlyA;
+ int dtmfmode;
+ int dtmfcodec;
+ int faxdetect;
+ int t38support;
+ int rtptimeout;
+ int mUseIP; /* Use IP address or H323-ID to search user */
+ char mIP[4*8+7+2]; /* Max for IPv6 - 2 brackets, 8 4hex, 7 - : */
+ struct OOH323Regex *rtpmask;
+ char rtpmaskstr[120];
+ int rtdrcount, rtdrinterval;
+ int faststart, h245tunneling;
+ int g729onlyA;
struct ooh323_user *next;
};
@@ -233,6 +276,7 @@ struct ooh323_peer{
int amaflags;
int dtmfmode;
int dtmfcodec;
+ int faxdetect;
int t38support;
int mFriend; /* indicates defined as friend */
char ip[4*8+7+2]; /* Max for IPv6 - 2 brackets, 8 4hex, 7 - : */
@@ -295,6 +339,7 @@ static struct ast_format_cap *gCap;
static struct ast_codec_pref gPrefs;
static int gDTMFMode = H323_DTMF_RFC2833;
static int gDTMFCodec = 101;
+static int gFAXdetect = FAXDETECT_CNG;
static int gT38Support = T38_FAXGW;
static char gGatekeeper[100];
static enum RasGatekeeperMode gRasGkMode = RasNoGatekeeper;
@@ -343,10 +388,12 @@ static pthread_t monitor_thread = AST_PTHREADT_NULL;
static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
- const char *host, struct ast_format_cap *cap, const char *linkedid)
+ const char *host, struct ast_format_cap *cap, const char *linkedid)
{
struct ast_channel *ch = NULL;
struct ast_format tmpfmt;
+ int features = 0;
+
if (gH323Debug)
ast_verbose("--- ooh323_new - %s\n", host);
@@ -388,16 +435,27 @@ static struct ast_channel *ooh323_new(struct ooh323_pvt *i, int state,
ast_module_ref(myself);
/* Allocate dsp for in-band DTMF support */
- if (i->dtmfmode & H323_DTMF_INBAND) {
+ if ((i->dtmfmode & H323_DTMF_INBAND) || (i->faxdetect & FAXDETECT_CNG)) {
i->vad = ast_dsp_new();
- ast_dsp_set_features(i->vad, DSP_FEATURE_DIGIT_DETECT);
- ast_dsp_set_features(i->vad,
- DSP_FEATURE_DIGIT_DETECT | DSP_FEATURE_FAX_DETECT);
- ast_dsp_set_faxmode(i->vad,
- DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED);
+ }
- if (i->dtmfmode & H323_DTMF_INBANDRELAX)
+ /* inband DTMF*/
+ if (i->dtmfmode & H323_DTMF_INBAND) {
+ features |= DSP_FEATURE_DIGIT_DETECT;
+ if (i->dtmfmode & H323_DTMF_INBANDRELAX) {
ast_dsp_set_digitmode(i->vad, DSP_DIGITMODE_DTMF | DSP_DIGITMODE_RELAXDTMF);
+ }
+ }
+
+ /* fax detection*/
+ if (i->faxdetect & FAXDETECT_CNG) {
+ features |= DSP_FEATURE_FAX_DETECT;
+ ast_dsp_set_faxmode(i->vad,
+ DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED);
+ }
+
+ if (features) {
+ ast_dsp_set_features(i->vad, features);
}
ast_mutex_lock(&usecnt_lock);
@@ -484,6 +542,9 @@ static struct ooh323_pvt *ooh323_alloc(int callref, char *callToken)
ast_mutex_lock(&pvt->lock);
pvt->faxmode = 0;
+ pvt->chmodepend = 0;
+ pvt->faxdetected = 0;
+ pvt->faxdetect = gFAXdetect;
pvt->t38support = gT38Support;
pvt->rtptimeout = gRTPTimeout;
pvt->rtdrinterval = gRTDRInterval;
@@ -610,6 +671,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
p->g729onlyA = peer->g729onlyA;
p->dtmfmode |= peer->dtmfmode;
p->dtmfcodec = peer->dtmfcodec;
+ p->faxdetect = peer->faxdetect;
p->t38support = peer->t38support;
p->rtptimeout = peer->rtptimeout;
p->faststart = peer->faststart;
@@ -639,6 +701,7 @@ static struct ast_channel *ooh323_request(const char *type, struct ast_format_ca
p->g729onlyA = g729onlyA;
p->dtmfmode = gDTMFMode;
p->dtmfcodec = gDTMFCodec;
+ p->faxdetect = gFAXdetect;
p->t38support = gT38Support;
p->rtptimeout = gRTPTimeout;
ast_format_cap_copy(p->cap, gCap);
@@ -828,17 +891,7 @@ static int ooh323_digit_begin(struct ast_channel *chan, char digit)
}
ast_mutex_lock(&p->lock);
-
- if (digit == 'e' && !p->faxmode && p->t38support != T38_DISABLED) {
- if (!p->chmodepend) {
- if (gH323Debug)
- ast_verbose("request to change %s to t.38 because fax cng\n",
- p->callToken);
- p->chmodepend = 1;
- ooRequestChangeMode(p->callToken, 1);
- }
-
- } else if (p->rtp && ((p->dtmfmode & H323_DTMF_RFC2833) || (p->dtmfmode & H323_DTMF_CISCO))) {
+ if (p->rtp && ((p->dtmfmode & H323_DTMF_RFC2833) || (p->dtmfmode & H323_DTMF_CISCO))) {
ast_rtp_instance_dtmf_begin(p->rtp, digit);
} else if (((p->dtmfmode & H323_DTMF_Q931) ||
(p->dtmfmode & H323_DTMF_H245ALPHANUMERIC) ||
@@ -1270,27 +1323,50 @@ static int ooh323_indicate(struct ast_channel *ast, int condition, const void *d
(int)sizeof(enum ast_control_t38), (int)datalen);
} else {
const struct ast_control_t38_parameters *parameters = data;
+ struct ast_control_t38_parameters our_parameters;
enum ast_control_t38 message = parameters->request_response;
switch (message) {
+ case AST_T38_NEGOTIATED:
+ if (p->faxmode) {
+ res = 0;
+ break;
+ }
case AST_T38_REQUEST_NEGOTIATE:
- if (!p->chmodepend && !p->faxmode) {
- ooRequestChangeMode(p->callToken, 1);
+ if (p->faxmode) {
+ /* T.38 already negotiated */
+ our_parameters.request_response = AST_T38_NEGOTIATED;
+ our_parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
+ our_parameters.rate = AST_T38_RATE_14400;
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &our_parameters, sizeof(our_parameters));
+ } else if (!p->chmodepend) {
p->chmodepend = 1;
+ ooRequestChangeMode(p->callToken, 1);
res = 0;
}
break;
case AST_T38_REQUEST_TERMINATE:
- if (!p->chmodepend && p->faxmode) {
- ooRequestChangeMode(p->callToken, 0);
+ if (!p->faxmode) {
+ /* T.38 already terminated */
+ our_parameters.request_response = AST_T38_TERMINATED;
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &our_parameters, sizeof(our_parameters));
+ } else if (!p->chmodepend) {
p->chmodepend = 1;
+ ooRequestChangeMode(p->callToken, 0);
res = 0;
}
break;
+ case AST_T38_REQUEST_PARMS:
+ our_parameters.request_response = AST_T38_REQUEST_PARMS;
+ our_parameters.max_ifp = ast_udptl_get_far_max_ifp(p->udptl);
+ our_parameters.rate = AST_T38_RATE_14400;
+ ast_queue_control_data(p->owner, AST_CONTROL_T38_PARAMETERS, &our_parameters, sizeof(our_parameters));
+ res = AST_T38_REQUEST_PARMS;
+ break;
default:
;
@@ -1336,17 +1412,18 @@ static int ooh323_queryoption(struct ast_channel *ast, int option, void *data, i
case AST_OPTION_T38_STATE:
if (*datalen != sizeof(enum ast_t38_state)) {
- ast_log(LOG_ERROR, "Invalid datalen for AST_OPTION_T38_STATE option."
+ ast_log(LOG_ERROR, "Invalid datalen for AST_OPTION_T38_STATE option."
" Expected %d, got %d\n", (int)sizeof(enum ast_t38_state), *datalen);
break;
}
- if (p->t38support != T38_DISABLED)
- state = T38_STATE_UNKNOWN;
- if (p->faxmode)
- state = (p->chmodepend) ? T38_STATE_UNKNOWN : T38_STATE_NEGOTIATED;
- else if (p->chmodepend)
- state = T38_STATE_NEGOTIATING;
+ if (p->t38support != T38_DISABLED) {
+ if (p->faxmode) {
+ state = (p->chmodepend) ? T38_STATE_NEGOTIATING : T38_STATE_NEGOTIATED;
+ } else {
+ state = T38_STATE_UNKNOWN;
+ }
+ }
*((enum ast_t38_state *) data) = state;
res = 0;
@@ -1762,6 +1839,7 @@ int ooh323_onReceivedSetup(ooCallData *call, Q931Message *pmsg)
memcpy(&p->prefs, &user->prefs, sizeof(struct ast_codec_pref));
p->dtmfmode |= user->dtmfmode;
p->dtmfcodec = user->dtmfcodec;
+ p->faxdetect = user->faxdetect;
p->t38support = user->t38support;
p->rtptimeout = user->rtptimeout;
p->h245tunneling = user->h245tunneling;
@@ -2202,6 +2280,7 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
user->rtptimeout = gRTPTimeout;
user->dtmfmode = gDTMFMode;
user->dtmfcodec = gDTMFCodec;
+ user->faxdetect = gFAXdetect;
user->t38support = gT38Support;
user->faststart = gFastStart;
user->h245tunneling = gTunneling;
@@ -2279,7 +2358,27 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
user->dtmfmode |= ast_true(v->value) ? H323_DTMF_INBANDRELAX : 0;
} else if (!strcasecmp(v->name, "dtmfcodec") && atoi(v->value)) {
user->dtmfcodec = atoi(v->value);
- } else if (!strcasecmp(v->name, "t38support")) {
+ } else if (!strcasecmp(v->name, "faxdetect")) {
+ if (ast_true(v->value)) {
+ user->faxdetect = FAXDETECT_CNG | FAXDETECT_T38;
+ } else if (ast_false(v->value)) {
+ user->faxdetect = 0;
+ } else {
+ char *buf = ast_strdupa(v->value);
+ char *word, *next = buf;
+ user->faxdetect = 0;
+ while ((word = strsep(&next, ","))) {
+ if (!strcasecmp(word, "cng")) {
+ user->faxdetect |= FAXDETECT_CNG;
+ } else if (!strcasecmp(word, "t38")) {
+ user->faxdetect |= FAXDETECT_T38;
+ } else {
+ ast_log(LOG_WARNING, "Unknown faxdetect mode '%s' on line %d.\n", word, v->lineno);
+ }
+ }
+
+ }
+ } else if (!strcasecmp(v->name, "t38support")) {
if (!strcasecmp(v->value, "disabled"))
user->t38support = T38_DISABLED;
if (!strcasecmp(v->value, "no"))
@@ -2322,11 +2421,12 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
peer->amaflags = gAMAFLAGS;
peer->dtmfmode = gDTMFMode;
peer->dtmfcodec = gDTMFCodec;
+ peer->faxdetect = gFAXdetect;
peer->t38support = gT38Support;
peer->faststart = gFastStart;
peer->h245tunneling = gTunneling;
peer->g729onlyA = g729onlyA;
- peer->port = 1720;
+ peer->port = 1720;
if (0 == friend_type) {
peer->mFriend = 1;
}
@@ -2426,7 +2526,27 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
peer->dtmfmode |= ast_true(v->value) ? H323_DTMF_INBANDRELAX : 0;
} else if (!strcasecmp(v->name, "dtmfcodec") && atoi(v->value)) {
peer->dtmfcodec = atoi(v->value);
- } else if (!strcasecmp(v->name, "t38support")) {
+ } else if (!strcasecmp(v->name, "faxdetect")) {
+ if (ast_true(v->value)) {
+ peer->faxdetect = FAXDETECT_CNG | FAXDETECT_T38;
+ } else if (ast_false(v->value)) {
+ peer->faxdetect = 0;
+ } else {
+ char *buf = ast_strdupa(v->value);
+ char *word, *next = buf;
+ peer->faxdetect = 0;
+ while ((word = strsep(&next, ","))) {
+ if (!strcasecmp(word, "cng")) {
+ peer->faxdetect |= FAXDETECT_CNG;
+ } else if (!strcasecmp(word, "t38")) {
+ peer->faxdetect |= FAXDETECT_T38;
+ } else {
+ ast_log(LOG_WARNING, "Unknown faxdetect mode '%s' on line %d.\n", word, v->lineno);
+ }
+ }
+
+ }
+ } else if (!strcasecmp(v->name, "t38support")) {
if (!strcasecmp(v->value, "disabled"))
peer->t38support = T38_DISABLED;
if (!strcasecmp(v->value, "no"))
@@ -2548,6 +2668,7 @@ int reload_config(int reload)
memset(&gPrefs, 0, sizeof(struct ast_codec_pref));
gDTMFMode = H323_DTMF_RFC2833;
gDTMFCodec = 101;
+ gFAXdetect = FAXDETECT_CNG;
gT38Support = T38_FAXGW;
gTRCLVL = OOTRCLVLERR;
gRasGkMode = RasNoGatekeeper;
@@ -2751,7 +2872,27 @@ int reload_config(int reload)
gDTMFMode |= ast_true(v->value) ? H323_DTMF_INBANDRELAX : 0;
} else if (!strcasecmp(v->name, "dtmfcodec") && atoi(v->value)) {
gDTMFCodec = atoi(v->value);
- } else if (!strcasecmp(v->name, "t38support")) {
+ } else if (!strcasecmp(v->name, "faxdetect")) {
+ if (ast_true(v->value)) {
+ gFAXdetect = FAXDETECT_CNG | FAXDETECT_T38;
+ } else if (ast_false(v->value)) {
+ gFAXdetect = 0;
+ } else {
+ char *buf = ast_strdupa(v->value);
+ char *word, *next = buf;
+ gFAXdetect = 0;
+ while ((word = strsep(&next, ","))) {
+ if (!strcasecmp(word, "cng")) {
+ gFAXdetect |= FAXDETECT_CNG;
+ } else if (!strcasecmp(word, "t38")) {
+ gFAXdetect |= FAXDETECT_T38;
+ } else {
+ ast_log(LOG_WARNING, "Unknown faxdetect mode '%s' on line %d.\n", word, v->lineno);
+ }
+ }
+
+ }
+ } else if (!strcasecmp(v->name, "t38support")) {
if (!strcasecmp(v->value, "disabled"))
gT38Support = T38_DISABLED;
if (!strcasecmp(v->value, "no"))
@@ -2838,14 +2979,13 @@ static char *handle_cli_ooh323_show_peer(struct ast_cli_entry *e, int cmd, struc
if (a->argc != 4)
return CLI_SHOWUSAGE;
-
ast_mutex_lock(&peerl.lock);
peer = peerl.peers;
while (peer) {
ast_mutex_lock(&peer->lock);
- if(!strcmp(peer->name, a->argv[3]))
+ if (!strcmp(peer->name, a->argv[3])) {
break;
- else {
+ } else {
prev = peer;
peer = peer->next;
ast_mutex_unlock(&prev->lock);
@@ -2853,53 +2993,64 @@ static char *handle_cli_ooh323_show_peer(struct ast_cli_entry *e, int cmd, struc
}
if (peer) {
- sprintf(ip_port, "%s:%d", peer->ip, peer->port);
- ast_cli(a->fd, "%-15.15s%s\n", "Name: ", peer->name);
- ast_cli(a->fd, "%s:%s,%s\n", "FastStart/H.245 Tunneling", peer->faststart?"yes":"no",
+ sprintf(ip_port, "%s:%d", peer->ip, peer->port);
+ ast_cli(a->fd, "%-15.15s%s\n", "Name: ", peer->name);
+ ast_cli(a->fd, "%s:%s,%s\n", "FastStart/H.245 Tunneling", peer->faststart?"yes":"no",
peer->h245tunneling?"yes":"no");
- ast_cli(a->fd, "%-15.15s%s", "Format Prefs: ", "(");
- print_codec_to_cli(a->fd, &peer->prefs);
- ast_cli(a->fd, ")\n");
- ast_cli(a->fd, "%-15.15s", "DTMF Mode: ");
+ ast_cli(a->fd, "%-15.15s%s", "Format Prefs: ", "(");
+ print_codec_to_cli(a->fd, &peer->prefs);
+ ast_cli(a->fd, ")\n");
+ ast_cli(a->fd, "%-15.15s", "DTMF Mode: ");
if (peer->dtmfmode & H323_DTMF_CISCO) {
- ast_cli(a->fd, "%s\n", "cisco");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", peer->dtmfcodec);
+ ast_cli(a->fd, "%s\n", "cisco");
+ ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", peer->dtmfcodec);
} else if (peer->dtmfmode & H323_DTMF_RFC2833) {
- ast_cli(a->fd, "%s\n", "rfc2833");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", peer->dtmfcodec);
- } else if (peer->dtmfmode & H323_DTMF_Q931)
- ast_cli(a->fd, "%s\n", "q931keypad");
- else if (peer->dtmfmode & H323_DTMF_H245ALPHANUMERIC)
- ast_cli(a->fd, "%s\n", "h245alphanumeric");
- else if (peer->dtmfmode & H323_DTMF_H245SIGNAL)
- ast_cli(a->fd, "%s\n", "h245signal");
- else if (peer->dtmfmode & H323_DTMF_INBAND && peer->dtmfmode & H323_DTMF_INBANDRELAX)
- ast_cli(a->fd, "%s\n", "inband-relaxed");
- else if (peer->dtmfmode & H323_DTMF_INBAND)
- ast_cli(a->fd, "%s\n", "inband");
- else
- ast_cli(a->fd, "%s\n", "unknown");
-
- ast_cli(a->fd,"%-15s", "T.38 Mode: ");
- if (peer->t38support == T38_DISABLED)
- ast_cli(a->fd, "%s\n", "disabled");
- else if (peer->t38support == T38_FAXGW)
- ast_cli(a->fd, "%s\n", "faxgw/chan_sip compatible");
+ ast_cli(a->fd, "%s\n", "rfc2833");
+ ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", peer->dtmfcodec);
+ } else if (peer->dtmfmode & H323_DTMF_Q931) {
+ ast_cli(a->fd, "%s\n", "q931keypad");
+ } else if (peer->dtmfmode & H323_DTMF_H245ALPHANUMERIC) {
+ ast_cli(a->fd, "%s\n", "h245alphanumeric");
+ } else if (peer->dtmfmode & H323_DTMF_H245SIGNAL) {
+ ast_cli(a->fd, "%s\n", "h245signal");
+ } else if (peer->dtmfmode & H323_DTMF_INBAND && peer->dtmfmode & H323_DTMF_INBANDRELAX) {
+ ast_cli(a->fd, "%s\n", "inband-relaxed");
+ } else if (peer->dtmfmode & H323_DTMF_INBAND) {
+ ast_cli(a->fd, "%s\n", "inband");
+ } else {
+ ast_cli(a->fd, "%s\n", "unknown");
+ }
+ ast_cli(a->fd,"%-15s", "T.38 Mode: ");
+ if (peer->t38support == T38_DISABLED) {
+ ast_cli(a->fd, "%s\n", "disabled");
+ } else if (peer->t38support == T38_FAXGW) {
+ ast_cli(a->fd, "%s\n", "faxgw/chan_sip compatible");
+ }
+ if (peer->faxdetect == (FAXDETECT_CNG | FAXDETECT_T38)) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Yes");
+ } else if (peer->faxdetect & FAXDETECT_CNG) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Cng");
+ } else if (peer->faxdetect & FAXDETECT_T38) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "T.38");
+ } else {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "No");
+ }
- ast_cli(a->fd, "%-15.15s%s\n", "AccountCode: ", peer->accountcode);
- ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ",
- ast_cdr_flags2str(peer->amaflags));
- ast_cli(a->fd, "%-15.15s%s\n", "IP:Port: ", ip_port);
- ast_cli(a->fd, "%-15.15s%d\n", "OutgoingLimit: ", peer->outgoinglimit);
- ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", peer->rtptimeout);
- if (peer->rtpmaskstr[0])
- ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", peer->rtpmaskstr);
- if (peer->rtdrcount && peer->rtdrinterval)
- ast_cli(a->fd, "%-15.15s%d,%d\n", "RoundTrip: ", peer->rtdrcount, peer->rtdrinterval);
- ast_mutex_unlock(&peer->lock);
+ ast_cli(a->fd, "%-15.15s%s\n", "AccountCode: ", peer->accountcode);
+ ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ", ast_cdr_flags2str(peer->amaflags));
+ ast_cli(a->fd, "%-15.15s%s\n", "IP:Port: ", ip_port);
+ ast_cli(a->fd, "%-15.15s%d\n", "OutgoingLimit: ", peer->outgoinglimit);
+ ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", peer->rtptimeout);
+ if (peer->rtpmaskstr[0]) {
+ ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", peer->rtpmaskstr);
+ }
+ if (peer->rtdrcount && peer->rtdrinterval) {
+ ast_cli(a->fd, "%-15.15s%d,%d\n", "RoundTrip: ", peer->rtdrcount, peer->rtdrinterval);
+ }
+ ast_mutex_unlock(&peer->lock);
} else {
- ast_cli(a->fd, "Peer %s not found\n", a->argv[3]);
- ast_cli(a->fd, "\n");
+ ast_cli(a->fd, "Peer %s not found\n", a->argv[3]);
+ ast_cli(a->fd, "\n");
}
ast_mutex_unlock(&peerl.lock);
@@ -2989,9 +3140,9 @@ static char *handle_cli_ooh323_show_user(struct ast_cli_entry *e, int cmd, struc
user = userl.users;
while (user) {
ast_mutex_lock(&user->lock);
- if(!strcmp(user->name, a->argv[3])) {
+ if (!strcmp(user->name, a->argv[3])) {
break;
- } else {
+ } else {
prev = user;
user = user->next;
ast_mutex_unlock(&prev->lock);
@@ -2999,53 +3150,64 @@ static char *handle_cli_ooh323_show_user(struct ast_cli_entry *e, int cmd, struc
}
if (user) {
- ast_cli(a->fd, "%-15.15s%s\n", "Name: ", user->name);
- ast_cli(a->fd, "%s:%s,%s\n", "FastStart/H.245 Tunneling", user->faststart?"yes":"no",
+ ast_cli(a->fd, "%-15.15s%s\n", "Name: ", user->name);
+ ast_cli(a->fd, "%s:%s,%s\n", "FastStart/H.245 Tunneling", user->faststart?"yes":"no",
user->h245tunneling?"yes":"no");
- ast_cli(a->fd, "%-15.15s%s", "Format Prefs: ", "(");
- print_codec_to_cli(a->fd, &user->prefs);
- ast_cli(a->fd, ")\n");
- ast_cli(a->fd, "%-15.15s", "DTMF Mode: ");
+ ast_cli(a->fd, "%-15.15s%s", "Format Prefs: ", "(");
+ print_codec_to_cli(a->fd, &user->prefs);
+ ast_cli(a->fd, ")\n");
+ ast_cli(a->fd, "%-15.15s", "DTMF Mode: ");
if (user->dtmfmode & H323_DTMF_CISCO) {
- ast_cli(a->fd, "%s\n", "cisco");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", user->dtmfcodec);
+ ast_cli(a->fd, "%s\n", "cisco");
+ ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", user->dtmfcodec);
} else if (user->dtmfmode & H323_DTMF_RFC2833) {
- ast_cli(a->fd, "%s\n", "rfc2833");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", user->dtmfcodec);
- } else if (user->dtmfmode & H323_DTMF_Q931)
- ast_cli(a->fd, "%s\n", "q931keypad");
- else if (user->dtmfmode & H323_DTMF_H245ALPHANUMERIC)
- ast_cli(a->fd, "%s\n", "h245alphanumeric");
- else if (user->dtmfmode & H323_DTMF_H245SIGNAL)
- ast_cli(a->fd, "%s\n", "h245signal");
- else if (user->dtmfmode & H323_DTMF_INBAND && user->dtmfmode & H323_DTMF_INBANDRELAX)
- ast_cli(a->fd, "%s\n", "inband-relaxed");
- else if (user->dtmfmode & H323_DTMF_INBAND)
- ast_cli(a->fd, "%s\n", "inband");
- else
- ast_cli(a->fd, "%s\n", "unknown");
-
- ast_cli(a->fd,"%-15s", "T.38 Mode: ");
- if (user->t38support == T38_DISABLED)
- ast_cli(a->fd, "%s\n", "disabled");
- else if (user->t38support == T38_FAXGW)
- ast_cli(a->fd, "%s\n", "faxgw/chan_sip compatible");
+ ast_cli(a->fd, "%s\n", "rfc2833");
+ ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", user->dtmfcodec);
+ } else if (user->dtmfmode & H323_DTMF_Q931) {
+ ast_cli(a->fd, "%s\n", "q931keypad");
+ } else if (user->dtmfmode & H323_DTMF_H245ALPHANUMERIC) {
+ ast_cli(a->fd, "%s\n", "h245alphanumeric");
+ } else if (user->dtmfmode & H323_DTMF_H245SIGNAL) {
+ ast_cli(a->fd, "%s\n", "h245signal");
+ } else if (user->dtmfmode & H323_DTMF_INBAND && user->dtmfmode & H323_DTMF_INBANDRELAX) {
+ ast_cli(a->fd, "%s\n", "inband-relaxed");
+ } else if (user->dtmfmode & H323_DTMF_INBAND) {
+ ast_cli(a->fd, "%s\n", "inband");
+ } else {
+ ast_cli(a->fd, "%s\n", "unknown");
+ }
+ ast_cli(a->fd,"%-15s", "T.38 Mode: ");
+ if (user->t38support == T38_DISABLED) {
+ ast_cli(a->fd, "%s\n", "disabled");
+ } else if (user->t38support == T38_FAXGW) {
+ ast_cli(a->fd, "%s\n", "faxgw/chan_sip compatible");
+ }
+ if (user->faxdetect == (FAXDETECT_CNG | FAXDETECT_T38)) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Yes");
+ } else if (user->faxdetect & FAXDETECT_CNG) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Cng");
+ } else if (user->faxdetect & FAXDETECT_T38) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "T.38");
+ } else {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "No");
+ }
- ast_cli(a->fd, "%-15.15s%s\n", "AccountCode: ", user->accountcode);
- ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ",
- ast_cdr_flags2str(user->amaflags));
- ast_cli(a->fd, "%-15.15s%s\n", "Context: ", user->context);
- ast_cli(a->fd, "%-15.15s%d\n", "IncomingLimit: ", user->incominglimit);
- ast_cli(a->fd, "%-15.15s%d\n", "InUse: ", user->inUse);
- ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", user->rtptimeout);
- if (user->rtpmaskstr[0])
- ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", user->rtpmaskstr);
+ ast_cli(a->fd, "%-15.15s%s\n", "AccountCode: ", user->accountcode);
+ ast_cli(a->fd, "%-15.15s%s\n", "AMA flags: ", ast_cdr_flags2str(user->amaflags));
+ ast_cli(a->fd, "%-15.15s%s\n", "Context: ", user->context);
+ ast_cli(a->fd, "%-15.15s%d\n", "IncomingLimit: ", user->incominglimit);
+ ast_cli(a->fd, "%-15.15s%d\n", "InUse: ", user->inUse);
+ ast_cli(a->fd, "%-15.15s%d\n", "rtptimeout: ", user->rtptimeout);
+ if (user->rtpmaskstr[0]) {
+ ast_cli(a->fd, "%-15.15s%s\n", "rtpmask: ", user->rtpmaskstr);
+ }
ast_mutex_unlock(&user->lock);
- if (user->rtdrcount && user->rtdrinterval)
- ast_cli(a->fd, "%-15.15s%d,%d\n", "RoundTrip: ", user->rtdrcount, user->rtdrinterval);
+ if (user->rtdrcount && user->rtdrinterval) {
+ ast_cli(a->fd, "%-15.15s%d,%d\n", "RoundTrip: ", user->rtdrcount, user->rtdrinterval);
+ }
} else {
- ast_cli(a->fd, "User %s not found\n", a->argv[3]);
- ast_cli(a->fd, "\n");
+ ast_cli(a->fd, "User %s not found\n", a->argv[3]);
+ ast_cli(a->fd, "\n");
}
ast_mutex_unlock(&userl.lock);
@@ -3144,91 +3306,93 @@ static char *handle_cli_ooh323_show_config(struct ast_cli_entry *e, int cmd, str
if (a->argc != 3)
return CLI_SHOWUSAGE;
-
-
- ast_cli(a->fd, "\nObjective Open H.323 Channel Driver's Config:\n");
+ ast_cli(a->fd, "\nObjective Open H.323 Channel Driver's Config:\n");
snprintf(value, sizeof(value), "%s:%d", gIP, gPort);
- ast_cli(a->fd, "%-20s%s\n", "IP:Port: ", value);
- ast_cli(a->fd, "%-20s%d-%d\n", "H.225 port range: ",
- ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd);
- ast_cli(a->fd, "%-20s%s\n", "FastStart", gFastStart?"yes":"no");
- ast_cli(a->fd, "%-20s%s\n", "Tunneling", gTunneling?"yes":"no");
- ast_cli(a->fd, "%-20s%s\n", "CallerId", gCallerID);
- ast_cli(a->fd, "%-20s%s\n", "MediaWaitForConnect",
- gMediaWaitForConnect?"yes":"no");
+ ast_cli(a->fd, "%-20s%s\n", "IP:Port: ", value);
+ ast_cli(a->fd, "%-20s%d-%d\n", "H.225 port range: ", ooconfig.mTCPPortStart, ooconfig.mTCPPortEnd);
+ ast_cli(a->fd, "%-20s%s\n", "FastStart", gFastStart?"yes":"no");
+ ast_cli(a->fd, "%-20s%s\n", "Tunneling", gTunneling?"yes":"no");
+ ast_cli(a->fd, "%-20s%s\n", "CallerId", gCallerID);
+ ast_cli(a->fd, "%-20s%s\n", "MediaWaitForConnect", gMediaWaitForConnect?"yes":"no");
#if (0)
extern OOH323EndPoint gH323ep;
- ast_cli(a->fd, "%-20s%s\n", "FASTSTART",
- (OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART) != 0) ? "yes" : "no");
- ast_cli(a->fd, "%-20s%s\n", "TUNNELING",
- (OO_TESTFLAG(gH323ep.flags, OO_M_TUNNELING) != 0) ? "yes" : "no");
- ast_cli(a->fd, "%-20s%s\n", "MEDIAWAITFORCONN",
- (OO_TESTFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN) != 0) ? "yes" : "no");
+ ast_cli(a->fd, "%-20s%s\n", "FASTSTART",
+ (OO_TESTFLAG(gH323ep.flags, OO_M_FASTSTART) != 0) ? "yes" : "no");
+ ast_cli(a->fd, "%-20s%s\n", "TUNNELING",
+ (OO_TESTFLAG(gH323ep.flags, OO_M_TUNNELING) != 0) ? "yes" : "no");
+ ast_cli(a->fd, "%-20s%s\n", "MEDIAWAITFORCONN",
+ (OO_TESTFLAG(gH323ep.flags, OO_M_MEDIAWAITFORCONN) != 0) ? "yes" : "no");
#endif
- if (gRasGkMode == RasNoGatekeeper)
+ if (gRasGkMode == RasNoGatekeeper) {
snprintf(value, sizeof(value), "%s", "No Gatekeeper");
- else if (gRasGkMode == RasDiscoverGatekeeper)
+ } else if (gRasGkMode == RasDiscoverGatekeeper) {
snprintf(value, sizeof(value), "%s", "Discover");
- else
+ } else {
snprintf(value, sizeof(value), "%s", gGatekeeper);
-
- ast_cli(a->fd, "%-20s%s\n", "Gatekeeper:", value);
-
- ast_cli(a->fd, "%-20s%s\n", "H.323 LogFile:", gLogFile);
-
- ast_cli(a->fd, "%-20s%s\n", "Context:", gContext);
-
- ast_cli(a->fd, "%-20s%s\n", "Capability:",
- ast_getformatname_multiple(value,FORMAT_STRING_SIZE,gCap));
-
- ast_cli(a->fd, "%-20s", "DTMF Mode: ");
+ }
+ ast_cli(a->fd, "%-20s%s\n", "Gatekeeper:", value);
+ ast_cli(a->fd, "%-20s%s\n", "H.323 LogFile:", gLogFile);
+ ast_cli(a->fd, "%-20s%s\n", "Context:", gContext);
+ ast_cli(a->fd, "%-20s%s\n", "Capability:",
+ ast_getformatname_multiple(value,FORMAT_STRING_SIZE,gCap));
+ ast_cli(a->fd, "%-20s", "DTMF Mode: ");
if (gDTMFMode & H323_DTMF_CISCO) {
- ast_cli(a->fd, "%s\n", "cisco");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", gDTMFCodec);
+ ast_cli(a->fd, "%s\n", "cisco");
+ ast_cli(a->fd, "%-20.15s%d\n", "DTMF Codec: ", gDTMFCodec);
} else if (gDTMFMode & H323_DTMF_RFC2833) {
- ast_cli(a->fd, "%s\n", "rfc2833");
- ast_cli(a->fd, "%-15.15s%d\n", "DTMF Codec: ", gDTMFCodec);
- } else if (gDTMFMode & H323_DTMF_Q931)
- ast_cli(a->fd, "%s\n", "q931keypad");
- else if (gDTMFMode & H323_DTMF_H245ALPHANUMERIC)
- ast_cli(a->fd, "%s\n", "h245alphanumeric");
- else if (gDTMFMode & H323_DTMF_H245SIGNAL)
- ast_cli(a->fd, "%s\n", "h245signal");
- else if (gDTMFMode & H323_DTMF_INBAND && gDTMFMode & H323_DTMF_INBANDRELAX)
- ast_cli(a->fd, "%s\n", "inband-relaxed");
- else if (gDTMFMode & H323_DTMF_INBAND)
- ast_cli(a->fd, "%s\n", "inband");
- else
+ ast_cli(a->fd, "%s\n", "rfc2833");
+ ast_cli(a->fd, "%-20.15s%d\n", "DTMF Codec: ", gDTMFCodec);
+ } else if (gDTMFMode & H323_DTMF_Q931) {
+ ast_cli(a->fd, "%s\n", "q931keypad");
+ } else if (gDTMFMode & H323_DTMF_H245ALPHANUMERIC) {
+ ast_cli(a->fd, "%s\n", "h245alphanumeric");
+ } else if (gDTMFMode & H323_DTMF_H245SIGNAL) {
+ ast_cli(a->fd, "%s\n", "h245signal");
+ } else if (gDTMFMode & H323_DTMF_INBAND && gDTMFMode & H323_DTMF_INBANDRELAX) {
+ ast_cli(a->fd, "%s\n", "inband-relaxed");
+ } else if (gDTMFMode & H323_DTMF_INBAND) {
+ ast_cli(a->fd, "%s\n", "inband");
+ } else {
ast_cli(a->fd, "%s\n", "unknown");
+ }
- ast_cli(a->fd,"%-20s", "T.38 Mode: ");
- if (gT38Support == T38_DISABLED)
+ ast_cli(a->fd,"%-20s", "T.38 Mode: ");
+ if (gT38Support == T38_DISABLED) {
ast_cli(a->fd, "%s\n", "disabled");
- else if (gT38Support == T38_FAXGW)
+ } else if (gT38Support == T38_FAXGW) {
ast_cli(a->fd, "%s\n", "faxgw/chan_sip compatible");
+ }
+ if (gFAXdetect == (FAXDETECT_CNG | FAXDETECT_T38)) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Yes");
+ } else if (gFAXdetect & FAXDETECT_CNG) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "Cng");
+ } else if (gFAXdetect & FAXDETECT_T38) {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "T.38");
+ } else {
+ ast_cli(a->fd,"%-20s%s\n", "FAX Detect:", "No");
+ }
- if (gRTDRCount && gRTDRInterval)
- ast_cli(a->fd, "%-15.15s%d,%d\n", "RoundTrip: ", gRTDRCount, gRTDRInterval);
-
- ast_cli(a->fd, "%-20s%ld\n", "Call counter: ", callnumber);
- ast_cli(a->fd, "%-20s%s\n", "AccountCode: ", gAccountcode);
+ if (gRTDRCount && gRTDRInterval) {
+ ast_cli(a->fd, "%-20.15s%d,%d\n", "RoundTrip: ", gRTDRCount, gRTDRInterval);
+ }
- ast_cli(a->fd, "%-20s%s\n", "AMA flags: ", ast_cdr_flags2str(gAMAFLAGS));
+ ast_cli(a->fd, "%-20s%ld\n", "Call counter: ", callnumber);
+ ast_cli(a->fd, "%-20s%s\n", "AccountCode: ", gAccountcode);
+ ast_cli(a->fd, "%-20s%s\n", "AMA flags: ", ast_cdr_flags2str(gAMAFLAGS));
pAlias = gAliasList;
- if(pAlias) {
- ast_cli(a->fd, "%-20s\n", "Aliases: ");
- }
+ if(pAlias) {
+ ast_cli(a->fd, "%-20s\n", "Aliases: ");
+ }
while (pAlias) {
pAliasNext = pAlias->next;
if (pAliasNext) {
- ast_cli(a->fd,"\t%-30s\t%-30s\n",pAlias->value, pAliasNext->value);
+ ast_cli(a->fd,"\t%-30s\t%-30s\n",pAlias->value, pAliasNext->value);
pAlias = pAliasNext->next;
- }
- else{
- ast_cli(a->fd,"\t%-30s\n",pAlias->value);
+ } else {
+ ast_cli(a->fd,"\t%-30s\n",pAlias->value);
pAlias = pAlias->next;
}
}
@@ -3245,6 +3409,115 @@ static struct ast_cli_entry cli_ooh323[] = {
AST_CLI_DEFINE(handle_cli_ooh323_reload, "reload ooh323 config")
};
+/*! \brief OOH323 Dialplan function - reads ooh323 settings */
+static int function_ooh323_read(struct ast_channel *chan, const char *cmd, char *data, char *buf, size_t len)
+{
+ struct ooh323_pvt *p = chan->tech_pvt;
+
+ ast_channel_lock(chan);
+ if (!p) {
+ ast_channel_unlock(chan);
+ return -1;
+ }
+
+ if (strcmp(chan->tech->type, "OOH323")) {
+ ast_log(LOG_ERROR, "This function is only supported on OOH323 channels, Channel is %s\n", chan->tech->type);
+ ast_channel_unlock(chan);
+ return -1;
+ }
+
+ ast_mutex_lock(&p->lock);
+ if (!strcasecmp(data, "faxdetect")) {
+ ast_copy_string(buf, p->faxdetect ? "1" : "0", len);
+ } else if (!strcasecmp(data, "t38support")) {
+ ast_copy_string(buf, p->t38support ? "1" : "0", len);
+ } else if (!strcasecmp(data, "caller_h323id")) {
+ ast_copy_string(buf, p->caller_h323id, len);
+ } else if (!strcasecmp(data, "caller_dialeddigits")) {
+ ast_copy_string(buf, p->caller_dialedDigits, len);
+ } else if (!strcasecmp(data, "caller_email")) {
+ ast_copy_string(buf, p->caller_email, len);
+ } else if (!strcasecmp(data, "h323id_url")) {
+ ast_copy_string(buf, p->caller_url, len);
+ } else if (!strcasecmp(data, "callee_h323id")) {
+ ast_copy_string(buf, p->callee_h323id, len);
+ } else if (!strcasecmp(data, "callee_dialeddigits")) {
+ ast_copy_string(buf, p->callee_dialedDigits, len);
+ } else if (!strcasecmp(data, "callee_email")) {
+ ast_copy_string(buf, p->callee_email, len);
+ } else if (!strcasecmp(data, "callee_url")) {
+ ast_copy_string(buf, p->callee_url, len);
+ }
+ ast_mutex_unlock(&p->lock);
+
+ ast_channel_unlock(chan);
+ return 0;
+}
+
+/*! \brief OOH323 Dialplan function - writes ooh323 settings */
+static int function_ooh323_write(struct ast_channel *chan, const char *cmd, char *data, const char *value)
+{
+ struct ooh323_pvt *p = chan->tech_pvt;
+ int res = -1;
+
+ ast_channel_lock(chan);
+ if (!p) {
+ ast_channel_unlock(chan);
+ return -1;
+ }
+
+ if (strcmp(chan->tech->type, "OOH323")) {
+ ast_log(LOG_ERROR, "This function is only supported on OOH323 channels, Channel is %s\n", chan->tech->type);
+ ast_channel_unlock(chan);
+ return -1;
+ }
+
+ ast_mutex_lock(&p->lock);
+ if (!strcasecmp(data, "faxdetect")) {
+ if (ast_true(value)) {
+ p->faxdetect = 1;
+ res = 0;
+ } else if (ast_false(value)) {
+ p->faxdetect = 0;
+ res = 0;
+ } else {
+ char *buf = ast_strdupa(value);
+ char *word, *next = buf;
+ p->faxdetect = 0;
+ res = 0;
+ while ((word = strsep(&next, ","))) {
+ if (!strcasecmp(word, "cng")) {
+ p->faxdetect |= FAXDETECT_CNG;
+ } else if (!strcasecmp(word, "t38")) {
+ p->faxdetect |= FAXDETECT_T38;
+ } else {
+ ast_log(LOG_WARNING, "Unknown faxdetect mode '%s'.\n", word);
+ res = -1;
+ }
+ }
+
+ }
+ } else if (!strcasecmp(data, "t38support")) {
+ if (ast_true(value)) {
+ p->t38support = 1;
+ res = 0;
+ } else {
+ p->t38support = 0;
+ res = 0;
+ }
+ }
+ ast_mutex_unlock(&p->lock);
+ ast_channel_unlock(chan);
+
+ return res;
+}
+
+/*! \brief Structure to declare a dialplan function: OOH323 */
+static struct ast_custom_function ooh323_function = {
+ .name = "OOH323",
+ .read = function_ooh323_read,
+ .write = function_ooh323_write,
+};
static int load_module(void)
{
@@ -3414,6 +3687,9 @@ static int load_module(void)
restart_monitor();
}
+ /* Register dialplan functions */
+ ast_custom_function_register(&ooh323_function);
+
return 0;
}
@@ -3689,7 +3965,7 @@ int delete_users()
ast_mutex_unlock(&userl.lock);
return 0;
}
-
+
static int unload_module(void)
{
struct ooh323_pvt *p;
@@ -3804,8 +4080,11 @@ static int unload_module(void)
}
ooH323EpDestroy();
+ /* Unregister dial plan functions */
+ ast_custom_function_unregister(&ooh323_function);
+
if (gH323Debug) {
- ast_verbose("+++ ooh323 unload_module \n");
+ ast_verbose("+++ ooh323 unload_module \n");
}
gCap = ast_format_cap_destroy(gCap);
@@ -4310,6 +4589,7 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p)
{
/* Retrieve audio/etc from channel. Assumes p->lock is already held. */
struct ast_frame *f;
+ struct ast_frame *dfr = NULL;
static struct ast_frame null_frame = { AST_FRAME_NULL, };
switch (ast->fdno) {
case 0:
@@ -4336,25 +4616,59 @@ struct ast_frame *ooh323_rtp_read(struct ast_channel *ast, struct ooh323_pvt *p)
f = &null_frame;
}
- if (p->owner) {
+ if (p->owner && !p->faxmode && (f->frametype == AST_FRAME_VOICE)) {
/* We already hold the channel lock */
- if (f->frametype == AST_FRAME_VOICE && !p->faxmode) {
- if (!(ast_format_cap_iscompatible(p->owner->nativeformats, &f->subclass.format))) {
- ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));
- ast_format_cap_set(p->owner->nativeformats, &f->subclass.format);
- ast_set_read_format(p->owner, &p->owner->readformat);
- ast_set_write_format(p->owner, &p->owner->writeformat);
- }
+ if (!(ast_format_cap_iscompatible(p->owner->nativeformats, &f->subclass.format))) {
+ ast_debug(1, "Oooh, voice format changed to %s\n", ast_getformatname(&f->subclass.format));
+ ast_format_cap_set(p->owner->nativeformats, &f->subclass.format);
+ ast_set_read_format(p->owner, &p->owner->readformat);
+ ast_set_write_format(p->owner, &p->owner->writeformat);
+ }
+ if (((p->dtmfmode & H323_DTMF_INBAND) || (p->faxdetect & FAXDETECT_CNG)) && p->vad &&
+ (f->subclass.format.id == AST_FORMAT_SLINEAR || f->subclass.format.id == AST_FORMAT_ALAW ||
+ f->subclass.format.id == AST_FORMAT_ULAW)) {
+ dfr = ast_frdup(f);
+ dfr = ast_dsp_process(p->owner, p->vad, dfr);
+ }
+ } else {
+ return f;
+ }
- if ((p->dtmfmode & H323_DTMF_INBAND) && p->vad &&
- (f->subclass.format.id == AST_FORMAT_SLINEAR || f->subclass.format.id == AST_FORMAT_ALAW ||
- f->subclass.format.id == AST_FORMAT_ULAW)) {
- f = ast_dsp_process(p->owner, p->vad, f);
- if (f && (f->frametype == AST_FRAME_DTMF)) {
- ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.integer);
+ /* process INBAND DTMF*/
+ if (dfr && (dfr->frametype == AST_FRAME_DTMF) && ((dfr->subclass.integer == 'f') || (dfr->subclass.integer == 'e'))) {
+ ast_debug(1, "* Detected FAX Tone %s\n", (dfr->subclass.integer == 'e') ? "CED" : "CNG");
+ /* Switch to T.38 ON CED*/
+ if (!p->faxmode && !p->chmodepend && (dfr->subclass.integer == 'e') && (p->t38support != T38_DISABLED)) {
+ if (gH323Debug)
+ ast_verbose("request to change %s to t.38 because fax ced\n", p->callToken);
+ p->chmodepend = 1;
+ p->faxdetected = 1;
+ ooRequestChangeMode(p->callToken, 1);
+ } else if ((dfr->subclass.integer == 'f') && !p->faxdetected) {
+ const char *target_context = S_OR(p->owner->macrocontext, p->owner->context);
+ if ((strcmp(p->owner->exten, "fax")) &&
+ (ast_exists_extension(p->owner, target_context, "fax", 1,
+ S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
+ ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+ pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
+ if (ast_async_goto(p->owner, target_context, "fax", 1)) {
+ ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+ }
+ p->faxdetected = 1;
+ if (dfr) {
+ ast_frfree(dfr);
}
+ return &ast_null_frame;
}
}
+ } else if (dfr && dfr->frametype == AST_FRAME_DTMF) {
+ ast_debug(1, "* Detected inband DTMF '%c'\n", f->subclass.integer);
+ ast_frfree(f);
+ return dfr;
+ }
+
+ if (dfr) {
+ ast_frfree(dfr);
}
return f;
}
@@ -4377,6 +4691,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
if (gH323Debug)
ast_debug(1, "mode for %s is already %d\n", call->callToken,
t38mode);
+ p->chmodepend = 0;
ast_mutex_unlock(&p->lock);
return;
}
@@ -4387,11 +4702,13 @@ void onModeChanged(ooCallData *call, int t38mode) {
DEADLOCK_AVOIDANCE(&p->lock);
}
if (!p->owner) {
+ p->chmodepend = 0;
ast_mutex_unlock(&p->lock);
ast_log(LOG_ERROR, "Channel has no owner\n");
return;
}
} else {
+ p->chmodepend = 0;
ast_mutex_unlock(&p->lock);
ast_log(LOG_ERROR, "Channel has no owner\n");
return;
@@ -4401,10 +4718,26 @@ void onModeChanged(ooCallData *call, int t38mode) {
if (p->t38support == T38_ENABLED) {
+ struct ast_control_t38_parameters parameters = { .request_response = 0 };
+
+ if ((p->faxdetect & FAXDETECT_T38) && !p->faxdetected) {
+ const char *target_context;
+ ast_debug(1, "* Detected T.38 Request\n");
+ target_context = S_OR(p->owner->macrocontext, p->owner->context);
+ if ((strcmp(p->owner->exten, "fax")) &&
+ (ast_exists_extension(p->owner, target_context, "fax", 1,
+ S_COR(p->owner->caller.id.number.valid, p->owner->caller.id.number.str, NULL)))) {
+ ast_verb(2, "Redirecting '%s' to fax extension due to CNG detection\n", p->owner->name);
+ pbx_builtin_setvar_helper(p->owner, "FAXEXTEN", p->owner->exten);
+ if (ast_async_goto(p->owner, target_context, "fax", 1)) {
+ ast_log(LOG_NOTICE, "Failed to async goto '%s' into fax of '%s'\n", p->owner->name,target_context);
+ }
+ }
+ p->faxdetected = 1;
+ }
/* AST_T38_CONTROL mode */
- struct ast_control_t38_parameters parameters = { .request_response = 0 };
parameters.request_response = AST_T38_REQUEST_NEGOTIATE;
if (call->T38FarMaxDatagram) {
ast_udptl_set_far_max_datagram(p->udptl, call->T38FarMaxDatagram);
@@ -4420,6 +4753,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
&parameters, sizeof(parameters));
p->faxmode = 1;
+
}
} else {
if (p->t38support == T38_ENABLED) {
@@ -4431,6 +4765,7 @@ void onModeChanged(ooCallData *call, int t38mode) {
&parameters, sizeof(parameters));
}
p->faxmode = 0;
+ p->faxdetected = 0;
p->t38_init = 0;
}
diff --git a/addons/format_mp3.c b/addons/format_mp3.c
index d59411d6c..5584f3e06 100644
--- a/addons/format_mp3.c
+++ b/addons/format_mp3.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/addons/ooh323c/src/ooGkClient.c b/addons/ooh323c/src/ooGkClient.c
index 04359998a..33d7df019 100644
--- a/addons/ooh323c/src/ooGkClient.c
+++ b/addons/ooh323c/src/ooGkClient.c
@@ -1211,8 +1211,11 @@ int ooGkClientHandleRegistrationConfirm
if(pGkClient->regTimeout > DEFAULT_TTL_OFFSET)
regTTL = pGkClient->regTimeout - DEFAULT_TTL_OFFSET;
- else
- regTTL = pGkClient->regTimeout;
+ else {
+ regTTL = pGkClient->regTimeout - 1; /* -1 due to some ops expire us few earlier */
+ if (regTTL <= 0)
+ regTTL = 1;
+ }
cbData = (ooGkClientTimerCb*) memAlloc
(&pGkClient->ctxt, sizeof(ooGkClientTimerCb));
@@ -1260,7 +1263,6 @@ int ooGkClientHandleRegistrationConfirm
memFreePtr(&pGkClient->ctxt, pTimer->cbData);
ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
OOTRACEDBGA1("Deleted RRQ Timer.\n");
- break;
}
}
pGkClient->state = GkClientRegistered;
@@ -1505,8 +1507,10 @@ int ooGkClientSendURQ(ooGkClient *pGkClient, ooAliases *aliases)
int ooGkClientHandleUnregistrationRequest
(ooGkClient *pGkClient, H225UnregistrationRequest * punregistrationRequest)
{
- int iRet=0;
-
+ int iRet=0, x;
+ OOTimer *pTimer = NULL;
+ DListNode *pNode = NULL;
+
/* Lets first send unregistration confirm message back to gatekeeper*/
ooGkClientSendUnregistrationConfirm(pGkClient,
punregistrationRequest->requestSeqNum);
@@ -1528,6 +1532,24 @@ int ooGkClientHandleUnregistrationRequest
pGkClient->rrqRetries = 0;
pGkClient->state = GkClientDiscovered;
+
+ /* delete the corresponding RRQ & REG timers */
+ pNode = NULL;
+ for(x=0; x<pGkClient->timerList.count; x++) {
+ pNode = dListFindByIndex(&pGkClient->timerList, x);
+ pTimer = (OOTimer*)pNode->data;
+ if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_RRQ_TIMER) {
+ memFreePtr(&pGkClient->ctxt, pTimer->cbData);
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
+ OOTRACEDBGA1("Deleted RRQ Timer.\n");
+ }
+ if(((ooGkClientTimerCb*)pTimer->cbData)->timerType & OO_REG_TIMER) {
+ memFreePtr(&pGkClient->ctxt, pTimer->cbData);
+ ooTimerDelete(&pGkClient->ctxt, &pGkClient->timerList, pTimer);
+ OOTRACEDBGA1("Deleted REG Timer.\n");
+ }
+ }
+
iRet = ooGkClientSendRRQ(pGkClient, 0);
if(iRet != OO_OK)
{
diff --git a/addons/res_config_mysql.c b/addons/res_config_mysql.c
index eaf7209f9..d393de6c1 100644
--- a/addons/res_config_mysql.c
+++ b/addons/res_config_mysql.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>mysqlclient</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/agi/eagi-test.c b/agi/eagi-test.c
index dc2d7fa1a..7f24d1f23 100644
--- a/agi/eagi-test.c
+++ b/agi/eagi-test.c
@@ -5,6 +5,10 @@
* with no warranty of any kind
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
#define AUDIO_FILENO (STDERR_FILENO + 1)
diff --git a/apps/app_adsiprog.c b/apps/app_adsiprog.c
index c138f0429..430d8258d 100644
--- a/apps/app_adsiprog.c
+++ b/apps/app_adsiprog.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>res_adsi</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index 6936cb5a0..1a4f9220f 100644
--- a/apps/app_alarmreceiver.c
+++ b/apps/app_alarmreceiver.c
@@ -29,6 +29,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_amd.c b/apps/app_amd.c
index 7c4e2a47a..35c5005f7 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -26,6 +26,9 @@
* \author Claude Klimos (claude.klimos@aheeva.com)
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_authenticate.c b/apps/app_authenticate.c
index 416ea432d..8b5fa11a6 100644
--- a/apps/app_authenticate.c
+++ b/apps/app_authenticate.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_cdr.c b/apps/app_cdr.c
index 70036ad82..2f227b049 100644
--- a/apps/app_cdr.c
+++ b/apps/app_cdr.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_chanisavail.c b/apps/app_chanisavail.c
index 5dd4a1f60..86ce34177 100644
--- a/apps/app_chanisavail.c
+++ b/apps/app_chanisavail.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_channelredirect.c b/apps/app_channelredirect.c
index 57c9234ef..8fe543dab 100644
--- a/apps/app_channelredirect.c
+++ b/apps/app_channelredirect.c
@@ -23,6 +23,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_chanspy.c b/apps/app_chanspy.c
index c90a7907a..92e0ba513 100644
--- a/apps/app_chanspy.c
+++ b/apps/app_chanspy.c
@@ -29,6 +29,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index d046c489f..4897d065e 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -28,6 +28,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -632,10 +636,10 @@ static int play_prompt_to_channel(struct conference_bridge *conference_bridge, s
return res;
}
-static void handle_video_on_join(struct conference_bridge *conference_bridge, struct conference_bridge_user *conference_bridge_user)
+static void handle_video_on_join(struct conference_bridge *conference_bridge, struct ast_channel *chan, int marked)
{
- /* only automatically set video source for marked users */
- if (!ast_test_flag(&conference_bridge_user->u_profile, USER_OPT_MARKEDUSER)) {
+ /* Right now, only marked users are automatically set as the single src of video.*/
+ if (!marked) {
return;
}
@@ -645,7 +649,7 @@ static void handle_video_on_join(struct conference_bridge *conference_bridge, st
ao2_lock(conference_bridge);
/* see if anyone is already the video src */
AST_LIST_TRAVERSE(&conference_bridge->users_list, tmp_user, list) {
- if (tmp_user == conference_bridge_user) {
+ if (tmp_user->chan == chan) {
continue;
}
if (ast_bridge_is_video_src(conference_bridge->bridge, tmp_user->chan)) {
@@ -655,24 +659,31 @@ static void handle_video_on_join(struct conference_bridge *conference_bridge, st
}
ao2_unlock(conference_bridge);
if (set) {
- ast_bridge_set_single_src_video_mode(conference_bridge->bridge, conference_bridge_user->chan);
+ ast_bridge_set_single_src_video_mode(conference_bridge->bridge, chan);
}
} else if (ast_test_flag(&conference_bridge->b_profile, BRIDGE_OPT_VIDEO_SRC_LAST_MARKED)) {
/* we joined and are video capable, we override anyone else that may have already been the video feed */
- ast_bridge_set_single_src_video_mode(conference_bridge->bridge, conference_bridge_user->chan);
+ ast_bridge_set_single_src_video_mode(conference_bridge->bridge, chan);
}
}
-static void handle_video_on_exit(struct conference_bridge *conference_bridge, struct conference_bridge_user *conference_bridge_user)
+static void handle_video_on_exit(struct conference_bridge *conference_bridge, struct ast_channel *chan)
{
struct conference_bridge_user *tmp_user = NULL;
/* if this isn't a video source, nothing to update */
- if (!ast_bridge_is_video_src(conference_bridge->bridge, conference_bridge_user->chan)) {
+ if (!ast_bridge_is_video_src(conference_bridge->bridge, chan)) {
return;
}
- ast_bridge_remove_video_src(conference_bridge->bridge, conference_bridge_user->chan);
+ ast_bridge_remove_video_src(conference_bridge->bridge, chan);
+
+ /* If in follow talker mode, make sure to restore this mode on the
+ * bridge when a source is removed. It is possible this channel was
+ * only set temporarily as a video source by an AMI or DTMF action. */
+ if (ast_test_flag(&conference_bridge->b_profile, BRIDGE_OPT_VIDEO_SRC_FOLLOW_TALKER)) {
+ ast_bridge_set_talker_src_video_mode(conference_bridge->bridge);
+ }
/* if the video_mode isn't set to automatically pick the video source, do nothing on exit. */
if (!ast_test_flag(&conference_bridge->b_profile, BRIDGE_OPT_VIDEO_SRC_FIRST_MARKED) &&
@@ -680,10 +691,10 @@ static void handle_video_on_exit(struct conference_bridge *conference_bridge, st
return;
}
- /* Make the next avaliable marked user the video src. */
+ /* Make the next available marked user the video src. */
ao2_lock(conference_bridge);
AST_LIST_TRAVERSE(&conference_bridge->users_list, tmp_user, list) {
- if (tmp_user == conference_bridge_user) {
+ if (tmp_user->chan == chan) {
continue;
}
if (ast_test_flag(&tmp_user->u_profile, USER_OPT_MARKEDUSER)) {
@@ -1454,7 +1465,8 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
}
}
- handle_video_on_join(conference_bridge, &conference_bridge_user);
+ /* See if we need to automatically set this user as a video source or not */
+ handle_video_on_join(conference_bridge, conference_bridge_user.chan, ast_test_flag(&conference_bridge_user.u_profile, USER_OPT_MARKEDUSER));
/* Join our conference bridge for real */
send_join_event(conference_bridge_user.chan, conference_bridge->name);
@@ -1465,8 +1477,15 @@ static int confbridge_exec(struct ast_channel *chan, const char *data)
&conference_bridge_user.tech_args);
send_leave_event(conference_bridge_user.chan, conference_bridge->name);
+ /* if we're shutting down, don't attempt to do further processing */
+ if (ast_shutting_down()) {
+ leave_conference_bridge(conference_bridge, &conference_bridge_user);
+ conference_bridge = NULL;
+ goto confbridge_cleanup;
+ }
- handle_video_on_exit(conference_bridge, &conference_bridge_user);
+ /* If this user was a video source, we need to clean up and possibly pick a new source. */
+ handle_video_on_exit(conference_bridge, conference_bridge_user.chan);
/* if this user has a intro, play it when leaving */
if (!quiet && !ast_strlen_zero(conference_bridge_user.name_rec_location)) {
@@ -1775,6 +1794,9 @@ static int execute_menu_entry(struct conference_bridge *conference_bridge,
ast_bridge_set_single_src_video_mode(conference_bridge->bridge, bridge_channel->chan);
ao2_unlock(conference_bridge);
break;
+ case MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC:
+ handle_video_on_exit(conference_bridge, bridge_channel->chan);
+ break;
}
}
return res;
diff --git a/apps/app_controlplayback.c b/apps/app_controlplayback.c
index bbeea3037..1e2e6fbc2 100644
--- a/apps/app_controlplayback.c
+++ b/apps/app_controlplayback.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_dahdibarge.c b/apps/app_dahdibarge.c
index 082405e80..bb0120cbc 100644
--- a/apps/app_dahdibarge.c
+++ b/apps/app_dahdibarge.c
@@ -33,6 +33,9 @@
/*** MODULEINFO
<depend>dahdi</depend>
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>app_chanspy</replacement>
***/
#include "asterisk.h"
diff --git a/apps/app_dahdiras.c b/apps/app_dahdiras.c
index b467b16b8..fbaf98450 100644
--- a/apps/app_dahdiras.c
+++ b/apps/app_dahdiras.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>dahdi</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_db.c b/apps/app_db.c
index 99679e71b..1fa24088e 100644
--- a/apps/app_db.c
+++ b/apps/app_db.c
@@ -28,6 +28,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_dial.c b/apps/app_dial.c
index d3b8009de..65f5666f2 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>chan_local</depend>
+ <support_level>core</support_level>
***/
@@ -2408,7 +2409,8 @@ static int dial_exec_full(struct ast_channel *chan, const char *data, struct ast
* datastore again, causing a crash
*/
ast_channel_lock(chan);
- if (!ast_channel_datastore_remove(chan, datastore)) {
+ datastore = ast_channel_datastore_find(chan, &dialed_interface_info, NULL); /* make sure we weren't cleaned up already */
+ if (datastore && !ast_channel_datastore_remove(chan, datastore)) {
ast_datastore_free(datastore);
}
ast_channel_unlock(chan);
diff --git a/apps/app_dictate.c b/apps/app_dictate.c
index 5bf439d16..b50fbb044 100644
--- a/apps/app_dictate.c
+++ b/apps/app_dictate.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_directed_pickup.c b/apps/app_directed_pickup.c
index 63a7621ff..1b47d011a 100644
--- a/apps/app_directed_pickup.c
+++ b/apps/app_directed_pickup.c
@@ -29,6 +29,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -76,9 +80,11 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<synopsis>
Pickup a ringing channel.
</synopsis>
- <syntax>
- <parameter name="channel" required="true" />
- <parameter name="channel2" multiple="true" />
+ <syntax >
+ <parameter name="Technology/Resource" argsep="&amp;" required="true">
+ <argument name="Technology/Resource" required="true" />
+ <argument name="Technology2/Resource2" required="false" multiple="true" />
+ </parameter>
<parameter name="options" required="false">
<optionlist>
<option name="p">
diff --git a/apps/app_directory.c b/apps/app_directory.c
index 305bcdd7b..dccae948b 100644
--- a/apps/app_directory.c
+++ b/apps/app_directory.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>app_voicemail</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -57,7 +58,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
<parameter name="dial-context" required="false">
<para>This is the dialplan context to use when looking for an
extension that the user has selected, or when jumping to the
- <literal>o</literal> or <literal>a</literal> extension.</para>
+ <literal>o</literal> or <literal>a</literal> extension. If not
+ specified, the current context will be used.</para>
</parameter>
<parameter name="options" required="false">
<optionlist>
@@ -246,7 +248,7 @@ static int compare(const char *text, const char *template)
static int goto_exten(struct ast_channel *chan, const char *dialcontext, char *ext)
{
- if (!ast_goto_if_exists(chan, dialcontext, ext, 1) ||
+ if (!ast_goto_if_exists(chan, S_OR(dialcontext, chan->context), ext, 1) ||
(!ast_strlen_zero(chan->macrocontext) &&
!ast_goto_if_exists(chan, chan->macrocontext, ext, 1))) {
return 0;
@@ -685,11 +687,11 @@ static int do_directory(struct ast_channel *chan, struct ast_config *vmcfg, stru
int count, i;
char ext[10] = "";
- if (digit == '0' && !goto_exten(chan, S_OR(dialcontext, "default"), "o")) {
+ if (digit == '0' && !goto_exten(chan, dialcontext, "o")) {
return digit;
}
- if (digit == '*' && !goto_exten(chan, S_OR(dialcontext, "default"), "a")) {
+ if (digit == '*' && !goto_exten(chan, dialcontext, "a")) {
return digit;
}
diff --git a/apps/app_disa.c b/apps/app_disa.c
index 20c9ce48c..3ca080009 100644
--- a/apps/app_disa.c
+++ b/apps/app_disa.c
@@ -26,6 +26,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c
index f9e657201..0a9fa6888 100644
--- a/apps/app_dumpchan.c
+++ b/apps/app_dumpchan.c
@@ -28,6 +28,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_echo.c b/apps/app_echo.c
index ab991427d..48e6714e2 100644
--- a/apps/app_echo.c
+++ b/apps/app_echo.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_exec.c b/apps/app_exec.c
index 2a4da1e2f..ab9a9aece 100644
--- a/apps/app_exec.c
+++ b/apps/app_exec.c
@@ -26,6 +26,9 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_externalivr.c b/apps/app_externalivr.c
index 258a1e5c7..4eb99c1bb 100644
--- a/apps/app_externalivr.c
+++ b/apps/app_externalivr.c
@@ -31,6 +31,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_fax.c b/apps/app_fax.c
index 0d59dfa3a..e2085cbbb 100644
--- a/apps/app_fax.c
+++ b/apps/app_fax.c
@@ -16,6 +16,7 @@
<defaultenabled>no</defaultenabled>
<depend>spandsp</depend>
<conflict>res_fax</conflict>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_festival.c b/apps/app_festival.c
index a30302fa7..d609b3fe4 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_flash.c b/apps/app_flash.c
index dedadfeab..3273b5b0a 100644
--- a/apps/app_flash.c
+++ b/apps/app_flash.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>dahdi</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 7ed874928..a72ef307a 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -30,6 +30,7 @@
/*** MODULEINFO
<depend>chan_local</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_forkcdr.c b/apps/app_forkcdr.c
index 12d504914..ffeeca8ec 100644
--- a/apps/app_forkcdr.c
+++ b/apps/app_forkcdr.c
@@ -26,6 +26,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_getcpeid.c b/apps/app_getcpeid.c
index 220708156..7f59976eb 100644
--- a/apps/app_getcpeid.c
+++ b/apps/app_getcpeid.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_ices.c b/apps/app_ices.c
index 729375313..52c03ae09 100644
--- a/apps/app_ices.c
+++ b/apps/app_ices.c
@@ -26,6 +26,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_image.c b/apps/app_image.c
index af4abd7e9..160a28569 100644
--- a/apps/app_image.c
+++ b/apps/app_image.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_ivrdemo.c b/apps/app_ivrdemo.c
index a9c61209a..d035df91f 100644
--- a/apps/app_ivrdemo.c
+++ b/apps/app_ivrdemo.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_jack.c b/apps/app_jack.c
index 07ab8da79..893a5dec0 100644
--- a/apps/app_jack.c
+++ b/apps/app_jack.c
@@ -37,6 +37,7 @@
/*** MODULEINFO
<depend>jack</depend>
<depend>resample</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_macro.c b/apps/app_macro.c
index aecc0327e..651fac50d 100644
--- a/apps/app_macro.c
+++ b/apps/app_macro.c
@@ -25,6 +25,11 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>deprecated</support_level>
+ <replacement>app_stack (GoSub)</replacement>
+ */
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 40f5b0ee4..f0ab25903 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -31,6 +31,9 @@
/*** MODULEINFO
<depend>dahdi</depend>
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>app_confbridge</replacement>
***/
#include "asterisk.h"
@@ -4416,15 +4419,13 @@ static int conf_exec(struct ast_channel *chan, const char *data)
res = -1;
}
} else {
- if (((!ast_strlen_zero(cnf->pin) &&
- !ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
- (!ast_strlen_zero(cnf->pinadmin) &&
- ast_test_flag64(&confflags, CONFFLAG_ADMIN)) ||
- (!ast_strlen_zero(cnf->pin) &&
- ast_strlen_zero(cnf->pinadmin) &&
- ast_test_flag64(&confflags, CONFFLAG_ADMIN))) &&
- ((!(cnf->users == 0 && cnf->isdynamic)) ||
- ast_test_flag64(&confflags, CONFFLAG_ALWAYSPROMPT))) {
+ /* Check to see if the conference requires a pin
+ * and we ALWAYS prompt or no pin was provided */
+ if ((!ast_strlen_zero(cnf->pin) ||
+ (!ast_strlen_zero(cnf->pinadmin) &&
+ ast_test_flag64(&confflags, CONFFLAG_ADMIN))) &&
+ (ast_test_flag64(&confflags, CONFFLAG_ALWAYSPROMPT) ||
+ ast_strlen_zero(args.pin))) {
char pin[MAX_PIN] = "";
int j;
diff --git a/apps/app_milliwatt.c b/apps/app_milliwatt.c
index 26cba3c40..dc37e7e89 100644
--- a/apps/app_milliwatt.c
+++ b/apps/app_milliwatt.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_minivm.c b/apps/app_minivm.c
index 124a04d4f..3445b7ec6 100644
--- a/apps/app_minivm.c
+++ b/apps/app_minivm.c
@@ -141,6 +141,10 @@
* Back: \ref App_minivm
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 29463e253..c263b1445 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -33,6 +33,10 @@
* Anthony Minessale II <anthmct@yahoo.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -47,6 +51,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/channel.h"
#include "asterisk/autochan.h"
#include "asterisk/manager.h"
+#include "asterisk/mod_format.h"
/*** DOCUMENTATION
<application name="MixMonitor" language="en_US">
@@ -225,6 +230,8 @@ struct mixmonitor_ds {
struct ast_filestream *fs_write;
struct ast_audiohook *audiohook;
+
+ unsigned int samp_rate;
};
/*!
@@ -334,7 +341,7 @@ static void mixmonitor_save_prep(struct mixmonitor *mixmonitor, char *filename,
if (!*fs && !*errflag && !mixmonitor->mixmonitor_ds->fs_quit) {
*oflags = O_CREAT | O_WRONLY;
*oflags |= ast_test_flag(mixmonitor, MUXFLAG_APPEND) ? O_APPEND : O_TRUNC;
-
+
last_slash = strrchr(filename, '/');
if ((ext = strrchr(filename, '.')) && (ext > last_slash)) {
@@ -346,6 +353,9 @@ static void mixmonitor_save_prep(struct mixmonitor *mixmonitor, char *filename,
if (!(*fs = ast_writefile(filename, ext, NULL, *oflags, 0, 0666))) {
ast_log(LOG_ERROR, "Cannot open %s.%s\n", filename, ext);
*errflag = 1;
+ } else {
+ struct ast_filestream *tmp = *fs;
+ mixmonitor->mixmonitor_ds->samp_rate = MAX(mixmonitor->mixmonitor_ds->samp_rate, ast_format_rate(&tmp->fmt->format));
}
}
}
@@ -363,13 +373,22 @@ static void *mixmonitor_thread(void *obj)
int errflag = 0;
struct ast_format format_slin;
- ast_format_set(&format_slin, AST_FORMAT_SLINEAR, 0);
ast_verb(2, "Begin MixMonitor Recording %s\n", mixmonitor->name);
fs = &mixmonitor->mixmonitor_ds->fs;
fs_read = &mixmonitor->mixmonitor_ds->fs_read;
fs_write = &mixmonitor->mixmonitor_ds->fs_write;
+ ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
+ mixmonitor_save_prep(mixmonitor, mixmonitor->filename, fs, &oflags, &errflag);
+ mixmonitor_save_prep(mixmonitor, mixmonitor->filename_read, fs_read, &oflags, &errflag);
+ mixmonitor_save_prep(mixmonitor, mixmonitor->filename_write, fs_write, &oflags, &errflag);
+
+ ast_format_set(&format_slin, ast_format_slin_by_rate(mixmonitor->mixmonitor_ds->samp_rate), 0);
+
+ ast_mutex_unlock(&mixmonitor->mixmonitor_ds->lock);
+
+
/* The audiohook must enter and exit the loop locked */
ast_audiohook_lock(&mixmonitor->audiohook);
while (mixmonitor->audiohook.status == AST_AUDIOHOOK_STATUS_RUNNING && !mixmonitor->mixmonitor_ds->fs_quit) {
@@ -393,9 +412,6 @@ static void *mixmonitor_thread(void *obj)
if (!ast_test_flag(mixmonitor, MUXFLAG_BRIDGED) || (mixmonitor->autochan->chan && ast_bridged_channel(mixmonitor->autochan->chan))) {
ast_mutex_lock(&mixmonitor->mixmonitor_ds->lock);
- mixmonitor_save_prep(mixmonitor, mixmonitor->filename, fs, &oflags, &errflag);
- mixmonitor_save_prep(mixmonitor, mixmonitor->filename_read, fs_read, &oflags, &errflag);
- mixmonitor_save_prep(mixmonitor, mixmonitor->filename_write, fs_write, &oflags, &errflag);
/* Write out the frame(s) */
if ((*fs_read) && (fr_read)) {
@@ -484,6 +500,8 @@ static int setup_mixmonitor_ds(struct mixmonitor *mixmonitor, struct ast_channel
return -1;
}
+
+ mixmonitor_ds->samp_rate = 8000;
mixmonitor_ds->audiohook = &mixmonitor->audiohook;
datastore->data = mixmonitor_ds;
diff --git a/apps/app_morsecode.c b/apps/app_morsecode.c
index a234cd431..67e242f7b 100644
--- a/apps/app_morsecode.c
+++ b/apps/app_morsecode.c
@@ -24,6 +24,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_mp3.c b/apps/app_mp3.c
index f8c5a0578..922d42a5b 100644
--- a/apps/app_mp3.c
+++ b/apps/app_mp3.c
@@ -27,6 +27,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_nbscat.c b/apps/app_nbscat.c
index 2bbde630e..093653495 100644
--- a/apps/app_nbscat.c
+++ b/apps/app_nbscat.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_originate.c b/apps/app_originate.c
index bc811d958..5cfd41386 100644
--- a/apps/app_originate.c
+++ b/apps/app_originate.c
@@ -32,6 +32,10 @@
* Set options for call files.
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_osplookup.c b/apps/app_osplookup.c
index 239d6d501..9dbf39752 100644
--- a/apps/app_osplookup.c
+++ b/apps/app_osplookup.c
@@ -31,6 +31,7 @@
/*** MODULEINFO
<depend>osptk</depend>
<depend>openssl</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_page.c b/apps/app_page.c
index 656dcf571..cf2101446 100644
--- a/apps/app_page.c
+++ b/apps/app_page.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>dahdi</depend>
<depend>app_meetme</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_parkandannounce.c b/apps/app_parkandannounce.c
index fb3e713e1..70633745b 100644
--- a/apps/app_parkandannounce.c
+++ b/apps/app_parkandannounce.c
@@ -29,6 +29,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_playback.c b/apps/app_playback.c
index 1e198470e..ea4d90b19 100644
--- a/apps/app_playback.c
+++ b/apps/app_playback.c
@@ -24,7 +24,11 @@
*
* \ingroup applications
*/
-
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_playtones.c b/apps/app_playtones.c
index c9c0fbb99..1e142de23 100644
--- a/apps/app_playtones.c
+++ b/apps/app_playtones.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_privacy.c b/apps/app_privacy.c
index 6a6c1a437..6b191771c 100644
--- a/apps/app_privacy.c
+++ b/apps/app_privacy.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 9442ce649..025c84cac 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -58,6 +58,7 @@
/*** MODULEINFO
<use type="module">res_monitor</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -1572,7 +1573,7 @@ static int extensionstate2devicestate(int state)
return state;
}
-static int extension_state_cb(char *context, char *exten, enum ast_extension_states state, void *data)
+static int extension_state_cb(const char *context, const char *exten, enum ast_extension_states state, void *data)
{
struct ao2_iterator miter, qiter;
struct member *m;
diff --git a/apps/app_read.c b/apps/app_read.c
index a5e4a6434..813d37565 100644
--- a/apps/app_read.c
+++ b/apps/app_read.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_readexten.c b/apps/app_readexten.c
index 5e8159b35..94dc1e1f8 100644
--- a/apps/app_readexten.c
+++ b/apps/app_readexten.c
@@ -23,6 +23,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_readfile.c b/apps/app_readfile.c
index 8c3bcae64..d031406c2 100644
--- a/apps/app_readfile.c
+++ b/apps/app_readfile.c
@@ -25,6 +25,12 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>func_env (FILE())</replacement>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_record.c b/apps/app_record.c
index a192b1adc..6098ca729 100644
--- a/apps/app_record.c
+++ b/apps/app_record.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_rpt.c b/apps/app_rpt.c
index 990f05423..f37083695 100644
--- a/apps/app_rpt.c
+++ b/apps/app_rpt.c
@@ -155,6 +155,7 @@
<depend>dahdi</depend>
<depend>tonezone</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
/* Un-comment the following to include support for MDC-1200 digital tone
diff --git a/apps/app_saycounted.c b/apps/app_saycounted.c
index c840d8bb0..be3ac65ef 100644
--- a/apps/app_saycounted.c
+++ b/apps/app_saycounted.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
/*** DOCUMENTATION
diff --git a/apps/app_sayunixtime.c b/apps/app_sayunixtime.c
index 55afdf463..fc1b238dd 100644
--- a/apps/app_sayunixtime.c
+++ b/apps/app_sayunixtime.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_senddtmf.c b/apps/app_senddtmf.c
index 2af67a299..5c8425a0f 100644
--- a/apps/app_senddtmf.c
+++ b/apps/app_senddtmf.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_sendtext.c b/apps/app_sendtext.c
index 2624fe505..a723de5b9 100644
--- a/apps/app_sendtext.c
+++ b/apps/app_sendtext.c
@@ -26,6 +26,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_setcallerid.c b/apps/app_setcallerid.c
index 666e46ff4..cfcd2b47d 100644
--- a/apps/app_setcallerid.c
+++ b/apps/app_setcallerid.c
@@ -24,7 +24,13 @@
*
* \ingroup applications
*/
-
+
+/*** MODULEINFO
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>func_callerid</replacement>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_skel.c b/apps/app_skel.c
index c58d451e4..bd3b546e0 100644
--- a/apps/app_skel.c
+++ b/apps/app_skel.c
@@ -31,6 +31,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_sms.c b/apps/app_sms.c
index 07af71d1c..e3f8c5260 100644
--- a/apps/app_sms.c
+++ b/apps/app_sms.c
@@ -34,6 +34,10 @@
* Not fully tested, under development
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_softhangup.c b/apps/app_softhangup.c
index 1c880b4e8..cdfd7c147 100644
--- a/apps/app_softhangup.c
+++ b/apps/app_softhangup.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_speech_utils.c b/apps/app_speech_utils.c
index fe99157e9..637aac613 100644
--- a/apps/app_speech_utils.c
+++ b/apps/app_speech_utils.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
diff --git a/apps/app_stack.c b/apps/app_stack.c
index 10a1af48d..c5f0b6aff 100644
--- a/apps/app_stack.c
+++ b/apps/app_stack.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<use type="module">res_agi</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c
index 545261c72..9eb800287 100644
--- a/apps/app_talkdetect.c
+++ b/apps/app_talkdetect.c
@@ -24,7 +24,11 @@
*
* \ingroup applications
*/
-
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_test.c b/apps/app_test.c
index 7d0214a59..32b6fc02b 100644
--- a/apps/app_test.c
+++ b/apps/app_test.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_transfer.c b/apps/app_transfer.c
index ad6e8011e..f072eb27f 100644
--- a/apps/app_transfer.c
+++ b/apps/app_transfer.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_url.c b/apps/app_url.c
index 533c11212..f33890c76 100644
--- a/apps/app_url.c
+++ b/apps/app_url.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/app_userevent.c b/apps/app_userevent.c
index 1e1e4a9cd..59bea65df 100644
--- a/apps/app_userevent.c
+++ b/apps/app_userevent.c
@@ -21,6 +21,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_verbose.c b/apps/app_verbose.c
index 85f79f892..ca1a010cc 100644
--- a/apps/app_verbose.c
+++ b/apps/app_verbose.c
@@ -24,6 +24,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 971e1879d..764a44520 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -40,6 +40,7 @@
/*** MODULEINFO
<use type="module">res_adsi</use>
<use type="module">res_smdi</use>
+ <support_level>core</support_level>
***/
/*** MAKEOPTS
@@ -1215,6 +1216,9 @@ static int check_password(struct ast_vm_user *vmu, char *password)
/* check minimum length */
if (strlen(password) < minpassword)
return 1;
+ /* check that password does not contain '*' character */
+ if (!ast_strlen_zero(password) && password[0] == '*')
+ return 1;
if (!ast_strlen_zero(ext_pass_check_cmd)) {
char cmd[255], buf[255];
@@ -1294,8 +1298,14 @@ static void apply_options_full(struct ast_vm_user *retval, struct ast_variable *
if (!strcasecmp(var->name, "vmsecret")) {
ast_copy_string(retval->password, var->value, sizeof(retval->password));
} else if (!strcasecmp(var->name, "secret") || !strcasecmp(var->name, "password")) { /* don't overwrite vmsecret if it exists */
- if (ast_strlen_zero(retval->password))
- ast_copy_string(retval->password, var->value, sizeof(retval->password));
+ if (ast_strlen_zero(retval->password)) {
+ if (!ast_strlen_zero(var->value) && var->value[0] == '*') {
+ ast_log(LOG_WARNING, "Invalid password detected for mailbox %s. The password"
+ "\n\tmust be reset in voicemail.conf.\n", retval->mailbox);
+ } else {
+ ast_copy_string(retval->password, var->value, sizeof(retval->password));
+ }
+ }
} else if (!strcasecmp(var->name, "uniqueid")) {
ast_copy_string(retval->uniqueid, var->value, sizeof(retval->uniqueid));
} else if (!strcasecmp(var->name, "pager")) {
@@ -9662,10 +9672,12 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
}
} else if (mailbox[0] == '*') {
/* user entered '*' */
+ ast_verb(4, "Mailbox begins with '*', attempting jump to extension 'a'\n");
if (ast_exists_extension(chan, chan->context, "a", 1,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
return -1;
}
+ ast_verb(4, "Jump to extension 'a' failed; setting mailbox to NULL\n");
mailbox[0] = '\0';
}
@@ -9694,12 +9706,16 @@ static int vm_authenticate(struct ast_channel *chan, char *mailbox, int mailbox_
return -1;
} else if (password[0] == '*') {
/* user entered '*' */
+ ast_verb(4, "Password begins with '*', attempting jump to extension 'a'\n");
if (ast_exists_extension(chan, chan->context, "a", 1,
S_COR(chan->caller.id.number.valid, chan->caller.id.number.str, NULL))) {
mailbox[0] = '*';
return -1;
}
+ ast_verb(4, "Jump to extension 'a' failed; setting mailbox and user to NULL\n");
mailbox[0] = '\0';
+ /* if the password entered was '*', do not let a user mailbox be created if the extension 'a' is not defined */
+ vmu = NULL;
}
}
@@ -10546,6 +10562,14 @@ static struct ast_vm_user *find_or_create(const char *context, const char *box)
{
struct ast_vm_user *vmu;
+ if (!ast_strlen_zero(box) && box[0] == '*') {
+ ast_log(LOG_WARNING, "Mailbox %s in context %s begins with '*' character. The '*' character,"
+ "\n\twhen it is the first character in a mailbox or password, is used to jump to a"
+ "\n\tpredefined extension 'a'. A mailbox or password beginning with '*' is not valid"
+ "\n\tand will be ignored.\n", box, context);
+ return NULL;
+ }
+
AST_LIST_TRAVERSE(&users, vmu, list) {
if (ast_test_flag((&globalflags), VM_SEARCH) && !strcasecmp(box, vmu->mailbox)) {
if (strcasecmp(vmu->context, context)) {
@@ -10594,6 +10618,11 @@ static int append_mailbox(const char *context, const char *box, const char *data
stringp = tmp;
if ((s = strsep(&stringp, ","))) {
+ if (!ast_strlen_zero(s) && s[0] == '*') {
+ ast_log(LOG_WARNING, "Invalid password detected for mailbox %s. The password"
+ "\n\tmust be reset in voicemail.conf.\n", box);
+ }
+ /* assign password regardless of validity to prevent NULL password from being assigned */
ast_copy_string(vmu->password, s, sizeof(vmu->password));
}
if (stringp && (s = strsep(&stringp, ","))) {
diff --git a/apps/app_waitforring.c b/apps/app_waitforring.c
index 7ddc9db12..bd0353b07 100644
--- a/apps/app_waitforring.c
+++ b/apps/app_waitforring.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_waitforsilence.c b/apps/app_waitforsilence.c
index fe4b1e14d..a920e11a8 100644
--- a/apps/app_waitforsilence.c
+++ b/apps/app_waitforsilence.c
@@ -38,6 +38,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_waituntil.c b/apps/app_waituntil.c
index 04905edc5..d1f4bb103 100644
--- a/apps/app_waituntil.c
+++ b/apps/app_waituntil.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_while.c b/apps/app_while.c
index 80359359e..45bd65594 100644
--- a/apps/app_while.c
+++ b/apps/app_while.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/apps/app_zapateller.c b/apps/app_zapateller.c
index 6af9b963c..b102ea426 100644
--- a/apps/app_zapateller.c
+++ b/apps/app_zapateller.c
@@ -24,6 +24,10 @@
*
* \ingroup applications
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index 8864f52bc..d11b82582 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -543,6 +543,7 @@ static int add_action_to_menu_entry(struct conf_menu_entry *menu_entry, enum con
case MENU_ACTION_ADMIN_KICK_LAST:
case MENU_ACTION_LEAVE:
case MENU_ACTION_SET_SINGLE_VIDEO_SRC:
+ case MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC:
break;
case MENU_ACTION_PLAYBACK:
case MENU_ACTION_PLAYBACK_AND_CONTINUE:
@@ -660,6 +661,8 @@ static int add_menu_entry(struct conf_menu *menu, const char *dtmf, const char *
res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_LEAVE, NULL);
} else if (!strcasecmp(action, "set_as_single_video_src")) {
res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_SET_SINGLE_VIDEO_SRC, NULL);
+ } else if (!strcasecmp(action, "release_as_single_video_src")) {
+ res |= add_action_to_menu_entry(menu_entry, MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC, NULL);
} else if (!strncasecmp(action, "dialplan_exec(", 14)) {
ast_copy_string(buf, action, sizeof(buf));
action_args = buf;
@@ -1166,6 +1169,9 @@ static char *handle_cli_confbridge_show_menu(struct ast_cli_entry *e, int cmd, s
case MENU_ACTION_SET_SINGLE_VIDEO_SRC:
ast_cli(a->fd, "set_as_single_video_src");
break;
+ case MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC:
+ ast_cli(a->fd, "release_as_single_video_src");
+ break;
}
action_num++;
}
diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h
index 7a2f6bb07..ab4a8c4b0 100644
--- a/apps/confbridge/include/confbridge.h
+++ b/apps/confbridge/include/confbridge.h
@@ -82,6 +82,7 @@ enum conf_menu_action_id {
MENU_ACTION_LEAVE,
MENU_ACTION_NOOP,
MENU_ACTION_SET_SINGLE_VIDEO_SRC,
+ MENU_ACTION_RELEASE_SINGLE_VIDEO_SRC,
};
/*! The conference menu action contains both
diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c
index 2b21933e2..802e9ae30 100644
--- a/bridges/bridge_builtin_features.c
+++ b/bridges/bridge_builtin_features.c
@@ -25,6 +25,10 @@
* \ingroup bridges
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/bridges/bridge_multiplexed.c b/bridges/bridge_multiplexed.c
index 5a3de43d8..e004dfd40 100644
--- a/bridges/bridge_multiplexed.c
+++ b/bridges/bridge_multiplexed.c
@@ -25,6 +25,10 @@
* \ingroup bridges
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c
index 72b91087a..14864df4d 100644
--- a/bridges/bridge_simple.c
+++ b/bridges/bridge_simple.c
@@ -25,6 +25,10 @@
* \ingroup bridges
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c
index 8828d640a..7632f36ee 100644
--- a/bridges/bridge_softmix.c
+++ b/bridges/bridge_softmix.c
@@ -27,6 +27,10 @@
* \ingroup bridges
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -435,13 +439,30 @@ static void softmix_pass_dtmf(struct ast_bridge *bridge, struct ast_bridge_chann
}
}
-static void softmix_pass_video(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
+static void softmix_pass_video_top_priority(struct ast_bridge *bridge, struct ast_frame *frame)
{
struct ast_bridge_channel *tmp;
AST_LIST_TRAVERSE(&bridge->channels, tmp, entry) {
if (tmp->suspended) {
continue;
}
+ if (ast_bridge_is_video_src(bridge, tmp->chan) == 1) {
+ ast_write(tmp->chan, frame);
+ break;
+ }
+ }
+}
+
+static void softmix_pass_video_all(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame, int echo)
+{
+ struct ast_bridge_channel *tmp;
+ AST_LIST_TRAVERSE(&bridge->channels, tmp, entry) {
+ if (tmp->suspended) {
+ continue;
+ }
+ if ((tmp->chan == bridge_channel->chan) && !echo) {
+ continue;
+ }
ast_write(tmp->chan, frame);
}
}
@@ -472,20 +493,26 @@ static enum ast_bridge_write_result softmix_bridge_write(struct ast_bridge *brid
/* Determine if this video frame should be distributed or not */
if (frame->frametype == AST_FRAME_VIDEO) {
+ int num_src = ast_bridge_number_video_src(bridge);
+ int video_src_priority = ast_bridge_is_video_src(bridge, bridge_channel->chan);
+
switch (bridge->video_mode.mode) {
case AST_BRIDGE_VIDEO_MODE_NONE:
break;
case AST_BRIDGE_VIDEO_MODE_SINGLE_SRC:
- if (ast_bridge_is_video_src(bridge, bridge_channel->chan)) {
- softmix_pass_video(bridge, bridge_channel, frame);
+ if (video_src_priority == 1) {
+ softmix_pass_video_all(bridge, bridge_channel, frame, 1);
}
break;
case AST_BRIDGE_VIDEO_MODE_TALKER_SRC:
ast_mutex_lock(&sc->lock);
ast_bridge_update_talker_src_video_mode(bridge, bridge_channel->chan, sc->video_talker.energy_average, ast_format_get_video_mark(&frame->subclass.format));
ast_mutex_unlock(&sc->lock);
- if (ast_bridge_is_video_src(bridge, bridge_channel->chan)) {
- softmix_pass_video(bridge, bridge_channel, frame);
+ if (video_src_priority == 1) {
+ int echo = num_src > 1 ? 0 : 1;
+ softmix_pass_video_all(bridge, bridge_channel, frame, echo);
+ } else if (video_src_priority == 2) {
+ softmix_pass_video_top_priority(bridge, frame);
}
break;
}
diff --git a/cdr/cdr_adaptive_odbc.c b/cdr/cdr_adaptive_odbc.c
index db19896f2..cb9bd0d52 100644
--- a/cdr/cdr_adaptive_odbc.c
+++ b/cdr/cdr_adaptive_odbc.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<depend>res_odbc</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_csv.c b/cdr/cdr_csv.c
index 60b965880..068b7a9a2 100644
--- a/cdr/cdr_csv.c
+++ b/cdr/cdr_csv.c
@@ -28,6 +28,10 @@
* \ingroup cdr_drivers
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/cdr/cdr_custom.c b/cdr/cdr_custom.c
index c834814e8..6a2751d1f 100644
--- a/cdr/cdr_custom.c
+++ b/cdr/cdr_custom.c
@@ -30,6 +30,10 @@
* \ingroup cdr_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/cdr/cdr_manager.c b/cdr/cdr_manager.c
index 4cc818365..d5106b158 100644
--- a/cdr/cdr_manager.c
+++ b/cdr/cdr_manager.c
@@ -25,6 +25,10 @@
* \ingroup cdr_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/cdr/cdr_odbc.c b/cdr/cdr_odbc.c
index f77d60b2c..45f8bca79 100644
--- a/cdr/cdr_odbc.c
+++ b/cdr/cdr_odbc.c
@@ -30,6 +30,7 @@
/*** MODULEINFO
<depend>res_odbc</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_pgsql.c b/cdr/cdr_pgsql.c
index 826b09f3f..e857baa87 100644
--- a/cdr/cdr_pgsql.c
+++ b/cdr/cdr_pgsql.c
@@ -35,6 +35,7 @@
/*** MODULEINFO
<depend>pgsql</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_radius.c b/cdr/cdr_radius.c
index bf613284d..140e7a01c 100644
--- a/cdr/cdr_radius.c
+++ b/cdr/cdr_radius.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<depend>radius</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_sqlite.c b/cdr/cdr_sqlite.c
index 2dcdf96a4..47d1a5192 100644
--- a/cdr/cdr_sqlite.c
+++ b/cdr/cdr_sqlite.c
@@ -36,6 +36,9 @@
/*** MODULEINFO
<depend>sqlite</depend>
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>sqlite3_custom</replacement>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_sqlite3_custom.c b/cdr/cdr_sqlite3_custom.c
index c2dae7a7b..97d1a309e 100644
--- a/cdr/cdr_sqlite3_custom.c
+++ b/cdr/cdr_sqlite3_custom.c
@@ -34,6 +34,7 @@
/*** MODULEINFO
<depend>sqlite3</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_syslog.c b/cdr/cdr_syslog.c
index 63545208e..b6fc90e0d 100644
--- a/cdr/cdr_syslog.c
+++ b/cdr/cdr_syslog.c
@@ -28,7 +28,8 @@
*/
/*** MODULEINFO
- <depend>syslog</depend>
+ <depend>syslog</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/cdr/cdr_tds.c b/cdr/cdr_tds.c
index fca815fd8..eead023fb 100644
--- a/cdr/cdr_tds.c
+++ b/cdr/cdr_tds.c
@@ -59,6 +59,7 @@ CREATE TABLE [dbo].[cdr] (
/*** MODULEINFO
<depend>freetds</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cel/cel_custom.c b/cel/cel_custom.c
index 9f7d589b4..54b1e4f5e 100644
--- a/cel/cel_custom.c
+++ b/cel/cel_custom.c
@@ -29,6 +29,10 @@
* \ingroup cel_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/cel/cel_manager.c b/cel/cel_manager.c
index fcf20766f..551b861d0 100644
--- a/cel/cel_manager.c
+++ b/cel/cel_manager.c
@@ -29,6 +29,10 @@
* \ingroup cel_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/cel/cel_odbc.c b/cel/cel_odbc.c
index d298f1ba2..f0c70f53c 100644
--- a/cel/cel_odbc.c
+++ b/cel/cel_odbc.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>res_odbc</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c
index 62438d856..4a67edd85 100644
--- a/cel/cel_pgsql.c
+++ b/cel/cel_pgsql.c
@@ -39,6 +39,7 @@
/*** MODULEINFO
<depend>pgsql</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cel/cel_radius.c b/cel/cel_radius.c
index f5ccb5f8a..7cd7726e1 100644
--- a/cel/cel_radius.c
+++ b/cel/cel_radius.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>radius</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cel/cel_sqlite3_custom.c b/cel/cel_sqlite3_custom.c
index 18e2a9f1a..2906ed9ee 100644
--- a/cel/cel_sqlite3_custom.c
+++ b/cel/cel_sqlite3_custom.c
@@ -36,6 +36,7 @@
/*** MODULEINFO
<depend>sqlite3</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/cel/cel_tds.c b/cel/cel_tds.c
index 37992bf5e..f5686c9b0 100644
--- a/cel/cel_tds.c
+++ b/cel/cel_tds.c
@@ -56,6 +56,7 @@ CREATE TABLE [dbo].[cdr] (
/*** MODULEINFO
<depend>freetds</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_agent.c b/channels/chan_agent.c
index 0dc930f9d..044524669 100644
--- a/channels/chan_agent.c
+++ b/channels/chan_agent.c
@@ -33,6 +33,7 @@
/*** MODULEINFO
<depend>chan_local</depend>
<depend>res_monitor</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_alsa.c b/channels/chan_alsa.c
index b1e7c30e5..b51c942af 100644
--- a/channels/chan_alsa.c
+++ b/channels/chan_alsa.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<depend>alsa</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_bridge.c b/channels/chan_bridge.c
index 7b01909ae..36f23a500 100644
--- a/channels/chan_bridge.c
+++ b/channels/chan_bridge.c
@@ -25,6 +25,10 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/channels/chan_console.c b/channels/chan_console.c
index a5f22be2d..a0eddbeae 100644
--- a/channels/chan_console.c
+++ b/channels/chan_console.c
@@ -49,6 +49,7 @@
/*** MODULEINFO
<depend>portaudio</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
index 321be6625..b80b1b1e8 100644
--- a/channels/chan_dahdi.c
+++ b/channels/chan_dahdi.c
@@ -44,6 +44,7 @@
<use type="external">pri</use>
<use type="external">ss7</use>
<use type="external">openr2</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -409,8 +410,6 @@ static struct dahdi_ring_cadence AS_RP_cadence = {{250, 10000}};
static char defaultcic[64] = "";
static char defaultozz[64] = "";
-static char parkinglot[AST_MAX_EXTENSION] = ""; /*!< Default parking lot for this channel */
-
/*! Run this script when the MWI state changes on an FXO line, if mwimonitor is enabled */
static char mwimonitornotify[PATH_MAX] = "";
#ifndef HAVE_DAHDI_LINEREVERSE_VMWI
@@ -3072,9 +3071,9 @@ static int sig_pri_tone_to_dahditone(enum sig_pri_tone tone)
#if defined(HAVE_PRI)
static void my_handle_dchan_exception(struct sig_pri_span *pri, int index)
{
- int x, res;
+ int x;
- res = ioctl(pri->fds[index], DAHDI_GETEVENT, &x);
+ ioctl(pri->fds[index], DAHDI_GETEVENT, &x);
if (x) {
ast_log(LOG_NOTICE, "PRI got event: %s (%d) on D-channel of span %d\n", event2str(x), x, pri->span);
}
@@ -11075,7 +11074,7 @@ quit_no_clean:
*/
static int mwi_send_init(struct dahdi_pvt * pvt)
{
- int x, res;
+ int x;
struct ast_format tmpfmt;
#ifdef HAVE_DAHDI_LINEREVERSE_VMWI
@@ -11112,7 +11111,7 @@ static int mwi_send_init(struct dahdi_pvt * pvt)
return -1;
}
x = DAHDI_FLUSH_BOTH;
- res = ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_FLUSH, &x);
+ ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_FLUSH, &x);
x = 3000;
ioctl(pvt->subs[SUB_REAL].dfd, DAHDI_ONHOOKTRANSFER, &x);
#ifdef HAVE_DAHDI_LINEREVERSE_VMWI
@@ -16799,7 +16798,7 @@ static void process_echocancel(struct dahdi_chan_conf *confp, const char *data,
/*!
* \internal
* \brief Determine the configured display text options.
- * \since 1.10
+ * \since 10.0
*
* \param value Configuration value string.
*
@@ -16846,7 +16845,7 @@ static unsigned long dahdi_display_text_option(const char *value)
/*!
* \internal
* \brief Determine the configured date/time send policy option.
- * \since 1.10
+ * \since 10.0
*
* \param value Configuration value string.
*
@@ -16926,11 +16925,6 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
if (!ast_jb_read_conf(&global_jbconf, v->name, v->value))
continue;
- /* must have parkinglot in confp before build_channels is called */
- if (!strcasecmp(v->name, "parkinglot")) {
- ast_copy_string(confp->chan.parkinglot, v->value, sizeof(confp->chan.parkinglot));
- }
-
/* Create the interface list */
if (!strcasecmp(v->name, "channel") || !strcasecmp(v->name, "channels")) {
if (options & PROC_DAHDI_OPT_NOCHAN) {
@@ -17094,7 +17088,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct
} else if (!strcasecmp(v->name, "mohsuggest")) {
ast_copy_string(confp->chan.mohsuggest, v->value, sizeof(confp->chan.mohsuggest));
} else if (!strcasecmp(v->name, "parkinglot")) {
- ast_copy_string(parkinglot, v->value, sizeof(parkinglot));
+ ast_copy_string(confp->chan.parkinglot, v->value, sizeof(confp->chan.parkinglot));
} else if (!strcasecmp(v->name, "stripmsd")) {
ast_log(LOG_NOTICE, "Configuration option \"%s\" has been deprecated. Please use dialplan instead\n", v->name);
confp->chan.stripmsd = atoi(v->value);
diff --git a/channels/chan_gtalk.c b/channels/chan_gtalk.c
index 3b08d8ce4..a15fca975 100644
--- a/channels/chan_gtalk.c
+++ b/channels/chan_gtalk.c
@@ -35,6 +35,7 @@
<depend>iksemel</depend>
<depend>res_jabber</depend>
<use type="external">openssl</use>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
@@ -1336,7 +1337,7 @@ static int gtalk_newcall(struct gtalk *client, ikspak *pak)
ast_copy_string(p->sid, sid, sizeof(p->sid));
/* codec points to the first <payload-type/> tag */
- codec = iks_first_tag(iks_first_tag(iks_first_tag(pak->x)));
+ codec = iks_first_tag(iks_first_tag(pak->query));
while (codec) {
char *codec_id = iks_find_attrib(codec, "id");
@@ -2049,6 +2050,12 @@ static int gtalk_parser(void *data, ikspak *pak)
{
struct gtalk *client = ASTOBJ_REF((struct gtalk *) data);
int res;
+ iks *tmp;
+
+ if (!strcasecmp(iks_name(pak->query), "jin:jingle") && (tmp = iks_next(pak->query)) && !strcasecmp(iks_name(tmp), "ses:session")) {
+ ast_debug(1, "New method detected. Skipping jingle offer and using old gtalk method.\n");
+ pak->query = tmp;
+ }
if (!strcmp(S_OR(iks_find_attrib(pak->x, "type"), ""), "error")) {
ast_log(LOG_NOTICE, "Remote peer reported an error, trying to establish the call anyway\n");
@@ -2233,6 +2240,7 @@ static int gtalk_load_config(void)
ASTOBJ_WRLOCK(member);
member->connection = NULL;
iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, GOOGLE_NS, IKS_RULE_DONE);
+ iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, GOOGLE_JINGLE_NS, IKS_RULE_DONE);
iks_filter_add_rule(iterator->f, gtalk_parser, member, IKS_RULE_TYPE, IKS_PAK_IQ, IKS_RULE_NS, "http://jabber.org/protocol/gtalk", IKS_RULE_DONE);
ASTOBJ_UNLOCK(member);
ASTOBJ_UNLOCK(iterator);
diff --git a/channels/chan_h323.c b/channels/chan_h323.c
index 07646652f..e90bee18c 100644
--- a/channels/chan_h323.c
+++ b/channels/chan_h323.c
@@ -36,7 +36,9 @@
/*** MODULEINFO
<depend>openh323</depend>
- <defaultenabled>yes</defaultenabled>
+ <defaultenabled>no</defaultenabled>
+ <support_level>deprecated</support_level>
+ <replacement>chan_ooh323</replacement>
***/
#ifdef __cplusplus
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index 9f5f32deb..dff1bfda2 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -33,6 +33,7 @@
/*** MODULEINFO
<use type="external">crypto</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_jingle.c b/channels/chan_jingle.c
index 53b1a85e4..86a6410db 100644
--- a/channels/chan_jingle.c
+++ b/channels/chan_jingle.c
@@ -31,6 +31,8 @@
<depend>iksemel</depend>
<depend>res_jabber</depend>
<use type="external">openssl</use>
+ <defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_local.c b/channels/chan_local.c
index 3c16fc51a..937ede4c2 100644
--- a/channels/chan_local.c
+++ b/channels/chan_local.c
@@ -25,6 +25,10 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c
index bd92fe9b0..dfd5a310f 100644
--- a/channels/chan_mgcp.c
+++ b/channels/chan_mgcp.c
@@ -31,6 +31,7 @@
/*** MODULEINFO
<use type="module">res_pktccops</use>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c
index d6e10aebe..e9fa80010 100644
--- a/channels/chan_misdn.c
+++ b/channels/chan_misdn.c
@@ -53,6 +53,7 @@
<depend>isdnnet</depend>
<depend>misdn</depend>
<depend>suppserv</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_multicast_rtp.c b/channels/chan_multicast_rtp.c
index b398abb21..929525ffb 100644
--- a/channels/chan_multicast_rtp.c
+++ b/channels/chan_multicast_rtp.c
@@ -27,6 +27,10 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/channels/chan_nbs.c b/channels/chan_nbs.c
index fdfbd8eb3..3ff97dde7 100644
--- a/channels/chan_nbs.c
+++ b/channels/chan_nbs.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>nbs</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_oss.c b/channels/chan_oss.c
index 67c55c592..a8ca79a3e 100644
--- a/channels/chan_oss.c
+++ b/channels/chan_oss.c
@@ -35,6 +35,7 @@
/*** MODULEINFO
<depend>oss</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index 4b7ec9721..6acb7a184 100644
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>ixjuser</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 18eba2371..a0b9cb037 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -164,6 +164,7 @@
/*** MODULEINFO
<use type="module">res_crypto</use>
<depend>chan_local</depend>
+ <support_level>core</support_level>
***/
/*! \page sip_session_timers SIP Session Timers in Asterisk Chan_sip
@@ -1350,7 +1351,7 @@ static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target
static int do_magic_pickup(struct ast_channel *channel, const char *extension, const char *context);
/*--- Device monitoring and Device/extension state/event handling */
-static int cb_extensionstate(char *context, char* exten, int state, void *data);
+static int cb_extensionstate(const char *context, const char *exten, enum ast_extension_states state, void *data);
static int sip_devicestate(void *data);
static int sip_poke_noanswer(const void *data);
static int sip_poke_peer(struct sip_peer *peer, int force);
@@ -4227,10 +4228,11 @@ static void enable_dsp_detect(struct sip_pvt *p)
}
if ((ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
- (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
- if (!p->rtp || ast_rtp_instance_dtmf_mode_set(p->rtp, AST_RTP_DTMF_MODE_INBAND)) {
- features |= DSP_FEATURE_DIGIT_DETECT;
- }
+ (ast_test_flag(&p->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
+ if (p->rtp) {
+ ast_rtp_instance_dtmf_mode_set(p->rtp, AST_RTP_DTMF_MODE_INBAND);
+ }
+ features |= DSP_FEATURE_DIGIT_DETECT;
}
if (ast_test_flag(&p->flags[1], SIP_PAGE2_FAX_DETECT_CNG)) {
@@ -4265,6 +4267,11 @@ static int sip_setoption(struct ast_channel *chan, int option, void *data, int d
int res = -1;
struct sip_pvt *p = chan->tech_pvt;
+ if (!p) {
+ ast_log(LOG_ERROR, "Attempt to Ref a null pointer. sip private structure is gone!\n");
+ return -1;
+ }
+
sip_pvt_lock(p);
switch (option) {
@@ -6529,11 +6536,7 @@ static int sip_senddigit_begin(struct ast_channel *ast, char digit)
sip_pvt_lock(p);
switch (ast_test_flag(&p->flags[0], SIP_DTMF)) {
case SIP_DTMF_INBAND:
- if (p->rtp && ast_rtp_instance_dtmf_mode_get(p->rtp) == AST_RTP_DTMF_MODE_INBAND) {
- ast_rtp_instance_dtmf_begin(p->rtp, digit);
- } else {
- res = -1; /* Tell Asterisk to generate inband indications */
- }
+ res = -1; /* Tell Asterisk to generate inband indications */
break;
case SIP_DTMF_RFC2833:
if (p->rtp)
@@ -6565,11 +6568,7 @@ static int sip_senddigit_end(struct ast_channel *ast, char digit, unsigned int d
ast_rtp_instance_dtmf_end_with_duration(p->rtp, digit, duration);
break;
case SIP_DTMF_INBAND:
- if (p->rtp && ast_rtp_instance_dtmf_mode_get(p->rtp) == AST_RTP_DTMF_MODE_INBAND) {
- ast_rtp_instance_dtmf_end(p->rtp, digit);
- } else {
- res = -1; /* Tell Asterisk to stop inband indications */
- }
+ res = -1; /* Tell Asterisk to stop inband indications */
break;
}
sip_pvt_unlock(p);
@@ -6926,8 +6925,8 @@ static struct ast_channel *sip_new(struct sip_pvt *i, int state, const char *tit
if ((ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_INBAND) ||
(ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_AUTO)) {
- if (!i->rtp || ast_rtp_instance_dtmf_mode_set(i->rtp, AST_RTP_DTMF_MODE_INBAND)) {
- enable_dsp_detect(i);
+ if (i->rtp) {
+ ast_rtp_instance_dtmf_mode_set(i->rtp, AST_RTP_DTMF_MODE_INBAND);
}
} else if (ast_test_flag(&i->flags[0], SIP_DTMF) == SIP_DTMF_RFC2833) {
if (i->rtp) {
@@ -9468,6 +9467,7 @@ static int process_sdp_a_audio(const char *a, struct sip_pvt *p, struct ast_rtp_
if ((format = ast_rtp_codecs_get_payload_format(newaudiortp, codec))) {
unsigned int bit_rate;
+ int val = 0;
switch ((int) format->id) {
case AST_FORMAT_SIREN7:
@@ -9500,20 +9500,21 @@ static int process_sdp_a_audio(const char *a, struct sip_pvt *p, struct ast_rtp_
}
}
break;
+ case AST_FORMAT_CELT:
+ if (sscanf(fmtp_string, "framesize=%30u", &val) == 1) {
+ ast_format_append(format, CELT_ATTR_KEY_FRAME_SIZE, val, AST_FORMAT_ATTR_END);
+ }
case AST_FORMAT_SILK:
- {
- int val = 0;
- if (sscanf(fmtp_string, "maxaveragebitrate=%30u", &val) == 1) {
- ast_format_append(format, SILK_ATTR_KEY_MAX_BITRATE, val, AST_FORMAT_ATTR_END);
- }
- if (sscanf(fmtp_string, "usedtx=%30u", &val) == 1) {
- ast_format_append(format, SILK_ATTR_KEY_DTX, val ? 1 : 0, AST_FORMAT_ATTR_END);
- }
- if (sscanf(fmtp_string, "useinbandfec=%30u", &val) == 1) {
- ast_format_append(format, SILK_ATTR_KEY_FEC, val ? 1 : 0, AST_FORMAT_ATTR_END);
- }
- break;
+ if (sscanf(fmtp_string, "maxaveragebitrate=%30u", &val) == 1) {
+ ast_format_append(format, SILK_ATTR_KEY_MAX_BITRATE, val, AST_FORMAT_ATTR_END);
+ }
+ if (sscanf(fmtp_string, "usedtx=%30u", &val) == 1) {
+ ast_format_append(format, SILK_ATTR_KEY_DTX, val ? 1 : 0, AST_FORMAT_ATTR_END);
}
+ if (sscanf(fmtp_string, "useinbandfec=%30u", &val) == 1) {
+ ast_format_append(format, SILK_ATTR_KEY_FEC, val ? 1 : 0, AST_FORMAT_ATTR_END);
+ }
+ break;
}
}
}
@@ -10829,7 +10830,7 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
{
int rtp_code;
struct ast_format_list fmt;
-
+ int val = 0;
if (debug)
ast_verbose("Adding codec %d (%s) to SDP\n", format->id, ast_getformatname(format));
@@ -10872,20 +10873,22 @@ static void add_codec_to_sdp(const struct sip_pvt *p,
/* Indicate that we only expect 64Kbps */
ast_str_append(a_buf, 0, "a=fmtp:%d bitrate=64000\r\n", rtp_code);
break;
+ case AST_FORMAT_CELT:
+ if (!ast_format_get_value(format, CELT_ATTR_KEY_FRAME_SIZE, &val) && val > 0) {
+ ast_str_append(a_buf, 0, "a=fmtp:%d framesize=%u\r\n", rtp_code, val);
+ }
+ break;
case AST_FORMAT_SILK:
- {
- int val = 0;
- if (!ast_format_get_value(format, SILK_ATTR_KEY_MAX_BITRATE, &val) && val > 5000 && val < 40000) {
- ast_str_append(a_buf, 0, "a=fmtp:%d maxaveragebitrate=%u\r\n", rtp_code, val);
- }
- if (!ast_format_get_value(format, SILK_ATTR_KEY_DTX, &val)) {
- ast_str_append(a_buf, 0, "a=fmtp:%d usedtx=%u\r\n", rtp_code, val ? 1 : 0);
- }
- if (!ast_format_get_value(format, SILK_ATTR_KEY_FEC, &val)) {
- ast_str_append(a_buf, 0, "a=fmtp:%d useinbandfec=%u\r\n", rtp_code, val ? 1 : 0);
- }
- break;
+ if (!ast_format_get_value(format, SILK_ATTR_KEY_MAX_BITRATE, &val) && val > 5000 && val < 40000) {
+ ast_str_append(a_buf, 0, "a=fmtp:%d maxaveragebitrate=%u\r\n", rtp_code, val);
+ }
+ if (!ast_format_get_value(format, SILK_ATTR_KEY_DTX, &val)) {
+ ast_str_append(a_buf, 0, "a=fmtp:%d usedtx=%u\r\n", rtp_code, val ? 1 : 0);
+ }
+ if (!ast_format_get_value(format, SILK_ATTR_KEY_FEC, &val)) {
+ ast_str_append(a_buf, 0, "a=fmtp:%d useinbandfec=%u\r\n", rtp_code, val ? 1 : 0);
}
+ break;
}
if (fmt.cur_ms && (fmt.cur_ms < *min_packet_size))
@@ -14341,7 +14344,7 @@ static void network_change_event_cb(const struct ast_event *event, void *userdat
/*! \brief Callback for the devicestate notification (SUBSCRIBE) support subsystem
\note If you add an "hint" priority to the extension in the dial plan,
you will get notifications on device state changes */
-static int cb_extensionstate(char *context, char* exten, int state, void *data)
+static int cb_extensionstate(const char *context, const char *exten, enum ast_extension_states state, void *data)
{
struct sip_pvt *p = data;
@@ -16079,7 +16082,11 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req, struct a
return;
}
- if (get_msg_text2(&buf, req, FALSE)) {
+ /* If this is an out of dialog msg, add back newlines, otherwise strip the new lines.
+ * In dialog msg's newlines are stripped to preserve the behavior of how Asterisk has worked
+ * in the past. If it is found later that new lines can be added into in dialog msgs as well,
+ * then change this. */
+ if (get_msg_text2(&buf, req, p->owner ? FALSE : TRUE)) {
ast_log(LOG_WARNING, "Unable to retrieve text from %s\n", p->callid);
transmit_response(p, "202 Accepted", req);
if (!p->owner)
@@ -19133,11 +19140,11 @@ static int build_reply_digest(struct sip_pvt *p, int method, char* digest, int d
struct sip_auth_container *credentials;
if (!ast_strlen_zero(p->domain))
- ast_copy_string(uri, p->domain, sizeof(uri));
+ snprintf(uri, sizeof(uri), "%s:%s", p->socket.type == SIP_TRANSPORT_TLS ? "sips" : "sip", p->domain);
else if (!ast_strlen_zero(p->uri))
ast_copy_string(uri, p->uri, sizeof(uri));
else
- snprintf(uri, sizeof(uri), "sip:%s@%s", p->username, ast_sockaddr_stringify_host_remote(&p->sa));
+ snprintf(uri, sizeof(uri), "%s:%s@%s", p->socket.type == SIP_TRANSPORT_TLS ? "sips" : "sip", p->username, ast_sockaddr_stringify_host_remote(&p->sa));
snprintf(cnonce, sizeof(cnonce), "%08lx", ast_random());
@@ -22515,7 +22522,6 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int
}
p->invitestate = INV_COMPLETED;
sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT);
- ast_string_field_set(p, theirtag, NULL);
res = 0;
goto request_invite_cleanup;
}
@@ -29067,7 +29073,9 @@ static int sip_set_rtp_peer(struct ast_channel *chan, struct ast_rtp_instance *i
if ((instance || vinstance || tinstance) &&
!ast_bridged_channel(chan) &&
!sip_cfg.directrtpsetup) {
- return 0;
+ sip_pvt_unlock(p);
+ ast_channel_unlock(chan);
+ return 0;
}
if (p->alreadygone) {
diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c
index ea7d16c9e..dad151ea1 100644
--- a/channels/chan_skinny.c
+++ b/channels/chan_skinny.c
@@ -25,6 +25,9 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
@@ -252,6 +255,9 @@ AST_THREADSTORAGE(control2str_threadbuf);
AST_THREADSTORAGE(substate2str_threadbuf);
#define SUBSTATE2STR_BUFSIZE 15
+AST_THREADSTORAGE(callstate2str_threadbuf);
+#define CALLSTATE2STR_BUFSIZE 15
+
/*********************
* Protocol Messages *
*********************/
@@ -636,6 +642,8 @@ struct soft_key_template_definition {
#define KEYDEF_RINGOUT 8
#define KEYDEF_OFFHOOKWITHFEAT 9
#define KEYDEF_UNKNOWN 10
+#define KEYDEF_SLAHOLD 11
+#define KEYDEF_SLACONNECTEDNOTACTIVE 12
#define SOFTKEY_NONE 0x00
#define SOFTKEY_REDIAL 0x01
@@ -895,6 +903,18 @@ static const uint8_t soft_key_default_unknown[] = {
SOFTKEY_NONE,
};
+static const uint8_t soft_key_default_SLAhold[] = {
+ SOFTKEY_REDIAL,
+ SOFTKEY_NEWCALL,
+ SOFTKEY_RESUME,
+};
+
+static const uint8_t soft_key_default_SLAconnectednotactive[] = {
+ SOFTKEY_REDIAL,
+ SOFTKEY_NEWCALL,
+ SOFTKEY_JOIN,
+};
+
static const struct soft_key_definitions soft_key_default_definitions[] = {
{KEYDEF_ONHOOK, soft_key_default_onhook, sizeof(soft_key_default_onhook) / sizeof(uint8_t)},
{KEYDEF_CONNECTED, soft_key_default_connected, sizeof(soft_key_default_connected) / sizeof(uint8_t)},
@@ -906,7 +926,9 @@ static const struct soft_key_definitions soft_key_default_definitions[] = {
{KEYDEF_CONNWITHCONF, soft_key_default_connwithconf, sizeof(soft_key_default_connwithconf) / sizeof(uint8_t)},
{KEYDEF_RINGOUT, soft_key_default_ringout, sizeof(soft_key_default_ringout) / sizeof(uint8_t)},
{KEYDEF_OFFHOOKWITHFEAT, soft_key_default_offhookwithfeat, sizeof(soft_key_default_offhookwithfeat) / sizeof(uint8_t)},
- {KEYDEF_UNKNOWN, soft_key_default_unknown, sizeof(soft_key_default_unknown) / sizeof(uint8_t)}
+ {KEYDEF_UNKNOWN, soft_key_default_unknown, sizeof(soft_key_default_unknown) / sizeof(uint8_t)},
+ {KEYDEF_SLAHOLD, soft_key_default_SLAhold, sizeof(soft_key_default_SLAhold) / sizeof(uint8_t)},
+ {KEYDEF_SLACONNECTEDNOTACTIVE, soft_key_default_SLAconnectednotactive, sizeof(soft_key_default_SLAconnectednotactive) / sizeof(uint8_t)}
};
struct soft_key_template_res_message {
@@ -1218,6 +1240,7 @@ struct skinny_subchannel {
AST_LIST_ENTRY(skinny_subchannel) list;
struct skinny_subchannel *related;
struct skinny_line *line;
+ struct skinny_subline *subline;
};
#define SKINNY_LINE_OPTIONS \
@@ -1242,6 +1265,8 @@ struct skinny_subchannel {
char mohinterpret[MAX_MUSICCLASS]; \
char mohsuggest[MAX_MUSICCLASS]; \
char lastnumberdialed[AST_MAX_EXTENSION]; \
+ char dialoutexten[AST_MAX_EXTENSION]; \
+ char dialoutcontext[AST_MAX_CONTEXT]; \
ast_group_t callgroup; \
ast_group_t pickupgroup; \
int callwaiting; \
@@ -1268,9 +1293,11 @@ struct skinny_subchannel {
struct skinny_line {
SKINNY_LINE_OPTIONS
ast_mutex_t lock;
+ struct skinny_container *container;
struct ast_event_sub *mwi_event_sub; /* Event based MWI */
struct skinny_subchannel *activesub;
AST_LIST_HEAD(, skinny_subchannel) sub;
+ AST_LIST_HEAD(, skinny_subline) sublines;
AST_LIST_ENTRY(skinny_line) list;
AST_LIST_ENTRY(skinny_line) all;
struct skinny_device *device;
@@ -1297,8 +1324,29 @@ static struct skinny_line_options *default_line = &default_line_struct;
static AST_LIST_HEAD_STATIC(lines, skinny_line);
+struct skinny_subline {
+ struct skinny_container *container;
+ struct skinny_line *line;
+ struct skinny_subchannel *sub;
+ AST_LIST_ENTRY(skinny_subline) list;
+ char name[80];
+ char context[AST_MAX_CONTEXT];
+ char exten[AST_MAX_EXTENSION];
+ char stname[AST_MAX_EXTENSION];
+ char lnname[AST_MAX_EXTENSION];
+ char ourName[40];
+ char ourNum[24];
+ char theirName[40];
+ char theirNum[24];
+ int calldirection;
+ int substate;
+ int extenstate;
+ unsigned int callid;
+};
+
struct skinny_speeddial {
ast_mutex_t lock;
+ struct skinny_container *container;
char label[42];
char context[AST_MAX_CONTEXT];
char exten[AST_MAX_EXTENSION];
@@ -1311,6 +1359,16 @@ struct skinny_speeddial {
struct skinny_device *parent;
};
+#define SKINNY_DEVICECONTAINER 1
+#define SKINNY_LINECONTAINER 2
+#define SKINNY_SUBLINECONTAINER 3
+#define SKINNY_SDCONTAINER 4
+
+struct skinny_container {
+ int type;
+ void *data;
+};
+
struct skinny_addon {
ast_mutex_t lock;
char type[10];
@@ -1420,7 +1478,7 @@ static struct ast_channel_tech skinny_tech = {
.bridge = ast_rtp_instance_bridge,
};
-static int skinny_extensionstate_cb(char *context, char* exten, int state, void *data);
+static int skinny_extensionstate_cb(const char *context, const char *exten, enum ast_extension_states state, void *data);
static int skinny_transfer(struct skinny_subchannel *sub);
static struct skinny_line *skinny_line_alloc(void)
@@ -1444,6 +1502,7 @@ static struct skinny_line *skinny_line_destroy(struct skinny_line *l)
{
l->cap = ast_format_cap_destroy(l->cap);
l->confcap = ast_format_cap_destroy(l->confcap);
+ ast_free(l->container);
ast_free(l);
return NULL;
}
@@ -1692,6 +1751,47 @@ static struct skinny_line *find_line_by_name(const char *dest)
return tmpl;
}
+static struct skinny_subline *find_subline_by_name(const char *dest)
+{
+ struct skinny_line *l;
+ struct skinny_subline *subline;
+ struct skinny_subline *tmpsubline = NULL;
+ struct skinny_device *d;
+
+ AST_LIST_LOCK(&devices);
+ AST_LIST_TRAVERSE(&devices, d, list){
+ AST_LIST_TRAVERSE(&d->lines, l, list){
+ AST_LIST_TRAVERSE(&l->sublines, subline, list){
+ if (!strcasecmp(subline->name, dest)) {
+ if (tmpsubline) {
+ ast_verb(2, "Ambiguous subline name: %s\n", dest);
+ AST_LIST_UNLOCK(&devices);
+ return NULL;
+ } else
+ tmpsubline = subline;
+ }
+ }
+ }
+ }
+ AST_LIST_UNLOCK(&devices);
+ return tmpsubline;
+}
+
+static struct skinny_subline *find_subline_by_callid(struct skinny_device *d, int callid)
+{
+ struct skinny_subline *subline;
+ struct skinny_line *l;
+
+ AST_LIST_TRAVERSE(&d->lines, l, list){
+ AST_LIST_TRAVERSE(&l->sublines, subline, list){
+ if (subline->callid == callid) {
+ return subline;
+ }
+ }
+ }
+ return NULL;
+}
+
/*!
* implement the setvar config line
*/
@@ -1943,6 +2043,7 @@ static int skinny_register(struct skinny_req *req, struct skinnysession *s)
{
struct skinny_device *d;
struct skinny_line *l;
+ struct skinny_subline *subline;
struct skinny_speeddial *sd;
struct sockaddr_in sin;
socklen_t slen;
@@ -1970,7 +2071,7 @@ static int skinny_register(struct skinny_req *req, struct skinnysession *s)
d->ourip = sin.sin_addr;
AST_LIST_TRAVERSE(&d->speeddials, sd, list) {
- sd->stateid = ast_extension_state_add(sd->context, sd->exten, skinny_extensionstate_cb, sd);
+ sd->stateid = ast_extension_state_add(sd->context, sd->exten, skinny_extensionstate_cb, sd->container);
}
instance = 0;
AST_LIST_TRAVERSE(&d->lines, l, list) {
@@ -1997,6 +2098,9 @@ static int skinny_register(struct skinny_req *req, struct skinnysession *s)
register_exten(l);
/* initialize MWI on line and device */
mwi_event_cb(0, l);
+ AST_LIST_TRAVERSE(&l->sublines, subline, list) {
+ ast_extension_state_add(subline->context, subline->exten, skinny_extensionstate_cb, subline->container);
+ }
ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s", l->name);
}
--instance;
@@ -2172,6 +2276,40 @@ static char *message2str(int type)
return tmp;
}
}
+
+static char *callstate2str(int ind)
+{
+ char *tmp;
+
+ switch (ind) {
+ case SUBSTATE_OFFHOOK:
+ return "SKINNY_OFFHOOK";
+ case SKINNY_ONHOOK:
+ return "SKINNY_ONHOOK";
+ case SKINNY_RINGOUT:
+ return "SKINNY_RINGOUT";
+ case SKINNY_RINGIN:
+ return "SKINNY_RINGIN";
+ case SKINNY_CONNECTED:
+ return "SKINNY_CONNECTED";
+ case SKINNY_BUSY:
+ return "SKINNY_BUSY";
+ case SKINNY_CONGESTION:
+ return "SKINNY_CONGESTION";
+ case SKINNY_PROGRESS:
+ return "SKINNY_PROGRESS";
+ case SKINNY_HOLD:
+ return "SKINNY_HOLD";
+ case SKINNY_CALLWAIT:
+ return "SKINNY_CALLWAIT";
+ default:
+ if (!(tmp = ast_threadstorage_get(&callstate2str_threadbuf, CALLSTATE2STR_BUFSIZE)))
+ return "Unknown";
+ snprintf(tmp, CALLSTATE2STR_BUFSIZE, "UNKNOWN-%d", ind);
+ return tmp;
+ }
+}
+
#endif
static int transmit_response_bysession(struct skinnysession *s, struct skinny_req *req)
@@ -2255,24 +2393,46 @@ static void transmit_microphone_mode(struct skinny_device *d, int mode)
transmit_response(d, req);
}
-static void transmit_callinfo(struct skinny_subchannel *sub)
+//static void transmit_callinfo(struct skinny_subchannel *sub)
+static void transmit_callinfo(struct skinny_device *d, int instance, int callid, char *fromname, char *fromnum, char *toname, char *tonum, int calldirection)
{
- struct skinny_device *d;
- struct skinny_line *l;
struct skinny_req *req;
+
+ if (!(req = req_alloc(sizeof(struct call_info_message), CALL_INFO_MESSAGE)))
+ return;
+
+ if (skinnydebug) {
+ ast_verb(1, "Setting Callinfo to %s(%s) from %s(%s) (dir=%d) on %s(%d)\n", toname, tonum, fromname, fromnum, calldirection, d->name, instance);
+ }
+
+ ast_copy_string(req->data.callinfo.callingPartyName, fromname, sizeof(req->data.callinfo.callingPartyName));
+ ast_copy_string(req->data.callinfo.callingParty, fromnum, sizeof(req->data.callinfo.callingParty));
+ ast_copy_string(req->data.callinfo.calledPartyName, toname, sizeof(req->data.callinfo.calledPartyName));
+ ast_copy_string(req->data.callinfo.calledParty, tonum, sizeof(req->data.callinfo.calledParty));
+ req->data.callinfo.instance = htolel(instance);
+ req->data.callinfo.reference = htolel(callid);
+ req->data.callinfo.type = htolel(calldirection);
+ transmit_response(d, req);
+}
+
+static void send_callinfo(struct skinny_subchannel *sub)
+{
struct ast_channel *ast;
+ struct skinny_device *d;
+ struct skinny_line *l;
char *fromname;
char *fromnum;
char *toname;
char *tonum;
- if (!sub || !(l=sub->line) || !(d=l->device) || !(ast=sub->owner)) {
+ if (!sub || !sub->owner || !sub->line || !sub->line->device) {
return;
}
-
- if (!(req = req_alloc(sizeof(struct call_info_message), CALL_INFO_MESSAGE)))
- return;
-
+
+ ast = sub->owner;
+ l = sub->line;
+ d = l->device;
+
if (sub->calldirection == SKINNY_INCOMING) {
fromname = S_COR(ast->connected.id.name.valid, ast->connected.id.name.str, "");
fromnum = S_COR(ast->connected.id.number.valid, ast->connected.id.number.str, "");
@@ -2287,19 +2447,42 @@ static void transmit_callinfo(struct skinny_subchannel *sub)
ast_verb(1, "Error sending Callinfo to %s(%d) - No call direction in sub\n", d->name, l->instance);
return;
}
+ transmit_callinfo(d, l->instance, sub->callid, fromname, fromnum, toname, tonum, sub->calldirection);
+}
- if (skinnydebug) {
- ast_verb(1, "Setting Callinfo to %s(%s) from %s(%s) (dir=%d) on %s(%d)\n", toname, tonum, fromname, fromnum, sub->calldirection, d->name, l->instance);
+static void push_callinfo(struct skinny_subline *subline, struct skinny_subchannel *sub)
+{
+ struct ast_channel *ast;
+ struct skinny_device *d;
+ struct skinny_line *l;
+ char *fromname;
+ char *fromnum;
+ char *toname;
+ char *tonum;
+
+ if (!sub || !sub->owner || !sub->line || !sub->line->device) {
+ return;
}
- ast_copy_string(req->data.callinfo.callingPartyName, fromname, sizeof(req->data.callinfo.callingPartyName));
- ast_copy_string(req->data.callinfo.callingParty, fromnum, sizeof(req->data.callinfo.callingParty));
- ast_copy_string(req->data.callinfo.calledPartyName, toname, sizeof(req->data.callinfo.calledPartyName));
- ast_copy_string(req->data.callinfo.calledParty, tonum, sizeof(req->data.callinfo.calledParty));
- req->data.callinfo.instance = htolel(l->instance);
- req->data.callinfo.reference = htolel(sub->callid);
- req->data.callinfo.type = htolel(sub->calldirection);
- transmit_response(d, req);
+ ast = sub->owner;
+ l = sub->line;
+ d = l->device;
+
+ if (sub->calldirection == SKINNY_INCOMING) {
+ fromname = S_COR(ast->connected.id.name.valid, ast->connected.id.name.str, "");
+ fromnum = S_COR(ast->connected.id.number.valid, ast->connected.id.number.str, "");
+ toname = S_COR(ast->caller.id.name.valid, ast->caller.id.name.str, "");
+ tonum = S_COR(ast->caller.id.number.valid, ast->caller.id.number.str, "");
+ } else if (sub->calldirection == SKINNY_OUTGOING) {
+ fromname = S_COR(ast->caller.id.name.valid, ast->caller.id.name.str, "");
+ fromnum = S_COR(ast->caller.id.number.valid, ast->caller.id.number.str, "");
+ toname = S_COR(ast->connected.id.name.valid, ast->connected.id.name.str, l->lastnumberdialed);
+ tonum = S_COR(ast->connected.id.number.valid, ast->connected.id.number.str, l->lastnumberdialed);
+ } else {
+ ast_verb(1, "Error sending Callinfo to %s(%d) - No call direction in sub\n", d->name, l->instance);
+ return;
+ }
+ transmit_callinfo(subline->line->device, subline->line->instance, subline->callid, fromname, fromnum, toname, tonum, sub->calldirection);
}
static void transmit_connect(struct skinny_device *d, struct skinny_subchannel *sub)
@@ -2556,6 +2739,12 @@ static void transmit_callstate(struct skinny_device *d, int buttonInstance, unsi
if (!(req = req_alloc(sizeof(struct call_state_message), CALL_STATE_MESSAGE)))
return;
+
+#ifdef SKINNY_DEVMODE
+ if (skinnydebug) {
+ ast_verb(3, "Transmitting CALL_STATE_MESSAGE to %s - line %d, callid %d, state %s\n", d->name, buttonInstance, callid, callstate2str(state));
+ }
+#endif
req->data.callstate.callState = htolel(state);
req->data.callstate.lineInstance = htolel(buttonInstance);
@@ -2700,8 +2889,8 @@ static void transmit_softkeysetres(struct skinny_device *d)
return;
req->data.softkeysets.softKeySetOffset = htolel(0);
- req->data.softkeysets.softKeySetCount = htolel(11);
- req->data.softkeysets.totalSoftKeySetCount = htolel(11);
+ req->data.softkeysets.softKeySetCount = htolel(13);
+ req->data.softkeysets.totalSoftKeySetCount = htolel(13);
for (x = 0; x < sizeof(soft_key_default_definitions) / sizeof(struct soft_key_definitions); x++) {
const uint8_t *defaults = softkeymode->defaults;
/* XXX I wanted to get the size of the array dynamically, but that wasn't wanting to work.
@@ -2793,51 +2982,111 @@ static void transmit_capabilitiesreq(struct skinny_device *d)
transmit_response(d, req);
}
-static int skinny_extensionstate_cb(char *context, char *exten, int state, void *data)
+static int skinny_extensionstate_cb(const char *context, const char *exten, enum ast_extension_states state, void *data)
{
- struct skinny_speeddial *sd = data;
- struct skinny_device *d = sd->parent;
+ struct skinny_container *container = data;
+ struct skinny_device *d = NULL;
char hint[AST_MAX_EXTENSION];
- if (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, sd->context, sd->exten)) {
- /* If they are not registered, we will override notification and show no availability */
- if (ast_device_state(hint) == AST_DEVICE_UNAVAILABLE) {
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_FLASH);
- transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
+ if (container->type == SKINNY_SDCONTAINER) {
+ struct skinny_speeddial *sd = container->data;
+ d = sd->parent;
+
+ if (skinnydebug) {
+ ast_verb(2, "Got hint %s on speeddial %s\n", ast_extension_state2str(state), sd->label);
+ }
+
+ if (ast_get_hint(hint, sizeof(hint), NULL, 0, NULL, sd->context, sd->exten)) {
+ /* If they are not registered, we will override notification and show no availability */
+ if (ast_device_state(hint) == AST_DEVICE_UNAVAILABLE) {
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_FLASH);
+ transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
+ return 0;
+ }
+ switch (state) {
+ case AST_EXTENSION_DEACTIVATED: /* Retry after a while */
+ case AST_EXTENSION_REMOVED: /* Extension is gone */
+ ast_verb(2, "Extension state: Watcher for hint %s %s. Notify Device %s\n", exten, state == AST_EXTENSION_DEACTIVATED ? "deactivated" : "removed", d->name);
+ sd->stateid = -1;
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_OFF);
+ transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
+ break;
+ case AST_EXTENSION_RINGING:
+ case AST_EXTENSION_UNAVAILABLE:
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_BLINK);
+ transmit_callstate(d, sd->instance, 0, SKINNY_RINGIN);
+ break;
+ case AST_EXTENSION_BUSY: /* callstate = SKINNY_BUSY wasn't wanting to work - I'll settle for this */
+ case AST_EXTENSION_INUSE:
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_ON);
+ transmit_callstate(d, sd->instance, 0, SKINNY_CALLREMOTEMULTILINE);
+ break;
+ case AST_EXTENSION_ONHOLD:
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_WINK);
+ transmit_callstate(d, sd->instance, 0, SKINNY_HOLD);
+ break;
+ case AST_EXTENSION_NOT_INUSE:
+ default:
+ transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_OFF);
+ transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
+ break;
+ }
+ }
+ sd->laststate = state;
+ } else if (container->type == SKINNY_SUBLINECONTAINER) {
+ struct skinny_subline *subline = container->data;
+ struct skinny_line *l = subline->line;
+ d = l->device;
+
+ if (skinnydebug) {
+ ast_verb(2, "Got hint %s on subline %s (%s@%s)\n", ast_extension_state2str(state), subline->name, exten, context);
+ }
+
+ subline->extenstate = state;
+
+ if (subline->callid == 0) {
return 0;
}
+
switch (state) {
- case AST_EXTENSION_DEACTIVATED: /* Retry after a while */
- case AST_EXTENSION_REMOVED: /* Extension is gone */
- ast_verb(2, "Extension state: Watcher for hint %s %s. Notify Device %s\n", exten, state == AST_EXTENSION_DEACTIVATED ? "deactivated" : "removed", d->name);
- sd->stateid = -1;
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_OFF);
- transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
- break;
- case AST_EXTENSION_RINGING:
- case AST_EXTENSION_UNAVAILABLE:
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_BLINK);
- transmit_callstate(d, sd->instance, 0, SKINNY_RINGIN);
+ case AST_EXTENSION_RINGING: /* Handled by normal ringin */
break;
- case AST_EXTENSION_BUSY: /* callstate = SKINNY_BUSY wasn't wanting to work - I'll settle for this */
case AST_EXTENSION_INUSE:
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_ON);
- transmit_callstate(d, sd->instance, 0, SKINNY_CALLREMOTEMULTILINE);
+ if (subline->sub && (subline->sub->substate == SKINNY_CONNECTED)) { /* Device has a real call */
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_CONNECTED);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_CONNECTED);
+ transmit_displaypromptstatus(d, "Connected", 0, l->instance, subline->callid);
+ } else { /* Some other device has active call */
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_CALLREMOTEMULTILINE);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_SLACONNECTEDNOTACTIVE);
+ transmit_displaypromptstatus(d, "In Use", 0, l->instance, subline->callid);
+ }
+ transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_ON);
+ transmit_ringer_mode(d, SKINNY_RING_OFF);
+ transmit_activatecallplane(d, l);
break;
case AST_EXTENSION_ONHOLD:
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_WINK);
- transmit_callstate(d, sd->instance, 0, SKINNY_HOLD);
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_HOLD);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_SLAHOLD);
+ transmit_displaypromptstatus(d, "Hold", 0, l->instance, subline->callid);
+ transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_BLINK);
+ transmit_activatecallplane(d, l);
break;
case AST_EXTENSION_NOT_INUSE:
- default:
- transmit_lamp_indication(d, STIMULUS_LINE, sd->instance, SKINNY_LAMP_OFF);
- transmit_callstate(d, sd->instance, 0, SKINNY_ONHOOK);
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_ONHOOK);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_ONHOOK);
+ transmit_clearpromptmessage(d, l->instance, subline->callid);
+ transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_OFF);
+ transmit_activatecallplane(d, l);
+ subline->callid = 0;
break;
+ default:
+ ast_log(LOG_WARNING, "AST_EXTENSION_STATE %s not configured\n", ast_extension_state2str(state));
}
+ } else {
+ ast_log(LOG_WARNING, "Invalid data supplied to skinny_extensionstate_cb\n");
}
- sd->laststate = state;
-
return 0;
}
@@ -2857,7 +3106,7 @@ static void update_connectedline(struct skinny_subchannel *sub, const void *data
ast_verb(3,"Sub %d - Updating\n", sub->callid);
}
- transmit_callinfo(sub);
+ send_callinfo(sub);
if (sub->owner->_state == AST_STATE_UP) {
transmit_callstate(d, l->instance, sub->callid, SKINNY_CONNECTED);
transmit_displaypromptstatus(d, "Connected", 0, l->instance, sub->callid);
@@ -3654,6 +3903,7 @@ static char *_skinny_show_line(int type, int fd, struct mansession *s, const str
{
struct skinny_device *d;
struct skinny_line *l;
+ struct skinny_subline *subline;
struct ast_codec_pref *pref;
int x = 0;
char codec_buf[512];
@@ -3724,6 +3974,12 @@ static char *_skinny_show_line(int type, int fd, struct mansession *s, const str
ast_cli(fd, "Codec Order: (");
print_codec_to_cli(fd, &l->prefs);
ast_cli(fd, ")\n");
+ if (AST_LIST_FIRST(&l->sublines)) {
+ ast_cli(fd, "Sublines:\n");
+ AST_LIST_TRAVERSE(&l->sublines, subline, list) {
+ ast_cli(fd, " %s, %s@%s\n", subline->name, subline->exten, subline->context);
+ }
+ }
ast_cli(fd, "\n");
} else { /* manager */
astman_append(s, "Channeltype: SKINNY\r\n");
@@ -3924,7 +4180,6 @@ static void *skinny_newcall(void *data)
struct skinny_device *d = l->device;
int res = 0;
- ast_copy_string(l->lastnumberdialed, c->exten, sizeof(l->lastnumberdialed));
ast_set_callerid(c,
l->hidecallerid ? "" : l->cid_num,
l->hidecallerid ? "" : l->cid_name,
@@ -3941,6 +4196,7 @@ static void *skinny_newcall(void *data)
if (!sub->rtp) {
start_rtp(sub);
}
+ ast_verb(3, "Sub %d - Calling %s@%s\n", sub->callid, c->exten, c->context);
res = ast_pbx_run(c);
if (res) {
ast_log(LOG_WARNING, "PBX exited non-zero\n");
@@ -4520,7 +4776,7 @@ static int skinny_indicate(struct ast_channel *ast, int ind, const void *data, s
return 0;
}
-static struct ast_channel *skinny_new(struct skinny_line *l, int state, const char *linkedid, int direction)
+static struct ast_channel *skinny_new(struct skinny_line *l, struct skinny_subline *subline, int state, const char *linkedid, int direction)
{
struct ast_channel *tmp;
struct skinny_subchannel *sub;
@@ -4557,6 +4813,13 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state, const ch
sub->related = NULL;
sub->calldirection = direction;
+ if (subline) {
+ sub->subline = subline;
+ subline->sub = sub;
+ } else {
+ sub->subline = NULL;
+ }
+
AST_LIST_INSERT_HEAD(&l->sub, sub, list);
//l->activesub = sub;
}
@@ -4607,7 +4870,11 @@ static struct ast_channel *skinny_new(struct skinny_line *l, int state, const ch
}
}
- ast_copy_string(tmp->context, l->context, sizeof(tmp->context));
+ if (subline) {
+ ast_copy_string(tmp->context, subline->context, sizeof(tmp->context));
+ } else {
+ ast_copy_string(tmp->context, l->context, sizeof(tmp->context));
+ }
ast_copy_string(tmp->exten, l->exten, sizeof(tmp->exten));
/* Don't use ast_set_callerid() here because it will
@@ -4676,6 +4943,7 @@ static char *substate2str(int ind) {
static void setsubstate(struct skinny_subchannel *sub, int state)
{
struct skinny_line *l = sub->line;
+ struct skinny_subline *subline = sub->subline;
struct skinny_device *d = l->device;
struct ast_channel *c = sub->owner;
pthread_t t;
@@ -4695,7 +4963,118 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
if ((state == SUBSTATE_RINGIN) && ((d->hookstate == SKINNY_OFFHOOK) || (AST_LIST_NEXT(AST_LIST_FIRST(&l->sub), list)))) {
actualstate = SUBSTATE_CALLWAIT;
}
-
+
+ if ((state == SUBSTATE_CONNECTED) && (!subline) && (AST_LIST_FIRST(&l->sublines))) {
+ const char *slastation;
+ struct skinny_subline *tmpsubline;
+ slastation = pbx_builtin_getvar_helper(c, "SLASTATION");
+ ast_verb(3, "Connecting %s to subline\n", slastation);
+ if (slastation) {
+ AST_LIST_TRAVERSE(&l->sublines, tmpsubline, list) {
+ if (!strcasecmp(tmpsubline->stname, slastation)) {
+ subline = tmpsubline;
+ break;
+ }
+ }
+ if (subline) {
+ struct skinny_line *tmpline;
+ subline->sub = sub;
+ sub->subline = subline;
+ subline->callid = sub->callid;
+ send_callinfo(sub);
+ AST_LIST_TRAVERSE(&lines, tmpline, all) {
+ AST_LIST_TRAVERSE(&tmpline->sublines, tmpsubline, list) {
+ if (!(subline == tmpsubline)) {
+ if (!strcasecmp(subline->lnname, tmpsubline->lnname)) {
+ tmpsubline->callid = callnums++;
+ transmit_callstate(tmpsubline->line->device, tmpsubline->line->instance, tmpsubline->callid, SKINNY_OFFHOOK);
+ push_callinfo(tmpsubline, sub);
+ skinny_extensionstate_cb(NULL, NULL, tmpsubline->extenstate, tmpsubline->container);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (subline) { /* Different handling for subs under a subline, indications come through hints */
+ switch (actualstate) {
+ case SUBSTATE_ONHOOK:
+ AST_LIST_REMOVE(&l->sub, sub, list);
+ if (sub->related) {
+ sub->related->related = NULL;
+ }
+
+ if (sub == l->activesub) {
+ l->activesub = NULL;
+ transmit_closereceivechannel(d, sub);
+ transmit_stopmediatransmission(d, sub);
+ }
+
+ if (subline->callid) {
+ transmit_stop_tone(d, l->instance, sub->callid);
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_CALLREMOTEMULTILINE);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_SLACONNECTEDNOTACTIVE);
+ transmit_displaypromptstatus(d, "In Use", 0, l->instance, subline->callid);
+ }
+
+ sub->cxmode = SKINNY_CX_RECVONLY;
+ sub->substate = SUBSTATE_ONHOOK;
+ if (sub->rtp) {
+ ast_rtp_instance_destroy(sub->rtp);
+ sub->rtp = NULL;
+ }
+ sub->substate = SUBSTATE_ONHOOK;
+ if (sub->owner) {
+ ast_queue_hangup(sub->owner);
+ }
+ return;
+ case SUBSTATE_CONNECTED:
+ transmit_activatecallplane(d, l);
+ transmit_stop_tone(d, l->instance, sub->callid);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_CONNECTED);
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_CONNECTED);
+ if (!sub->rtp) {
+ start_rtp(sub);
+ }
+ if (sub->substate == SUBSTATE_RINGIN || sub->substate == SUBSTATE_CALLWAIT) {
+ ast_queue_control(sub->owner, AST_CONTROL_ANSWER);
+ }
+ if (sub->substate == SUBSTATE_DIALING || sub->substate == SUBSTATE_RINGOUT) {
+ transmit_dialednumber(d, l->lastnumberdialed, l->instance, sub->callid);
+ }
+ if (sub->owner->_state != AST_STATE_UP) {
+ ast_setstate(sub->owner, AST_STATE_UP);
+ }
+ sub->substate = SUBSTATE_CONNECTED;
+ l->activesub = sub;
+ return;
+ case SUBSTATE_HOLD:
+ if (sub->substate != SUBSTATE_CONNECTED) {
+ ast_log(LOG_WARNING, "Cannot set substate to SUBSTATE_HOLD from %s (on call-%d)\n", substate2str(sub->substate), sub->callid);
+ return;
+ }
+ transmit_activatecallplane(d, l);
+ transmit_closereceivechannel(d, sub);
+ transmit_stopmediatransmission(d, sub);
+
+ transmit_callstate(d, l->instance, subline->callid, SKINNY_CALLREMOTEMULTILINE);
+ transmit_selectsoftkeys(d, l->instance, subline->callid, KEYDEF_SLACONNECTEDNOTACTIVE);
+ transmit_displaypromptstatus(d, "In Use", 0, l->instance, subline->callid);
+
+ sub->substate = SUBSTATE_HOLD;
+
+ ast_queue_control_data(sub->owner, AST_CONTROL_HOLD,
+ S_OR(l->mohsuggest, NULL),
+ !ast_strlen_zero(l->mohsuggest) ? strlen(l->mohsuggest) + 1 : 0);
+
+ return;
+ default:
+ ast_log(LOG_WARNING, "Substate handling under subline for state %d not implemented on Sub-%d\n", state, sub->callid);
+ }
+ }
+
if ((d->hookstate == SKINNY_ONHOOK) && ((actualstate == SUBSTATE_OFFHOOK) || (actualstate == SUBSTATE_DIALING)
|| (actualstate == SUBSTATE_RINGOUT) || (actualstate == SUBSTATE_CONNECTED) || (actualstate == SUBSTATE_BUSY)
|| (actualstate == SUBSTATE_CONGESTION) || (actualstate == SUBSTATE_PROGRESS))) {
@@ -4708,7 +5087,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
}
if (actualstate == sub->substate) {
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_callstate(d, l->instance, sub->callid, SKINNY_HOLD);
return;
}
@@ -4766,24 +5145,40 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
break;
case SUBSTATE_DIALING:
if (ast_strlen_zero(sub->exten) || !ast_exists_extension(c, c->context, sub->exten, 1, l->cid_num)) {
- ast_log(LOG_WARNING, "Exten (%s) does not exist, unable to set substate DIALING on sub %d\n", sub->exten, sub->callid);
+ ast_log(LOG_WARNING, "Exten (%s)@(%s) does not exist, unable to set substate DIALING on sub %d\n", sub->exten, c->context, sub->callid);
return;
}
if (d->hookstate == SKINNY_ONHOOK) {
d->hookstate = SKINNY_OFFHOOK;
transmit_speaker_mode(d, SKINNY_SPEAKERON);
- transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK);
transmit_activatecallplane(d, l);
}
- transmit_stop_tone(d, l->instance, sub->callid);
- transmit_clear_display_message(d, l->instance, sub->callid);
- transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_RINGOUT);
- transmit_displaypromptstatus(d, "Dialing", 0, l->instance, sub->callid);
- ast_copy_string(c->exten, sub->exten, sizeof(c->exten));
- ast_copy_string(l->lastnumberdialed, sub->exten, sizeof(l->lastnumberdialed));
+ if (!sub->subline) {
+ transmit_callstate(d, l->instance, sub->callid, SKINNY_OFFHOOK);
+ transmit_stop_tone(d, l->instance, sub->callid);
+ transmit_clear_display_message(d, l->instance, sub->callid);
+ transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_RINGOUT);
+ transmit_displaypromptstatus(d, "Dialing", 0, l->instance, sub->callid);
+ }
+ if (AST_LIST_FIRST(&l->sublines)) {
+ if (subline) {
+ ast_copy_string(c->exten, subline->exten, sizeof(c->exten));
+ ast_copy_string(c->context, "sla_stations", sizeof(c->context));
+ } else {
+ pbx_builtin_setvar_helper(c, "_DESTEXTEN", sub->exten);
+ pbx_builtin_setvar_helper(c, "_DESTCONTEXT", c->context);
+ ast_copy_string(c->exten, l->dialoutexten, sizeof(c->exten));
+ ast_copy_string(c->context, l->dialoutcontext, sizeof(c->context));
+ ast_copy_string(l->lastnumberdialed, sub->exten, sizeof(l->lastnumberdialed));
+ }
+ } else {
+ ast_copy_string(c->exten, sub->exten, sizeof(c->exten));
+ ast_copy_string(l->lastnumberdialed, sub->exten, sizeof(l->lastnumberdialed));
+ }
+
sub->substate = SUBSTATE_DIALING;
if (ast_pthread_create(&t, NULL, skinny_newcall, c)) {
@@ -4803,14 +5198,14 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
transmit_callstate(d, l->instance, sub->callid, SKINNY_RINGOUT);
transmit_dialednumber(d, l->lastnumberdialed, l->instance, sub->callid);
transmit_displaypromptstatus(d, "Ring Out", 0, l->instance, sub->callid);
- transmit_callinfo(sub);
+ send_callinfo(sub);
sub->substate = SUBSTATE_RINGOUT;
break;
case SUBSTATE_RINGIN:
transmit_callstate(d, l->instance, sub->callid, SKINNY_RINGIN);
transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_RINGIN);
transmit_displaypromptstatus(d, "Ring-In", 0, l->instance, sub->callid);
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_BLINK);
transmit_ringer_mode(d, SKINNY_RING_INSIDE);
transmit_activatecallplane(d, l);
@@ -4830,7 +5225,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
transmit_callstate(d, l->instance, sub->callid, SKINNY_CALLWAIT);
transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_RINGIN);
transmit_displaypromptstatus(d, "Callwaiting", 0, l->instance, sub->callid);
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_lamp_indication(d, STIMULUS_LINE, l->instance, SKINNY_LAMP_BLINK);
transmit_start_tone(d, SKINNY_CALLWAITTONE, l->instance, sub->callid);
@@ -4846,7 +5241,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
transmit_ringer_mode(d, SKINNY_RING_OFF);
transmit_activatecallplane(d, l);
transmit_stop_tone(d, l->instance, sub->callid);
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_callstate(d, l->instance, sub->callid, SKINNY_CONNECTED);
transmit_displaypromptstatus(d, "Connected", 0, l->instance, sub->callid);
transmit_selectsoftkeys(d, l->instance, sub->callid, KEYDEF_CONNECTED);
@@ -4880,7 +5275,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
if (!d->earlyrtp) {
transmit_start_tone(d, SKINNY_BUSYTONE, l->instance, sub->callid);
}
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_callstate(d, l->instance, sub->callid, SKINNY_BUSY);
transmit_displaypromptstatus(d, "Busy", 0, l->instance, sub->callid);
sub->substate = SUBSTATE_BUSY;
@@ -4894,7 +5289,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
if (!d->earlyrtp) {
transmit_start_tone(d, SKINNY_REORDER, l->instance, sub->callid);
}
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_callstate(d, l->instance, sub->callid, SKINNY_CONGESTION);
transmit_displaypromptstatus(d, "Congestion", 0, l->instance, sub->callid);
sub->substate = SUBSTATE_CONGESTION;
@@ -4908,7 +5303,7 @@ static void setsubstate(struct skinny_subchannel *sub, int state)
if (!d->earlyrtp) {
transmit_start_tone(d, SKINNY_ALERT, l->instance, sub->callid);
}
- transmit_callinfo(sub);
+ send_callinfo(sub);
transmit_callstate(d, l->instance, sub->callid, SKINNY_PROGRESS);
transmit_displaypromptstatus(d, "Call Progress", 0, l->instance, sub->callid);
sub->substate = SUBSTATE_PROGRESS;
@@ -5060,7 +5455,7 @@ static int handle_transfer_button(struct skinny_subchannel *sub)
if (!(sub->substate == SUBSTATE_HOLD)) {
setsubstate(sub, SUBSTATE_HOLD);
}
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if (c) {
newsub = c->tech_pvt;
/* point the sub and newsub at each other so we know they are related */
@@ -5248,7 +5643,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
break;
}
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if (!c) {
ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", l->name, d->name);
} else {
@@ -5268,7 +5663,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
}
if (!sub || !sub->owner)
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
else
c = sub->owner;
@@ -5304,7 +5699,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
}
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5366,7 +5761,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
ast_verb(1, "Received Stimulus: Forward All(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5383,7 +5778,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
ast_verb(1, "Received Stimulus: Forward Busy (%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5401,7 +5796,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
#if 0 /* Not sure how to handle this yet */
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5444,7 +5839,7 @@ static int handle_stimulus_message(struct skinny_req *req, struct skinnysession
if (sub && sub->owner) {
ast_debug(1, "Current subchannel [%s] already has owner\n", sub->owner->name);
} else {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if (c) {
setsubstate(c->tech_pvt, SUBSTATE_OFFHOOK);
} else {
@@ -5517,7 +5912,7 @@ static int handle_offhook_message(struct skinny_req *req, struct skinnysession *
if (sub && sub->owner) {
ast_debug(1, "Current sub [%s] already has owner\n", sub->owner->name);
} else {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if (c) {
setsubstate(c->tech_pvt, SUBSTATE_OFFHOOK);
} else {
@@ -5851,7 +6246,7 @@ static int handle_enbloc_call_message(struct skinny_req *req, struct skinnysessi
l = sub->line;
}
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
if(!c) {
ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", l->name, d->name);
@@ -5914,7 +6309,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
}
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5931,9 +6326,9 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
ast_verb(1, "Received Softkey Event: New Call(%d/%d)\n", instance, callreference);
/* New Call ALWAYS gets a new sub-channel */
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
sub = c->tech_pvt;
-
+
if (!c) {
ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", l->name, d->name);
} else {
@@ -5943,7 +6338,16 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
case SOFTKEY_HOLD:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Hold(%d/%d)\n", instance, callreference);
- setsubstate(sub, SUBSTATE_HOLD);
+
+ if (sub) {
+ setsubstate(sub, SUBSTATE_HOLD);
+ } else { /* No sub, maybe an SLA call */
+ struct skinny_subline *subline;
+ if ((subline = find_subline_by_callid(d, callreference))) {
+ setsubstate(subline->sub, SUBSTATE_HOLD);
+ }
+ }
+
break;
case SOFTKEY_TRNSFER:
if (skinnydebug)
@@ -5976,7 +6380,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
ast_verb(1, "Received Softkey Event: Forward All(%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -5994,7 +6398,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
ast_verb(1, "Received Softkey Event: Forward Busy (%d/%d)\n", instance, callreference);
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -6013,7 +6417,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
#if 0 /* Not sure how to handle this yet */
if (!sub || !sub->owner) {
- c = skinny_new(l, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ c = skinny_new(l, NULL, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
} else {
c = sub->owner;
}
@@ -6042,7 +6446,7 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
return 0;
}
- if (l->transfer && sub->xferor && sub->owner->_state >= AST_STATE_RING) {
+ if (l->transfer && sub && sub->xferor && sub->owner->_state >= AST_STATE_RING) {
/* We're allowed to transfer, we have two active calls and
we made at least one of the calls. Let's try and transfer */
handle_transfer_button(sub);
@@ -6051,7 +6455,14 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
ast_devstate_changed(AST_DEVICE_NOT_INUSE, "Skinny/%s", l->name);
- dumpsub(sub, 1);
+ if (sub) {
+ dumpsub(sub, 1);
+ } else { /* No sub, maybe an SLA call */
+ struct skinny_subline *subline;
+ if ((subline = find_subline_by_callid(d, callreference))) {
+ dumpsub(subline->sub, 1);
+ }
+ }
d->hookstate = SKINNY_ONHOOK;
@@ -6062,8 +6473,20 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
case SOFTKEY_RESUME:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Resume(%d/%d)\n", instance, callreference);
-
- activatesub(sub, SUBSTATE_CONNECTED);
+
+ if (sub) {
+ activatesub(sub, SUBSTATE_CONNECTED);
+ } else { /* No sub, maybe an inactive SLA call */
+ struct skinny_subline *subline;
+ subline = find_subline_by_callid(d, callreference);
+ c = skinny_new(l, subline, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ if (!c) {
+ ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", l->name, d->name);
+ } else {
+ sub = c->tech_pvt;
+ dialandactivatesub(sub, subline->exten);
+ }
+ }
break;
case SOFTKEY_ANSWER:
if (skinnydebug)
@@ -6117,6 +6540,18 @@ static int handle_soft_key_event_message(struct skinny_req *req, struct skinnyse
case SOFTKEY_JOIN:
if (skinnydebug)
ast_verb(1, "Received Softkey Event: Join(%d/%d)\n", instance, callreference);
+ /* this is SLA territory, should not get here unless there is a meetme at subline */
+ {
+ struct skinny_subline *subline;
+ subline = find_subline_by_callid(d, callreference);
+ c = skinny_new(l, subline, AST_STATE_DOWN, NULL, SKINNY_OUTGOING);
+ if (!c) {
+ ast_log(LOG_WARNING, "Unable to create channel for %s@%s\n", l->name, d->name);
+ } else {
+ sub = c->tech_pvt;
+ dialandactivatesub(sub, subline->exten);
+ }
+ }
break;
case SOFTKEY_MEETME:
/* XXX How is this different from CONFRN? */
@@ -6575,6 +7010,7 @@ static int skinny_devicestate(void *data)
static struct ast_channel *skinny_request(const char *type, struct ast_format_cap *cap, const struct ast_channel *requestor, void *data, int *cause)
{
struct skinny_line *l;
+ struct skinny_subline *subline = NULL;
struct ast_channel *tmpc = NULL;
char tmp[256];
char *dest = data;
@@ -6591,13 +7027,24 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
}
l = find_line_by_name(tmp);
if (!l) {
- ast_log(LOG_NOTICE, "No available lines on: %s\n", dest);
- return NULL;
+ subline = find_subline_by_name(tmp);
+ if (!subline) {
+ ast_log(LOG_NOTICE, "No available lines on: %s\n", dest);
+ return NULL;
+ }
+ l = subline->line;
}
ast_verb(3, "skinny_request(%s)\n", tmp);
- tmpc = skinny_new(l, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL, SKINNY_INCOMING);
+ tmpc = skinny_new(l, subline, AST_STATE_DOWN, requestor ? requestor->linkedid : NULL, SKINNY_INCOMING);
if (!tmpc) {
ast_log(LOG_WARNING, "Unable to make channel for '%s'\n", tmp);
+ } else if (subline) {
+ struct skinny_subchannel *sub = tmpc->tech_pvt;
+ subline->sub = sub;
+ subline->calldirection = SKINNY_INCOMING;
+ subline->substate = SUBSTATE_UNSET;
+ subline->callid = sub->callid;
+ sub->subline = subline;
}
return tmpc;
}
@@ -6947,36 +7394,92 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
}
continue;
}
+ } else if (!strcasecmp(v->name, "subline")) {
+ if (type & (TYPE_LINE)) {
+ struct skinny_subline *subline;
+ struct skinny_container *container;
+ char buf[256];
+ char *stringp = buf, *exten, *stname, *context;
+
+ if (!(subline = ast_calloc(1, sizeof(*subline)))) {
+ ast_log(LOG_WARNING, "Unable to allocate memory for subline %s. Ignoring subline.\n", v->value);
+ continue;
+ }
+ if (!(container = ast_calloc(1, sizeof(*container)))) {
+ ast_log(LOG_WARNING, "Unable to allocate memory for subline %s container. Ignoring subline.\n", v->value);
+ ast_free(subline);
+ continue;
+ }
+
+ ast_copy_string(buf, v->value, sizeof(buf));
+ exten = strsep(&stringp, "@");
+ ast_copy_string(subline->exten, ast_strip(exten), sizeof(subline->exten));
+ stname = strsep(&exten, "_");
+ ast_copy_string(subline->stname, ast_strip(stname), sizeof(subline->stname));
+ ast_copy_string(subline->lnname, ast_strip(exten), sizeof(subline->lnname));
+ context = strsep(&stringp, ",");
+ ast_copy_string(subline->name, ast_strip(stringp), sizeof(subline->name));
+ ast_copy_string(subline->context, ast_strip(context), sizeof(subline->context));
+
+ subline->line = CLINE;
+ subline->sub = NULL;
+
+ container->type = SKINNY_SUBLINECONTAINER;
+ container->data = subline;
+ subline->container = container;
+ AST_LIST_INSERT_HEAD(&CLINE->sublines, subline, list);
+ continue;
+ }
+ } else if (!strcasecmp(v->name, "dialoutcontext")) {
+ if (type & (TYPE_LINE)) {
+ ast_copy_string(CLINE_OPTS->dialoutcontext, v->value, sizeof(CLINE_OPTS->dialoutcontext));
+ continue;
+ }
+ } else if (!strcasecmp(v->name, "dialoutexten")) {
+ if (type & (TYPE_LINE)) {
+ ast_copy_string(CLINE_OPTS->dialoutexten, v->value, sizeof(CLINE_OPTS->dialoutexten));
+ continue;
+ }
} else if (!strcasecmp(v->name, "speeddial")) {
if (type & (TYPE_DEVICE)) {
struct skinny_speeddial *sd;
+ struct skinny_container *container;
+ char buf[256];
+ char *stringp = buf, *exten, *context, *label;
+
if (!(sd = ast_calloc(1, sizeof(*sd)))) {
ast_log(LOG_WARNING, "Unable to allocate memory for speeddial %s. Ignoring speeddial.\n", v->name);
continue;
- } else {
- char buf[256];
- char *stringp = buf, *exten, *context, *label;
- ast_copy_string(buf, v->value, sizeof(buf));
- exten = strsep(&stringp, ",");
- if ((context = strchr(exten, '@'))) {
- *context++ = '\0';
- }
- label = stringp;
- ast_mutex_init(&sd->lock);
- ast_copy_string(sd->exten, exten, sizeof(sd->exten));
- if (!ast_strlen_zero(context)) {
- sd->isHint = 1;
- sd->instance = lineInstance++;
- ast_copy_string(sd->context, context, sizeof(sd->context));
- } else {
- sd->isHint = 0;
- sd->instance = speeddialInstance++;
- sd->context[0] = '\0';
- }
- ast_copy_string(sd->label, S_OR(label, exten), sizeof(sd->label));
- sd->parent = CDEV;
- AST_LIST_INSERT_HEAD(&CDEV->speeddials, sd, list);
}
+ if (!(container = ast_calloc(1, sizeof(*container)))) {
+ ast_log(LOG_WARNING, "Unable to allocate memory for speeddial %s container. Ignoring speeddial.\n", v->name);
+ ast_free(sd);
+ continue;
+ }
+
+ ast_copy_string(buf, v->value, sizeof(buf));
+ exten = strsep(&stringp, ",");
+ if ((context = strchr(exten, '@'))) {
+ *context++ = '\0';
+ }
+ label = stringp;
+ ast_mutex_init(&sd->lock);
+ ast_copy_string(sd->exten, exten, sizeof(sd->exten));
+ if (!ast_strlen_zero(context)) {
+ sd->isHint = 1;
+ sd->instance = lineInstance++;
+ ast_copy_string(sd->context, context, sizeof(sd->context));
+ } else {
+ sd->isHint = 0;
+ sd->instance = speeddialInstance++;
+ sd->context[0] = '\0';
+ }
+ ast_copy_string(sd->label, S_OR(label, exten), sizeof(sd->label));
+ sd->parent = CDEV;
+ container->type = SKINNY_SDCONTAINER;
+ container->data = sd;
+ sd->container = container;
+ AST_LIST_INSERT_HEAD(&CDEV->speeddials, sd, list);
continue;
}
} else if (!strcasecmp(v->name, "addon")) {
@@ -7005,6 +7508,7 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
{
struct skinny_line *l, *temp;
int update = 0;
+ struct skinny_container *container;
ast_log(LOG_NOTICE, "Configuring skinny line %s.\n", lname);
@@ -7023,7 +7527,17 @@ static struct ast_channel *skinny_request(const char *type, struct ast_format_ca
AST_LIST_UNLOCK(&lines);
return NULL;
}
+ if (!(container = ast_calloc(1, sizeof(*container)))) {
+ ast_log(LOG_WARNING, "Unable to allocate memory for line %s container.\n", lname);
+ skinny_line_destroy(l);
+ AST_LIST_UNLOCK(&lines);
+ return NULL;
+ }
+ container->type = SKINNY_LINECONTAINER;
+ container->data = l;
+ l->container = container;
+
memcpy(l, default_line, sizeof(*default_line));
ast_mutex_init(&l->lock);
ast_copy_string(l->name, lname, sizeof(l->name));
@@ -7281,6 +7795,7 @@ static void delete_devices(void)
}
/* Delete all speeddials for this device */
while ((sd = AST_LIST_REMOVE_HEAD(&d->speeddials, list))) {
+ free(sd->container);
free(sd);
}
/* Delete all addons for this device */
diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c
index f4b92330e..8f0cfa59e 100644
--- a/channels/chan_unistim.c
+++ b/channels/chan_unistim.c
@@ -32,6 +32,10 @@
* \ingroup channel_drivers
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/channels/chan_usbradio.c b/channels/chan_usbradio.c
index 925629f85..62a26de7f 100644
--- a/channels/chan_usbradio.c
+++ b/channels/chan_usbradio.c
@@ -38,6 +38,7 @@
<depend>alsa</depend>
<depend>usb</depend>
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
/*** MAKEOPTS
diff --git a/channels/chan_vpb.cc b/channels/chan_vpb.cc
index 0215ab82f..b4e9858ee 100644
--- a/channels/chan_vpb.cc
+++ b/channels/chan_vpb.cc
@@ -31,6 +31,8 @@
/*** MODULEINFO
<depend>vpb</depend>
+ <defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include <vpbapi.h>
diff --git a/channels/sig_pri.c b/channels/sig_pri.c
index 0204f054a..28ff16ff7 100644
--- a/channels/sig_pri.c
+++ b/channels/sig_pri.c
@@ -1191,7 +1191,7 @@ static void pri_queue_control(struct sig_pri_span *pri, int chanpos, int subclas
/*!
* \internal
* \brief Find the channel associated with the libpri call.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param call LibPRI opaque call pointer to find.
@@ -1221,7 +1221,7 @@ static int pri_find_principle_by_call(struct sig_pri_span *pri, q931_call *call)
/*!
* \internal
* \brief Kill the call.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param call LibPRI opaque call pointer to find.
@@ -4358,7 +4358,7 @@ static void sig_pri_handle_subcmds(struct sig_pri_span *pri, int chanpos, int ev
/*!
* \internal
* \brief Convert the MOH state to string.
- * \since 1.10
+ * \since 10.0
*
* \param state MOH state to process.
*
@@ -4409,7 +4409,7 @@ static const char *sig_pri_moh_state_str(enum sig_pri_moh_state state)
/*!
* \internal
* \brief Convert the MOH event to string.
- * \since 1.10
+ * \since 10.0
*
* \param event MOH event to process.
*
@@ -4458,7 +4458,7 @@ static const char *sig_pri_moh_event_str(enum sig_pri_moh_event event)
/*!
* \internal
* \brief Retrieve a call that was placed on hold by the HOLD message.
- * \since 1.10
+ * \since 10.0
*
* \param pvt Channel private control structure.
*
@@ -4500,7 +4500,7 @@ static enum sig_pri_moh_state sig_pri_moh_retrieve_call(struct sig_pri_chan *pvt
/*!
* \internal
* \brief MOH FSM state idle.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4564,7 +4564,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_idle(struct ast_channel *chan, str
/*!
* \internal
* \brief MOH FSM state notify remote party.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4598,7 +4598,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_notify(struct ast_channel *chan, s
/*!
* \internal
* \brief MOH FSM state generate moh.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4631,7 +4631,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_moh(struct ast_channel *chan, stru
/*!
* \internal
* \brief MOH FSM state hold requested.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4676,7 +4676,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_hold_req(struct ast_channel *chan,
/*!
* \internal
* \brief MOH FSM state hold requested with pending unhold.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4717,7 +4717,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_pend_unhold(struct ast_channel *ch
/*!
* \internal
* \brief MOH FSM state hold.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4759,7 +4759,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_hold(struct ast_channel *chan, str
/*!
* \internal
* \brief MOH FSM state retrieve requested.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4801,7 +4801,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_retrieve_req(struct ast_channel *c
/*!
* \internal
* \brief MOH FSM state retrieve requested with pending hold.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4879,7 +4879,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_pend_hold(struct ast_channel *chan
/*!
* \internal
* \brief MOH FSM state retrieve failed.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4919,7 +4919,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_retrieve_fail(struct ast_channel *
/*!
* \internal
* \brief MOH FSM state function type.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4952,7 +4952,7 @@ static const sig_pri_moh_fsm_state sig_pri_moh_fsm[SIG_PRI_MOH_STATE_NUM] = {
/*!
* \internal
* \brief Send an event to the MOH FSM.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to (Usually pvt->owner)
* \param pvt Channel private control structure.
@@ -4994,7 +4994,7 @@ static void sig_pri_moh_fsm_event(struct ast_channel *chan, struct sig_pri_chan
/*!
* \internal
* \brief Post an AMI hold event.
- * \since 1.10
+ * \since 10.0
*
* \param chan Channel to post event to
* \param is_held TRUE if the call was placed on hold.
@@ -5093,7 +5093,7 @@ done_with_private:;
/*!
* \internal
* \brief Handle the hold acknowledge event from libpri.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param ev Hold acknowledge event received.
@@ -5139,7 +5139,7 @@ static void sig_pri_handle_hold_ack(struct sig_pri_span *pri, pri_event *ev)
/*!
* \internal
* \brief Handle the hold reject event from libpri.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param ev Hold reject event received.
@@ -5254,7 +5254,7 @@ static void sig_pri_handle_retrieve(struct sig_pri_span *pri, pri_event *ev)
/*!
* \internal
* \brief Handle the retrieve acknowledge event from libpri.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param ev Retrieve acknowledge event received.
@@ -5287,7 +5287,7 @@ static void sig_pri_handle_retrieve_ack(struct sig_pri_span *pri, pri_event *ev)
/*!
* \internal
* \brief Handle the retrieve reject event from libpri.
- * \since 1.10
+ * \since 10.0
*
* \param pri PRI span control structure.
* \param ev Retrieve reject event received.
@@ -7055,7 +7055,7 @@ static void *pri_dchannel(void *vpri)
/*!
* \brief Output AMI show spans response events for the given PRI span.
- * \since 1.10
+ * \since 10.0
*
* \param show_cmd AMI command name
* \param s AMI session to output span information.
@@ -8844,7 +8844,7 @@ void sig_pri_fixup(struct ast_channel *oldchan, struct ast_channel *newchan, str
#if defined(HAVE_PRI_DISPLAY_TEXT)
/*!
* \brief Send display text.
- * \since 1.10
+ * \since 10.0
*
* \param p Channel to send text over
* \param text Text to send.
diff --git a/codecs/codec_a_mu.c b/codecs/codec_a_mu.c
index a7d86e2c4..470f363e7 100644
--- a/codecs/codec_a_mu.c
+++ b/codecs/codec_a_mu.c
@@ -23,6 +23,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_adpcm.c b/codecs/codec_adpcm.c
index 63745c170..96e19f0d3 100644
--- a/codecs/codec_adpcm.c
+++ b/codecs/codec_adpcm.c
@@ -27,6 +27,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_alaw.c b/codecs/codec_alaw.c
index 3d2fc92ae..34a71388e 100644
--- a/codecs/codec_alaw.c
+++ b/codecs/codec_alaw.c
@@ -23,6 +23,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_g722.c b/codecs/codec_g722.c
index 9c3a01846..89641f175 100644
--- a/codecs/codec_g722.c
+++ b/codecs/codec_g722.c
@@ -33,6 +33,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_g726.c b/codecs/codec_g726.c
index f8a57f740..d92b9b642 100644
--- a/codecs/codec_g726.c
+++ b/codecs/codec_g726.c
@@ -27,6 +27,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_gsm.c b/codecs/codec_gsm.c
index 46c1c84fb..f42a5f1bd 100644
--- a/codecs/codec_gsm.c
+++ b/codecs/codec_gsm.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>gsm</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/codecs/codec_ilbc.c b/codecs/codec_ilbc.c
index 7229b434d..ac6ccbb43 100644
--- a/codecs/codec_ilbc.c
+++ b/codecs/codec_ilbc.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/codecs/codec_lpc10.c b/codecs/codec_lpc10.c
index 7d1739203..5f2047a3f 100644
--- a/codecs/codec_lpc10.c
+++ b/codecs/codec_lpc10.c
@@ -27,6 +27,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/codecs/codec_resample.c b/codecs/codec_resample.c
index 66ef584bd..a3e7d6f26 100644
--- a/codecs/codec_resample.c
+++ b/codecs/codec_resample.c
@@ -25,6 +25,11 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <depend>resample</depend>
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
#include "speex/speex_resampler.h"
diff --git a/codecs/codec_speex.c b/codecs/codec_speex.c
index 6554ee000..d298f2379 100644
--- a/codecs/codec_speex.c
+++ b/codecs/codec_speex.c
@@ -34,6 +34,7 @@
<depend>speex</depend>
<depend>speex_preprocess</depend>
<use type="external">speexdsp</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/codecs/codec_ulaw.c b/codecs/codec_ulaw.c
index b5211a585..86a0706c4 100644
--- a/codecs/codec_ulaw.c
+++ b/codecs/codec_ulaw.c
@@ -23,6 +23,10 @@
* \ingroup codecs
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/configs/chan_dahdi.conf.sample b/configs/chan_dahdi.conf.sample
index 16269dc39..b7f59f795 100644
--- a/configs/chan_dahdi.conf.sample
+++ b/configs/chan_dahdi.conf.sample
@@ -664,6 +664,13 @@ transfer=yes
; ('canpark=no' is overridden by 'transfer=yes')
;
canpark=yes
+
+; Sets the default parking lot for call parking.
+; This is setable per channel.
+; Parkinglots are configured in features.conf
+;
+;parkinglot=plaza
+
;
; Support call forward variable
;
diff --git a/configs/chan_ooh323.conf.sample b/configs/chan_ooh323.conf.sample
index 8dbdafc73..20ccf73ec 100644
--- a/configs/chan_ooh323.conf.sample
+++ b/configs/chan_ooh323.conf.sample
@@ -122,6 +122,18 @@ dtmfmode=rfc2833
;
;roundtrip=x,y
+;
+; FAX detection will cause the OOH323 channel to jump to the 'fax' extension (if it exists)
+; based one or more events being detected. The events that can be detected are an incoming
+; CNG tone or an incoming T.38 RequestMode packet
+;
+; yes - enable both detection (CNG & T.38)
+; no - disable both
+; cng - enable CNG detection (default)
+; t38 - enable T.38 request detection
+;
+faxdetect = cng
+
; User/peer/friend definitions:
; User config options Peer config options
; ------------------ -------------------
diff --git a/configs/codecs.conf.sample b/configs/codecs.conf.sample
index 4404d4a0c..9b5738577 100644
--- a/configs/codecs.conf.sample
+++ b/configs/codecs.conf.sample
@@ -126,7 +126,6 @@ maxbitrate=20000
fec=true
packetloss_percentage=10;
-
[silk24]
type=silk
samprate=24000
@@ -134,3 +133,21 @@ maxbitrate=30000
fec=true
packetloss_percentage=10;
+
+; Default custom CELT codec definitions. Only one custom CELT definition is allowed
+; per a sample rate.
+;[celt44]
+;type=celt
+;samprate=44100 ; The samplerate in hz. This option is required.
+;framesize=480 ; The framesize option represents the duration of each frame in samples.
+ ; This must be a factor of 2. This option is only advertised in an SDP
+ ; when it is set. Otherwise a default of framesize of 480 is assumed
+ ; internally
+
+;[celt48]
+;type=celt
+;samprate=48000
+
+;[celt32]
+;type=celt
+;samprate=32000
diff --git a/configs/confbridge.conf.sample b/configs/confbridge.conf.sample
index 408387012..e60ba73be 100644
--- a/configs/confbridge.conf.sample
+++ b/configs/confbridge.conf.sample
@@ -168,9 +168,13 @@ type=bridge
; larger amounts of delay into the bridge. Valid values here are 10, 20, 40,
; or 80. By default 20ms is used.
-;video_mode = follow_talker ; Sets how confbridge handles video distribution to the conference participants.
+;video_mode = follow_talker; Sets how confbridge handles video distribution to the conference participants.
; Note that participants wanting to view and be the source of a video feed
- ; _MUST_ be sharing the same video codec.
+ ; _MUST_ be sharing the same video codec. Also, using video in conjunction with
+ ; with the jitterbuffer currently results in the audio being slightly out of sync
+ ; with the video. This is a result of the jitterbuffer only working on the audio
+ ; stream. It is recommended to disable the jitterbuffer when video is used.
+ ;
; --- MODES ---
; none: No video sources are set by default in the conference. It is still
; possible for a user to be set as a video source via AMI or DTMF action
@@ -284,8 +288,23 @@ type=bridge
; admin_toggle_conference_lock ; This action allows an Admin to toggle locking and
; unlocking the conference. Non admins can not use
; this action even if it is in their menu.
+
; set_as_single_video_src ; This action allows any user to set themselves as the
; single video source distributed to all participants.
+ ; This will make the video feed stick to them regardless
+ ; of what the video_mode is set to.
+
+; release_as_single_video_src ; This action allows a user to release themselves as
+ ; the video source. If video_mode is not set to "none"
+ ; this action will result in the conference returning to
+ ; whatever video mode the bridge profile is using.
+ ;
+ ; Note that this action will have no effect if the user
+ ; is not currently the video source. Also, the user is
+ ; not guaranteed by using this action that they will not
+ ; become the video source again. The bridge will return
+ ; to whatever operation the video_mode option is set to
+ ; upon release of the video src.
[sample_user_menu]
type=menu
diff --git a/configs/features.conf.sample b/configs/features.conf.sample
index f9d9dd45d..dfeec1757 100644
--- a/configs/features.conf.sample
+++ b/configs/features.conf.sample
@@ -73,6 +73,10 @@ context => parkedcalls ; Which context parked calls are in (default parking lot
; caller is connected, then by default, the system will try to call back the
; person that did the transfer. If this is set to "yes", the callback will
; not be attempted and the transfer will just fail.
+ ; For atxferdropcall=no to work properly, you also need to
+ ; define ATXFER_NULL_TECH in main/features.c. The reason the
+ ; code is not enabled by default is spelled out in the comment
+ ; block near the top of main/features.c describing ATXFER_NULL_TECH.
;atxferloopdelay = 10 ; Number of seconds to sleep between retries (if atxferdropcall = no)
;atxfercallbackretries = 2 ; Number of times to attempt to send the call back to the transferer.
; By default, this is 2.
diff --git a/configure b/configure
index f9e46a63d..3abd3cb69 100755
--- a/configure
+++ b/configure
@@ -1,14 +1,14 @@
#! /bin/sh
-# From configure.ac Revision: 320561 .
+# From configure.ac Revision: 323321 .
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for asterisk trunk.
+# Generated by GNU Autoconf 2.67 for asterisk trunk.
#
# Report bugs to <https://issues.asterisk.org>.
#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -322,7 +322,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -362,19 +362,19 @@ else
fi # as_fn_arith
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -536,7 +536,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
exec 6>&1
# Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
# so uname gets run too.
ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
@@ -1312,8 +1312,9 @@ do
fi
case $ac_option in
- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
- *) ac_optarg=yes ;;
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
esac
# Accept the important Cygnus configure options, so we can diagnose typos.
@@ -1358,7 +1359,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1384,7 +1385,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid feature name: $ac_useropt"
+ as_fn_error $? "invalid feature name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1588,7 +1589,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1604,7 +1605,7 @@ do
ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
- as_fn_error "invalid package name: $ac_useropt"
+ as_fn_error $? "invalid package name: $ac_useropt"
ac_useropt_orig=$ac_useropt
ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
case $ac_user_opts in
@@ -1634,8 +1635,8 @@ do
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
x_libraries=$ac_optarg ;;
- -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
;;
*=*)
@@ -1643,7 +1644,7 @@ Try \`$0 --help' for more information."
# Reject names that are not valid shell variable names.
case $ac_envvar in #(
'' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
esac
eval $ac_envvar=\$ac_optarg
export $ac_envvar ;;
@@ -1661,13 +1662,13 @@ done
if test -n "$ac_prev"; then
ac_option=--`echo $ac_prev | sed 's/_/-/g'`
- as_fn_error "missing argument to $ac_option"
+ as_fn_error $? "missing argument to $ac_option"
fi
if test -n "$ac_unrecognized_opts"; then
case $enable_option_checking in
no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
*) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
esac
fi
@@ -1690,7 +1691,7 @@ do
[\\/$]* | ?:[\\/]* ) continue;;
NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
esac
- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
done
# There might be people who depend on the old broken behavior: `$host'
@@ -1704,8 +1705,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
- If a cross compiler is detected then cross compile mode will be used." >&2
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1720,9 +1721,9 @@ test "$silent" = yes && exec 6>/dev/null
ac_pwd=`pwd` && test -n "$ac_pwd" &&
ac_ls_di=`ls -di .` &&
ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
- as_fn_error "working directory cannot be determined"
+ as_fn_error $? "working directory cannot be determined"
test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
+ as_fn_error $? "pwd does not report name of working directory"
# Find the source files, if location was not specified.
@@ -1761,11 +1762,11 @@ else
fi
if test ! -r "$srcdir/$ac_unique_file"; then
test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
fi
ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
pwd)`
# When building in place, set srcdir=.
if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1805,7 +1806,7 @@ Configuration:
--help=short display options specific to this package
--help=recursive display the short help of all the included packages
-V, --version display version information and exit
- -q, --quiet, --silent do not print \`checking...' messages
+ -q, --quiet, --silent do not print \`checking ...' messages
--cache-file=FILE cache test results in FILE [disabled]
-C, --config-cache alias for \`--cache-file=config.cache'
-n, --no-create do not create output files
@@ -2029,9 +2030,9 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
asterisk configure trunk
-generated by GNU Autoconf 2.65
+generated by GNU Autoconf 2.67
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -2103,7 +2104,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2127,10 +2128,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2166,7 +2167,7 @@ if ac_fn_c_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2189,17 +2190,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------------ ##
+( $as_echo "## ------------------------------------------ ##
## Report this to https://issues.asterisk.org ##
-## ------------------------------------------ ##
-_ASBOX
+## ------------------------------------------ ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2263,7 +2262,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2344,7 +2343,7 @@ $as_echo "$ac_try_echo"; } >&5
mv -f conftest.er1 conftest.err
fi
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
+ test $ac_status = 0; } > conftest.i && {
test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
test ! -s conftest.err
}; then :
@@ -2414,7 +2413,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2482,7 +2481,7 @@ ac_fn_c_check_type ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -2536,7 +2535,7 @@ ac_fn_c_check_member ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
$as_echo_n "checking for $2.$3... " >&6; }
-if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$4+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2770,10 +2769,10 @@ rm -f conftest.val
ac_fn_cxx_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -2809,7 +2808,7 @@ if ac_fn_cxx_try_cpp "$LINENO"; then :
else
ac_header_preproc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
$as_echo "$ac_header_preproc" >&6; }
@@ -2832,17 +2831,15 @@ $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------------ ##
+( $as_echo "## ------------------------------------------ ##
## Report this to https://issues.asterisk.org ##
-## ------------------------------------------ ##
-_ASBOX
+## ------------------------------------------ ##"
) | sed "s/^/$as_me: WARNING: /" >&2
;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -2910,7 +2907,7 @@ ac_fn_cxx_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -2936,7 +2933,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by asterisk $as_me trunk, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -3046,11 +3043,9 @@ trap 'exit_status=$?
{
echo
- cat <<\_ASBOX
-## ---------------- ##
+ $as_echo "## ---------------- ##
## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
echo
# The following way of writing the cache mishandles newlines in values,
(
@@ -3084,11 +3079,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
)
echo
- cat <<\_ASBOX
-## ----------------- ##
+ $as_echo "## ----------------- ##
## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
echo
for ac_var in $ac_subst_vars
do
@@ -3101,11 +3094,9 @@ _ASBOX
echo
if test -n "$ac_subst_files"; then
- cat <<\_ASBOX
-## ------------------- ##
+ $as_echo "## ------------------- ##
## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
echo
for ac_var in $ac_subst_files
do
@@ -3119,11 +3110,9 @@ _ASBOX
fi
if test -s confdefs.h; then
- cat <<\_ASBOX
-## ----------- ##
+ $as_echo "## ----------- ##
## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
echo
cat confdefs.h
echo
@@ -3178,7 +3167,12 @@ _ACEOF
ac_site_file1=NONE
ac_site_file2=NONE
if test -n "$CONFIG_SITE"; then
- ac_site_file1=$CONFIG_SITE
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
elif test "x$prefix" != xNONE; then
ac_site_file1=$prefix/share/config.site
ac_site_file2=$prefix/etc/config.site
@@ -3193,7 +3187,11 @@ do
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
- . "$ac_site_file"
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -3273,7 +3271,7 @@ if $ac_cache_corrupted; then
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
{ $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
- as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
fi
## -------------------- ##
## Main body of script. ##
@@ -3290,16 +3288,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
# cross-compile macros
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3313,7 +3317,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
# Make sure we can run config.sub.
$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
@@ -3324,16 +3328,16 @@ else
test "x$ac_build_alias" = x &&
ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
test "x$ac_build_alias" = x &&
- as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -3358,7 +3362,7 @@ else
ac_cv_host=$ac_cv_build
else
ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
fi
fi
@@ -3366,7 +3370,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -3388,16 +3392,22 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
ac_aux_dir=
for ac_dir in `pwd` "$srcdir"/`pwd`; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
done
if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in \`pwd\` \"$srcdir\"/\`pwd\`" "$LINENO" 5
fi
# These three variables are undocumented and unsupported,
@@ -3539,8 +3549,8 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -3654,9 +3664,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3698,8 +3707,8 @@ done
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3756,9 +3765,9 @@ $as_echo "$ac_try_echo"; } >&5
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
+as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -3809,8 +3818,8 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -4074,7 +4083,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4090,11 +4099,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -4133,7 +4142,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -4149,18 +4158,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -4221,7 +4230,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_GREP"; then
- as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_GREP=$GREP
@@ -4287,7 +4296,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -4419,8 +4428,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -5423,7 +5431,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5439,11 +5447,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -5482,7 +5490,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5498,18 +5506,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -5556,7 +5564,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5572,11 +5580,11 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
break
fi
@@ -5615,7 +5623,7 @@ else
# Broken: fails on valid input.
continue
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
# OK, works on sane cases. Now check whether nonexistent headers
# can be detected and how.
@@ -5631,18 +5639,18 @@ else
ac_preproc_ok=:
break
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.err conftest.i conftest.$ac_ext
done
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -f conftest.i conftest.err conftest.$ac_ext
if $ac_preproc_ok; then :
else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -5710,7 +5718,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
fi
else
ac_cv_path_SED=$SED
@@ -5821,7 +5829,7 @@ else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
if test "${lt_cv_prog_gnu_ld+set}" = set; then :
@@ -6102,7 +6110,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_GNU_MAKE" >&5
$as_echo "$ac_cv_GNU_MAKE" >&6; } ;
if test "x$ac_cv_GNU_MAKE" = "xNot Found" ; then
- as_fn_error "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5
+ as_fn_error $? "*** Please install GNU make. It is required to build Asterisk!" "$LINENO" 5
exit 1
fi
GNU_MAKE=$ac_cv_GNU_MAKE
@@ -6162,7 +6170,7 @@ esac
done
IFS=$as_save_IFS
if test -z "$ac_cv_path_EGREP"; then
- as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
fi
else
ac_cv_path_EGREP=$EGREP
@@ -7931,7 +7939,7 @@ if test "${enable_dev_mode+set}" = set; then :
AST_DEVMODE=yes
NOISY_BUILD=yes
;;
- *) as_fn_error "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-dev-mode" "$LINENO" 5 ;;
esac
fi
@@ -7944,7 +7952,7 @@ if test "${enable_coverage+set}" = set; then :
enableval=$enable_coverage; case "${enableval}" in
y|ye|yes) AST_CODE_COVERAGE=yes ;;
n|no) AST_CODE_COVERAGE=no ;;
- *) as_fn_error "bad value ${enableval} for --enable-coverage" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-coverage" "$LINENO" 5 ;;
esac
fi
@@ -11092,8 +11100,7 @@ if test $ac_cv_os_cray = yes; then
for ac_func in _getb67 GETB67 getb67; do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define CRAY_STACKSEG_END $ac_func
@@ -11160,7 +11167,7 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Header+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -11187,8 +11194,7 @@ fi
eval ac_res=\$$as_ac_Header
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
_ACEOF
@@ -11471,8 +11477,7 @@ for ac_header in arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h mall
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -11500,8 +11505,7 @@ for ac_header in winsock.h winsock2.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -12395,8 +12399,7 @@ for ac_func in fork vfork
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -12779,8 +12782,7 @@ do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -12977,8 +12979,7 @@ for ac_header in sys/select.h sys/socket.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
@@ -13532,8 +13533,7 @@ for ac_func in asprintf atexit closefrom dup2 eaccess endpwent euidaccess ffsll
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -13594,8 +13594,7 @@ for ac_func in exp2 log2 exp10 log10 sin cos tan asin acos atan atan2 pow rint e
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -13611,8 +13610,7 @@ if test "x${ac_cv_type_long_double_wider}" = "xyes" ; then
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -13727,7 +13725,7 @@ if test "${enable_internal_poll+set}" = set; then :
enableval=$enable_internal_poll; case "${enableval}" in
y|ye|yes) HAS_POLL="";;
n|no) HAS_POLL="${HAS_POLL}" ;;
- *) as_fn_error "bad value ${enableval} for --enable-internal-poll" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for --enable-internal-poll" "$LINENO" 5 ;;
esac
fi
@@ -13741,8 +13739,7 @@ for ac_func in funopen fopencookie
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-eval as_val=\$$as_ac_var
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
@@ -13978,7 +13975,7 @@ if test "${ac_cv_file__dev_urandom+set}" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/dev/urandom"; then
ac_cv_file__dev_urandom=yes
else
@@ -14516,8 +14513,8 @@ if test "${ac_cv_have_variable_fdset}x" = "0x"; then
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5 ; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -15818,9 +15815,8 @@ else
if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (int)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (int)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_int=0
fi
@@ -15852,9 +15848,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_long=0
fi
@@ -15886,9 +15881,8 @@ else
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_long_long=0
fi
@@ -15920,9 +15914,8 @@ else
if test "$ac_cv_type_char_p" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (char *)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (char *)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_char_p=0
fi
@@ -15954,9 +15947,8 @@ else
if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_long=0
fi
@@ -15988,9 +15980,8 @@ else
if test "$ac_cv_type_long_long" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (long long)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (long long)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_long_long=0
fi
@@ -16029,9 +16020,8 @@ else
if test "$ac_cv_type_fd_set_fds_bits" = yes; then
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "cannot compute sizeof (fd_set.fds_bits)
-See \`config.log' for more details." "$LINENO" 5; }; }
+as_fn_error 77 "cannot compute sizeof (fd_set.fds_bits)
+See \`config.log' for more details" "$LINENO" 5 ; }
else
ac_cv_sizeof_fd_set_fds_bits=0
fi
@@ -16218,7 +16208,7 @@ if test "x${PBX_ALSA}" != "x1" -a "${USE_ALSA}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_asound_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lasound" >&5
$as_echo_n "checking for ${pbxfuncname} in -lasound... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16253,8 +16243,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ALSA_FOUND=yes
else
AST_ALSA_FOUND=no
@@ -16324,7 +16313,7 @@ if test "x${PBX_BFD}" != "x1" -a "${USE_BFD}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_bfd_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbfd" >&5
$as_echo_n "checking for ${pbxfuncname} in -lbfd... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16359,8 +16348,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_BFD_FOUND=yes
else
AST_BFD_FOUND=no
@@ -16430,7 +16418,7 @@ if test "x${PBX_CURSES}" != "x1" -a "${USE_CURSES}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_curses_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcurses" >&5
$as_echo_n "checking for ${pbxfuncname} in -lcurses... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16465,8 +16453,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_CURSES_FOUND=yes
else
AST_CURSES_FOUND=no
@@ -16537,7 +16524,7 @@ if test "x${PBX_CAP}" != "x1" -a "${USE_CAP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_cap_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcap" >&5
$as_echo_n "checking for ${pbxfuncname} in -lcap... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -16572,8 +16559,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_CAP_FOUND=yes
else
AST_CAP_FOUND=no
@@ -17065,8 +17051,7 @@ fi
if test "x${GSM_DIR}" != "x" ; then
as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
GSM_HEADER_FOUND=1
else
GSM_HEADER_FOUND=0
@@ -17075,8 +17060,7 @@ fi
as_ac_Header=`$as_echo "ac_cv_header_${GSM_DIR}/include/gsm/gsm.h" | $as_tr_sh`
ac_fn_c_check_header_mongrel "$LINENO" "${GSM_DIR}/include/gsm/gsm.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
GSM_GSM_HEADER_FOUND=1
else
GSM_GSM_HEADER_FOUND=0
@@ -17175,7 +17159,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
$as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17210,8 +17194,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ICONV_FOUND=yes
else
AST_ICONV_FOUND=no
@@ -17281,7 +17264,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_iconv_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liconv" >&5
$as_echo_n "checking for ${pbxfuncname} in -liconv... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17316,8 +17299,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ICONV_FOUND=yes
else
AST_ICONV_FOUND=no
@@ -17387,7 +17369,7 @@ if test "x${PBX_ICONV}" != "x1" -a "${USE_ICONV}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17422,8 +17404,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ICONV_FOUND=yes
else
AST_ICONV_FOUND=no
@@ -17494,7 +17475,7 @@ if test "x${PBX_ICAL}" != "x1" -a "${USE_ICAL}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ical_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lical" >&5
$as_echo_n "checking for ${pbxfuncname} in -lical... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17529,8 +17510,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ICAL_FOUND=yes
else
AST_ICAL_FOUND=no
@@ -17600,7 +17580,7 @@ if test "x${PBX_IKSEMEL}" != "x1" -a "${USE_IKSEMEL}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_iksemel_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liksemel" >&5
$as_echo_n "checking for ${pbxfuncname} in -liksemel... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -17635,8 +17615,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_IKSEMEL_FOUND=yes
else
AST_IKSEMEL_FOUND=no
@@ -18334,7 +18313,7 @@ if test "x${PBX_IODBC}" != "x1" -a "${USE_IODBC}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_iodbc_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -liodbc" >&5
$as_echo_n "checking for ${pbxfuncname} in -liodbc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18369,8 +18348,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_IODBC_FOUND=yes
else
AST_IODBC_FOUND=no
@@ -18440,7 +18418,7 @@ if test "x${PBX_INOTIFY}" != "x1" -a "${USE_INOTIFY}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18475,8 +18453,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_INOTIFY_FOUND=yes
else
AST_INOTIFY_FOUND=no
@@ -18546,7 +18523,7 @@ if test "x${PBX_JACK}" != "x1" -a "${USE_JACK}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_jack_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ljack" >&5
$as_echo_n "checking for ${pbxfuncname} in -ljack... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18581,8 +18558,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_JACK_FOUND=yes
else
AST_JACK_FOUND=no
@@ -18653,7 +18629,7 @@ if test "x${PBX_KQUEUE}" != "x1" -a "${USE_KQUEUE}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18688,8 +18664,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_KQUEUE_FOUND=yes
else
AST_KQUEUE_FOUND=no
@@ -18773,7 +18748,7 @@ if test "x${PBX_LTDL}" != "x1" -a "${USE_LTDL}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ltdl_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lltdl" >&5
$as_echo_n "checking for ${pbxfuncname} in -lltdl... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18808,8 +18783,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_LTDL_FOUND=yes
else
AST_LTDL_FOUND=no
@@ -18879,7 +18853,7 @@ if test "x${PBX_LDAP}" != "x1" -a "${USE_LDAP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ldap_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lldap" >&5
$as_echo_n "checking for ${pbxfuncname} in -lldap... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -18914,8 +18888,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_LDAP_FOUND=yes
else
AST_LDAP_FOUND=no
@@ -18970,7 +18943,7 @@ if test "${enable_xmldoc+set}" = set; then :
enableval=$enable_xmldoc; case "${enableval}" in
y|ye|yes) disable_xmldoc=no ;;
n|no) disable_xmldoc=yes ;;
- *) as_fn_error "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5 ;;
+ *) as_fn_error $? "bad value ${enableval} for --disable-xmldoc" "$LINENO" 5 ;;
esac
else
disable_xmldoc=no
@@ -19161,7 +19134,7 @@ if test "x${PBX_MISDN}" != "x1" -a "${USE_MISDN}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_mISDN_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lmISDN" >&5
$as_echo_n "checking for ${pbxfuncname} in -lmISDN... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19196,8 +19169,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_MISDN_FOUND=yes
else
AST_MISDN_FOUND=no
@@ -19268,7 +19240,7 @@ if test "x${PBX_ISDNNET}" != "x1" -a "${USE_ISDNNET}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_isdnnet_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lisdnnet" >&5
$as_echo_n "checking for ${pbxfuncname} in -lisdnnet... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19303,8 +19275,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ISDNNET_FOUND=yes
else
AST_ISDNNET_FOUND=no
@@ -19373,7 +19344,7 @@ if test "x${PBX_SUPPSERV}" != "x1" -a "${USE_SUPPSERV}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_suppserv_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsuppserv" >&5
$as_echo_n "checking for ${pbxfuncname} in -lsuppserv... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19408,8 +19379,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SUPPSERV_FOUND=yes
else
AST_SUPPSERV_FOUND=no
@@ -19741,7 +19711,7 @@ if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_nbs_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnbs" >&5
$as_echo_n "checking for ${pbxfuncname} in -lnbs... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19776,8 +19746,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_NBS_FOUND=yes
else
AST_NBS_FOUND=no
@@ -19847,7 +19816,7 @@ if test "x${PBX_NCURSES}" != "x1" -a "${USE_NCURSES}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ncurses_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lncurses" >&5
$as_echo_n "checking for ${pbxfuncname} in -lncurses... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -19882,8 +19851,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_NCURSES_FOUND=yes
else
AST_NCURSES_FOUND=no
@@ -20412,7 +20380,7 @@ if test "x${PBX_NEWT}" != "x1" -a "${USE_NEWT}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_newt_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lnewt" >&5
$as_echo_n "checking for ${pbxfuncname} in -lnewt... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20447,8 +20415,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_NEWT_FOUND=yes
else
AST_NEWT_FOUND=no
@@ -20518,7 +20485,7 @@ if test "x${PBX_UNIXODBC}" != "x1" -a "${USE_UNIXODBC}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_odbc_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lodbc" >&5
$as_echo_n "checking for ${pbxfuncname} in -lodbc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20553,8 +20520,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_UNIXODBC_FOUND=yes
else
AST_UNIXODBC_FOUND=no
@@ -20624,7 +20590,7 @@ if test "x${PBX_OGG}" != "x1" -a "${USE_OGG}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ogg_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -logg" >&5
$as_echo_n "checking for ${pbxfuncname} in -logg... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20659,8 +20625,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OGG_FOUND=yes
else
AST_OGG_FOUND=no
@@ -20731,7 +20696,7 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_execinfo_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lexecinfo" >&5
$as_echo_n "checking for ${pbxfuncname} in -lexecinfo... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20766,8 +20731,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_BKTR_FOUND=yes
else
AST_BKTR_FOUND=no
@@ -20837,7 +20801,7 @@ if test "x${PBX_BKTR}" != "x1" -a "${USE_BKTR}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_c_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lc" >&5
$as_echo_n "checking for ${pbxfuncname} in -lc... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20872,8 +20836,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_BKTR_FOUND=yes
else
AST_BKTR_FOUND=no
@@ -20943,7 +20906,7 @@ if test "x${PBX_BLUETOOTH}" != "x1" -a "${USE_BLUETOOTH}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_bluetooth_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lbluetooth" >&5
$as_echo_n "checking for ${pbxfuncname} in -lbluetooth... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -20978,8 +20941,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_BLUETOOTH_FOUND=yes
else
AST_BLUETOOTH_FOUND=no
@@ -21050,7 +21012,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21085,8 +21047,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OSS_FOUND=yes
else
AST_OSS_FOUND=no
@@ -21155,7 +21116,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21190,8 +21151,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OSS_FOUND=yes
else
AST_OSS_FOUND=no
@@ -21260,7 +21220,7 @@ if test "x${PBX_OSS}" != "x1" -a "${USE_OSS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ossaudio_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lossaudio" >&5
$as_echo_n "checking for ${pbxfuncname} in -lossaudio... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21295,8 +21255,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OSS_FOUND=yes
else
AST_OSS_FOUND=no
@@ -21695,7 +21654,7 @@ if test "x${PBX_POPT}" != "x1" -a "${USE_POPT}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_popt_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpopt" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpopt... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21730,8 +21689,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_POPT_FOUND=yes
else
AST_POPT_FOUND=no
@@ -21801,7 +21759,7 @@ if test "x${PBX_PORTAUDIO}" != "x1" -a "${USE_PORTAUDIO}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_portaudio_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lportaudio" >&5
$as_echo_n "checking for ${pbxfuncname} in -lportaudio... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21836,8 +21794,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PORTAUDIO_FOUND=yes
else
AST_PORTAUDIO_FOUND=no
@@ -21907,7 +21864,7 @@ if test "x${PBX_PRI}" != "x1" -a "${USE_PRI}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -21942,8 +21899,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_FOUND=yes
else
AST_PRI_FOUND=no
@@ -22012,7 +21968,7 @@ if test "x${PBX_PRI_DATETIME_SEND}" != "x1" -a "${USE_PRI_DATETIME_SEND}" != "no
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22047,8 +22003,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_DATETIME_SEND_FOUND=yes
else
AST_PRI_DATETIME_SEND_FOUND=no
@@ -22117,7 +22072,7 @@ if test "x${PBX_PRI_MWI_V2}" != "x1" -a "${USE_PRI_MWI_V2}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22152,8 +22107,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_MWI_V2_FOUND=yes
else
AST_PRI_MWI_V2_FOUND=no
@@ -22222,7 +22176,7 @@ if test "x${PBX_PRI_DISPLAY_TEXT}" != "x1" -a "${USE_PRI_DISPLAY_TEXT}" != "no";
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22257,8 +22211,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_DISPLAY_TEXT_FOUND=yes
else
AST_PRI_DISPLAY_TEXT_FOUND=no
@@ -22327,7 +22280,7 @@ if test "x${PBX_PRI_MWI}" != "x1" -a "${USE_PRI_MWI}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22362,8 +22315,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_MWI_FOUND=yes
else
AST_PRI_MWI_FOUND=no
@@ -22432,7 +22384,7 @@ if test "x${PBX_PRI_MCID}" != "x1" -a "${USE_PRI_MCID}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22467,8 +22419,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_MCID_FOUND=yes
else
AST_PRI_MCID_FOUND=no
@@ -22537,7 +22488,7 @@ if test "x${PBX_PRI_CALL_WAITING}" != "x1" -a "${USE_PRI_CALL_WAITING}" != "no";
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22572,8 +22523,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_CALL_WAITING_FOUND=yes
else
AST_PRI_CALL_WAITING_FOUND=no
@@ -22642,7 +22592,7 @@ if test "x${PBX_PRI_AOC_EVENTS}" != "x1" -a "${USE_PRI_AOC_EVENTS}" != "no"; the
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22677,8 +22627,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_AOC_EVENTS_FOUND=yes
else
AST_PRI_AOC_EVENTS_FOUND=no
@@ -22747,7 +22696,7 @@ if test "x${PBX_PRI_TRANSFER}" != "x1" -a "${USE_PRI_TRANSFER}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22782,8 +22731,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_TRANSFER_FOUND=yes
else
AST_PRI_TRANSFER_FOUND=no
@@ -22852,7 +22800,7 @@ if test "x${PBX_PRI_CCSS}" != "x1" -a "${USE_PRI_CCSS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22887,8 +22835,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_CCSS_FOUND=yes
else
AST_PRI_CCSS_FOUND=no
@@ -22957,7 +22904,7 @@ if test "x${PBX_PRI_HANGUP_FIX}" != "x1" -a "${USE_PRI_HANGUP_FIX}" != "no"; the
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -22992,8 +22939,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_HANGUP_FIX_FOUND=yes
else
AST_PRI_HANGUP_FIX_FOUND=no
@@ -23062,7 +23008,7 @@ if test "x${PBX_PRI_SUBADDR}" != "x1" -a "${USE_PRI_SUBADDR}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23097,8 +23043,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_SUBADDR_FOUND=yes
else
AST_PRI_SUBADDR_FOUND=no
@@ -23167,7 +23112,7 @@ if test "x${PBX_PRI_CALL_HOLD}" != "x1" -a "${USE_PRI_CALL_HOLD}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23202,8 +23147,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_CALL_HOLD_FOUND=yes
else
AST_PRI_CALL_HOLD_FOUND=no
@@ -23272,7 +23216,7 @@ if test "x${PBX_PRI_CALL_REROUTING}" != "x1" -a "${USE_PRI_CALL_REROUTING}" != "
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23307,8 +23251,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_CALL_REROUTING_FOUND=yes
else
AST_PRI_CALL_REROUTING_FOUND=no
@@ -23377,7 +23320,7 @@ if test "x${PBX_PRI_SETUP_KEYPAD}" != "x1" -a "${USE_PRI_SETUP_KEYPAD}" != "no";
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23412,8 +23355,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_SETUP_KEYPAD_FOUND=yes
else
AST_PRI_SETUP_KEYPAD_FOUND=no
@@ -23486,7 +23428,7 @@ if test "x${PBX_PRI_PROG_W_CAUSE}" != "x1" -a "${USE_PRI_PROG_W_CAUSE}" != "no";
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23521,8 +23463,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_PROG_W_CAUSE_FOUND=yes
else
AST_PRI_PROG_W_CAUSE_FOUND=no
@@ -23591,7 +23532,7 @@ if test "x${PBX_PRI_INBANDDISCONNECT}" != "x1" -a "${USE_PRI_INBANDDISCONNECT}"
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23626,8 +23567,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_INBANDDISCONNECT_FOUND=yes
else
AST_PRI_INBANDDISCONNECT_FOUND=no
@@ -23696,7 +23636,7 @@ if test "x${PBX_PRI_SERVICE_MESSAGES}" != "x1" -a "${USE_PRI_SERVICE_MESSAGES}"
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23731,8 +23671,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_SERVICE_MESSAGES_FOUND=yes
else
AST_PRI_SERVICE_MESSAGES_FOUND=no
@@ -23801,7 +23740,7 @@ if test "x${PBX_PRI_REVERSE_CHARGE}" != "x1" -a "${USE_PRI_REVERSE_CHARGE}" != "
as_ac_Lib=`$as_echo "ac_cv_lib_pri_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lpri" >&5
$as_echo_n "checking for ${pbxfuncname} in -lpri... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23836,8 +23775,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_PRI_REVERSE_CHARGE_FOUND=yes
else
AST_PRI_REVERSE_CHARGE_FOUND=no
@@ -23908,7 +23846,7 @@ if test "x${PBX_RESAMPLE}" != "x1" -a "${USE_RESAMPLE}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_resample_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lresample" >&5
$as_echo_n "checking for ${pbxfuncname} in -lresample... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -23943,8 +23881,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_RESAMPLE_FOUND=yes
else
AST_RESAMPLE_FOUND=no
@@ -24076,7 +24013,7 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
$as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -24111,8 +24048,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SPANDSP_FOUND=yes
else
AST_SPANDSP_FOUND=no
@@ -24186,7 +24122,7 @@ if test "x${PBX_SPANDSP}" != "x1" -a "${USE_SPANDSP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_spandsp_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspandsp" >&5
$as_echo_n "checking for ${pbxfuncname} in -lspandsp... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -24221,8 +24157,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SPANDSP_FOUND=yes
else
AST_SPANDSP_FOUND=no
@@ -24293,7 +24228,7 @@ if test "x${PBX_SS7}" != "x1" -a "${USE_SS7}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ss7_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lss7" >&5
$as_echo_n "checking for ${pbxfuncname} in -lss7... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -24328,8 +24263,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SS7_FOUND=yes
else
AST_SS7_FOUND=no
@@ -24399,7 +24333,7 @@ if test "x${PBX_OPENR2}" != "x1" -a "${USE_OPENR2}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_openr2_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lopenr2" >&5
$as_echo_n "checking for ${pbxfuncname} in -lopenr2... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -24434,8 +24368,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OPENR2_FOUND=yes
else
AST_OPENR2_FOUND=no
@@ -24503,8 +24436,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test "${PWLIBDIR:-unset}" != "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/version.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
HAS_PWLIB=1
fi
@@ -24514,8 +24446,7 @@ if test "${HAS_PWLIB:-unset}" = "unset" ; then
if test "${OPENH323DIR:-unset}" != "unset"; then
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/../pwlib/version.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
HAS_PWLIB=1
fi
@@ -24526,8 +24457,7 @@ fi
else
as_ac_Header=`$as_echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${HOME}/pwlib/include/ptlib.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
HAS_PWLIB=1
fi
@@ -24939,8 +24869,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
if test "${OPENH323DIR:-unset}" != "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${OPENH323DIR}/version.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
HAS_OPENH323=1
fi
@@ -24949,8 +24878,7 @@ fi
if test "${HAS_OPENH323:-unset}" = "unset" ; then
as_ac_Header=`$as_echo "ac_cv_header_${PWLIBDIR}/../openh323/version.h" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "${PWLIBDIR}/../openh323/version.h" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1
fi
@@ -24962,8 +24890,7 @@ fi
as_ac_Header=`$as_echo "ac_cv_header_${OPENH323DIR}/include/h323.h" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "${OPENH323DIR}/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
else
OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}"
@@ -24977,8 +24904,7 @@ fi
as_ac_Header=`$as_echo "ac_cv_header_${HOME}/openh323/include/h323.h" | $as_tr_sh`
ac_fn_cxx_check_header_compile "$LINENO" "${HOME}/openh323/include/h323.h" "$as_ac_Header" "#include <ptlib.h>
"
-eval as_val=\$$as_ac_Header
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
HAS_OPENH323=1
fi
@@ -25252,7 +25178,7 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_lua5.1_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua5.1" >&5
$as_echo_n "checking for ${pbxfuncname} in -llua5.1... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25287,8 +25213,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_LUA_FOUND=yes
else
AST_LUA_FOUND=no
@@ -25366,7 +25291,7 @@ if test "x${PBX_LUA}" != "x1" -a "${USE_LUA}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_lua_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -llua" >&5
$as_echo_n "checking for ${pbxfuncname} in -llua... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25401,8 +25326,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_LUA_FOUND=yes
else
AST_LUA_FOUND=no
@@ -25472,7 +25396,7 @@ if test "x${PBX_RADIUS}" != "x1" -a "${USE_RADIUS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_radiusclient-ng_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lradiusclient-ng" >&5
$as_echo_n "checking for ${pbxfuncname} in -lradiusclient-ng... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25507,8 +25431,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_RADIUS_FOUND=yes
else
AST_RADIUS_FOUND=no
@@ -25587,7 +25510,7 @@ if test "x${PBX_OPENAIS}" != "x1" -a "${USE_OPENAIS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_SaClm_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lSaClm" >&5
$as_echo_n "checking for ${pbxfuncname} in -lSaClm... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25622,8 +25545,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OPENAIS_FOUND=yes
else
AST_OPENAIS_FOUND=no
@@ -25708,7 +25630,7 @@ if test "x${PBX_SPEEX}" != "x1" -a "${USE_SPEEX}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5
$as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25743,8 +25665,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SPEEX_FOUND=yes
else
AST_SPEEX_FOUND=no
@@ -25815,7 +25736,7 @@ if test "x${PBX_SPEEX_PREPROCESS}" != "x1" -a "${USE_SPEEX_PREPROCESS}" != "no";
as_ac_Lib=`$as_echo "ac_cv_lib_speex_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeex" >&5
$as_echo_n "checking for ${pbxfuncname} in -lspeex... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25850,8 +25771,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SPEEX_PREPROCESS_FOUND=yes
else
AST_SPEEX_PREPROCESS_FOUND=no
@@ -25924,7 +25844,7 @@ if test "x${PBX_SPEEXDSP}" != "x1" -a "${USE_SPEEXDSP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_speexdsp_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lspeexdsp" >&5
$as_echo_n "checking for ${pbxfuncname} in -lspeexdsp... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -25959,8 +25879,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SPEEXDSP_FOUND=yes
else
AST_SPEEXDSP_FOUND=no
@@ -26035,7 +25954,7 @@ if test "x${PBX_SQLITE}" != "x1" -a "${USE_SQLITE}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_sqlite_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite" >&5
$as_echo_n "checking for ${pbxfuncname} in -lsqlite... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26070,8 +25989,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SQLITE_FOUND=yes
else
AST_SQLITE_FOUND=no
@@ -26141,7 +26059,7 @@ if test "x${PBX_SQLITE3}" != "x1" -a "${USE_SQLITE3}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_sqlite3_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsqlite3" >&5
$as_echo_n "checking for ${pbxfuncname} in -lsqlite3... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26176,8 +26094,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SQLITE3_FOUND=yes
else
AST_SQLITE3_FOUND=no
@@ -26227,6 +26144,14 @@ fi
+if test "${PBX_SQLITE3}" != 1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database." >&5
+$as_echo "$as_me: WARNING: *** Asterisk now uses SQLite3 for the internal Asterisk database." >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Please install the SQLite3 development package." >&5
+$as_echo "$as_me: WARNING: *** Please install the SQLite3 development package." >&2;}
+ exit 1
+fi
+
if test "x${PBX_CRYPTO}" != "x1" -a "${USE_CRYPTO}" != "no"; then
pbxlibdir=""
@@ -26247,7 +26172,7 @@ if test "x${PBX_CRYPTO}" != "x1" -a "${USE_CRYPTO}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_crypto_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lcrypto" >&5
$as_echo_n "checking for ${pbxfuncname} in -lcrypto... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26282,8 +26207,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_CRYPTO_FOUND=yes
else
AST_CRYPTO_FOUND=no
@@ -26355,7 +26279,7 @@ if test "x${PBX_OPENSSL}" != "x1" -a "${USE_OPENSSL}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_ssl_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lssl" >&5
$as_echo_n "checking for ${pbxfuncname} in -lssl... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26390,8 +26314,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_OPENSSL_FOUND=yes
else
AST_OPENSSL_FOUND=no
@@ -26526,8 +26449,8 @@ $as_echo_n "checking if OSP Toolkit version is compatible with app_osplookup...
if test "$cross_compiling" = yes; then :
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run test program while cross compiling
-See \`config.log' for more details." "$LINENO" 5; }
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5 ; }
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
@@ -26593,7 +26516,7 @@ if test "x${PBX_SRTP}" != "x1" -a "${USE_SRTP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_srtp_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsrtp" >&5
$as_echo_n "checking for ${pbxfuncname} in -lsrtp... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26628,8 +26551,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SRTP_FOUND=yes
else
AST_SRTP_FOUND=no
@@ -26924,7 +26846,7 @@ if test "x${PBX_HOARD}" != "x1" -a "${USE_HOARD}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_hoard_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lhoard" >&5
$as_echo_n "checking for ${pbxfuncname} in -lhoard... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -26959,8 +26881,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_HOARD_FOUND=yes
else
AST_HOARD_FOUND=no
@@ -27030,7 +26951,7 @@ if test "x${PBX_FREETDS}" != "x1" -a "${USE_FREETDS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_sybdb_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lsybdb" >&5
$as_echo_n "checking for ${pbxfuncname} in -lsybdb... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27065,8 +26986,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_FREETDS_FOUND=yes
else
AST_FREETDS_FOUND=no
@@ -27136,7 +27056,7 @@ if test "x${PBX_TERMCAP}" != "x1" -a "${USE_TERMCAP}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_termcap_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltermcap" >&5
$as_echo_n "checking for ${pbxfuncname} in -ltermcap... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27171,8 +27091,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_TERMCAP_FOUND=yes
else
AST_TERMCAP_FOUND=no
@@ -27242,7 +27161,7 @@ if test "x${PBX_TINFO}" != "x1" -a "${USE_TINFO}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_tinfo_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltinfo" >&5
$as_echo_n "checking for ${pbxfuncname} in -ltinfo... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27277,8 +27196,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_TINFO_FOUND=yes
else
AST_TINFO_FOUND=no
@@ -27395,7 +27313,7 @@ if test "x${PBX_TONEZONE}" != "x1" -a "${USE_TONEZONE}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_tonezone_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -ltonezone" >&5
$as_echo_n "checking for ${pbxfuncname} in -ltonezone... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27430,8 +27348,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_TONEZONE_FOUND=yes
else
AST_TONEZONE_FOUND=no
@@ -27501,7 +27418,7 @@ if test "x${PBX_USB}" != "x1" -a "${USE_USB}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_usb_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lusb" >&5
$as_echo_n "checking for ${pbxfuncname} in -lusb... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27536,8 +27453,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_USB_FOUND=yes
else
AST_USB_FOUND=no
@@ -27609,7 +27525,7 @@ if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5
$as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27644,8 +27560,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_VORBIS_FOUND=yes
else
AST_VORBIS_FOUND=no
@@ -27715,7 +27630,7 @@ if test "x${PBX_VORBIS}" != "x1" -a "${USE_VORBIS}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_vorbis_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lvorbis" >&5
$as_echo_n "checking for ${pbxfuncname} in -lvorbis... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27750,8 +27665,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_VORBIS_FOUND=yes
else
AST_VORBIS_FOUND=no
@@ -27894,7 +27808,7 @@ if test "x${PBX_ZLIB}" != "x1" -a "${USE_ZLIB}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_z_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lz" >&5
$as_echo_n "checking for ${pbxfuncname} in -lz... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -27929,8 +27843,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_ZLIB_FOUND=yes
else
AST_ZLIB_FOUND=no
@@ -27990,7 +27903,7 @@ elif test "x$CURSES_LIB" != "x" ; then
elif test "x$NCURSES_LIB" != "x" ; then
EDITLINE_LIB="$NCURSES_LIB"
else
- as_fn_error "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5
+ as_fn_error $? "*** termcap support not found (on modern systems, this typically means the ncurses development package is missing)" "$LINENO" 5
fi
@@ -28326,7 +28239,7 @@ if test "x${PBX_SDL_IMAGE}" != "x1" -a "${USE_SDL_IMAGE}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_SDL_image_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lSDL_image" >&5
$as_echo_n "checking for ${pbxfuncname} in -lSDL_image... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -28361,8 +28274,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_SDL_IMAGE_FOUND=yes
else
AST_SDL_IMAGE_FOUND=no
@@ -28431,7 +28343,7 @@ if test "x${PBX_FFMPEG}" != "x1" -a "${USE_FFMPEG}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_avcodec_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lavcodec" >&5
$as_echo_n "checking for ${pbxfuncname} in -lavcodec... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -28466,8 +28378,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_FFMPEG_FOUND=yes
else
AST_FFMPEG_FOUND=no
@@ -28550,7 +28461,7 @@ if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5
$as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -28585,8 +28496,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_X11_FOUND=yes
else
AST_X11_FOUND=no
@@ -28659,7 +28569,7 @@ if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
as_ac_Lib=`$as_echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${pbxfuncname} in -lX11" >&5
$as_echo_n "checking for ${pbxfuncname} in -lX11... " >&6; }
-if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${$as_ac_Lib+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -28694,8 +28604,7 @@ fi
eval ac_res=\$$as_ac_Lib
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
-eval as_val=\$$as_ac_Lib
- if test "x$as_val" = x""yes; then :
+if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then :
AST_X11_FOUND=yes
else
AST_X11_FOUND=no
@@ -28758,7 +28667,7 @@ if test "${ac_cv_file__sbin_launchd+set}" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
- as_fn_error "cannot check for file existence when cross compiling" "$LINENO" 5
+ as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
if test -r "/sbin/launchd"; then
ac_cv_file__sbin_launchd=yes
else
@@ -29452,6 +29361,7 @@ DEFS=-DHAVE_CONFIG_H
ac_libobjs=
ac_ltlibobjs=
+U=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -29613,19 +29523,19 @@ export LANGUAGE
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
as_fn_error ()
{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
fi
- $as_echo "$as_me: error: $1" >&2
+ $as_echo "$as_me: error: $2" >&2
as_fn_exit $as_status
} # as_fn_error
@@ -29821,7 +29731,7 @@ $as_echo X"$as_dir" |
test -d "$as_dir" && break
done
test -z "$as_dirs" || eval "mkdir $as_dirs"
- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
} # as_fn_mkdir_p
@@ -29875,7 +29785,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by asterisk $as_me trunk, which was
-generated by GNU Autoconf 2.65. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -29937,10 +29847,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
asterisk config.status trunk
-configured by $0, generated by GNU Autoconf 2.65,
+configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -29957,11 +29867,16 @@ ac_need_defaults=:
while test $# != 0
do
case $1 in
- --*=*)
+ --*=?*)
ac_option=`expr "X$1" : 'X\([^=]*\)='`
ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
ac_shift=:
;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
*)
ac_option=$1
ac_optarg=$2
@@ -29983,6 +29898,7 @@ do
$ac_shift
case $ac_optarg in
*\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
esac
as_fn_append CONFIG_FILES " '$ac_optarg'"
ac_need_defaults=false;;
@@ -29995,7 +29911,7 @@ do
ac_need_defaults=false;;
--he | --h)
# Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
+ as_fn_error $? "ambiguous option: \`$1'
Try \`$0 --help' for more information.";;
--help | --hel | -h )
$as_echo "$ac_cs_usage"; exit ;;
@@ -30004,7 +29920,7 @@ Try \`$0 --help' for more information.";;
ac_cs_silent=: ;;
# This is an error.
- -*) as_fn_error "unrecognized option: \`$1'
+ -*) as_fn_error $? "unrecognized option: \`$1'
Try \`$0 --help' for more information." ;;
*) as_fn_append ac_config_targets " $1"
@@ -30058,7 +29974,7 @@ do
"makeopts") CONFIG_FILES="$CONFIG_FILES makeopts" ;;
"channels/h323/Makefile") CONFIG_FILES="$CONFIG_FILES channels/h323/Makefile" ;;
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -30095,7 +30011,7 @@ $debug ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -30112,7 +30028,7 @@ if test "x$ac_cr" = x; then
fi
ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
- ac_cs_awk_cr='\r'
+ ac_cs_awk_cr='\\r'
else
ac_cs_awk_cr=$ac_cr
fi
@@ -30126,18 +30042,18 @@ _ACEOF
echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
echo "_ACEOF"
} >conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
. ./conf$$subs.sh ||
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
if test $ac_delim_n = $ac_delim_num; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -30226,20 +30142,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
else
cat
fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
- || as_fn_error "could not setup config files machinery" "$LINENO" 5
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
# trailing colons and then remove the whole line if VPATH becomes empty
# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[ ]*\):*/\1/
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
s/^[^=]*=[ ]*$//
}'
fi
@@ -30267,7 +30191,7 @@ for ac_last_try in false false :; do
if test -z "$ac_t"; then
break
elif $ac_last_try; then
- as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
else
ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
fi
@@ -30352,7 +30276,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
- as_fn_error "could not setup config headers machinery" "$LINENO" 5
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
fi # test -n "$CONFIG_HEADERS"
@@ -30365,7 +30289,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -30393,7 +30317,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -30420,7 +30344,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
case $ac_tag in
*:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -30551,22 +30475,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
$ac_datarootdir_hack
"
eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
{ ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
{ ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&5
+which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined. Please make sure it is defined." >&2;}
+which seems to be undefined. Please make sure it is defined" >&2;}
rm -f "$tmp/stdin"
case $ac_file in
-) cat "$tmp/out" && rm -f "$tmp/out";;
*) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
:H)
#
@@ -30577,19 +30501,19 @@ which seems to be undefined. Please make sure it is defined." >&2;}
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
} >"$tmp/config.h" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
mv "$tmp/config.h" "$ac_file" \
- || as_fn_error "could not create $ac_file" "$LINENO" 5
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
&& eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
+ || as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
@@ -30604,7 +30528,7 @@ _ACEOF
ac_clean_files=$ac_clean_files_save
test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
# configure is writing to config.log, and then calls config.status.
@@ -30625,7 +30549,7 @@ if test "$no_create" != yes; then
exec 5>>config.log
# Use ||, not &&, to avoid exiting from the if with $? = 1, which
# would make configure fail if this is the last instruction.
- $ac_cs_success || as_fn_exit $?
+ $ac_cs_success || as_fn_exit 1
fi
if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
diff --git a/configure.ac b/configure.ac
index 3270ac248..e877ce7bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1973,6 +1973,12 @@ AST_EXT_LIB_CHECK([SQLITE], [sqlite], [sqlite_exec], [sqlite.h])
AST_EXT_LIB_CHECK([SQLITE3], [sqlite3], [sqlite3_open], [sqlite3.h], [${PTHREAD_LIBS}], [${PTHREAD_CFLAGS}])
+if test "${PBX_SQLITE3}" != 1; then
+ AC_MSG_WARN(*** Asterisk now uses SQLite3 for the internal Asterisk database.)
+ AC_MSG_WARN(*** Please install the SQLite3 development package.)
+ exit 1
+fi
+
AST_EXT_LIB_CHECK([CRYPTO], [crypto], [AES_encrypt], [openssl/aes.h])
if test "$PBX_CRYPTO" = "1";
diff --git a/contrib/scripts/live_ast b/contrib/scripts/live_ast
index c1e7fade1..c5195c3d8 100755
--- a/contrib/scripts/live_ast
+++ b/contrib/scripts/live_ast
@@ -99,6 +99,10 @@
# is run.
#LIVE_AST_BRISTUFFED_LIBPRI=yes
#
+# LIVE_AST_VALGRIND_ARGS:
+# Parameters to pass to valgrind if using the 'valgrind' command.
+#LIVE_AST_VALGRIND_ARGS="-v --leak-check=full --suppressions=contrib/valgrind.supp --log-file=valgrind.log"
+#
# LIVE_AST_FOR_SYSTEM
# When generating asterisk.conf, use most components from the installed
# system. Also provide a sane var-run directory for those of us who want
@@ -235,6 +239,10 @@ run)
set_ld_env
$AST_BIN -C $AST_CONF "$@"
;;
+valgrind)
+ set_ld_env
+ valgrind $LIVE_AST_VALGRIND_ARGS $AST_BIN -C $AST_CONF "$@"
+ ;;
rsync)
remote_host="$1"
remote_dir="$2"
@@ -262,6 +270,7 @@ gdb)
echo "$0 samples make samples"
echo "$0 run [params] asterisk [params]"
echo "$0 gdb gdb asterisk"
+ echo "$0 valgrind valgrind asterisk"
echo "$0 rsync [user@]host dir copy files over to [user@]host:dir"
echo "$0 gen-live-asterisk regenerate the wrapper ./live/asterisk"
echo "$0 conf-file create live.conf if it does not exist"
diff --git a/formats/format_g719.c b/formats/format_g719.c
index b679122f8..aace0edc7 100644
--- a/formats/format_g719.c
+++ b/formats/format_g719.c
@@ -22,6 +22,10 @@
* \arg File name extensions: g719
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_g723.c b/formats/format_g723.c
index 6dab66a86..7eba74147 100644
--- a/formats/format_g723.c
+++ b/formats/format_g723.c
@@ -24,6 +24,10 @@
* \arg Extensions: g723, g723sf
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_g726.c b/formats/format_g726.c
index 73a57c8ee..636aff091 100644
--- a/formats/format_g726.c
+++ b/formats/format_g726.c
@@ -27,6 +27,10 @@
* \arg 16 kbps: g726-16
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_g729.c b/formats/format_g729.c
index 22b3c3282..042977728 100644
--- a/formats/format_g729.c
+++ b/formats/format_g729.c
@@ -25,6 +25,10 @@
* \arg Extensions: g729
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_gsm.c b/formats/format_gsm.c
index 26257c39f..03419c2f6 100644
--- a/formats/format_gsm.c
+++ b/formats/format_gsm.c
@@ -22,6 +22,10 @@
* \arg File name extension: gsm
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_h263.c b/formats/format_h263.c
index 76555a67c..77c1229c3 100644
--- a/formats/format_h263.c
+++ b/formats/format_h263.c
@@ -23,6 +23,10 @@
* \ingroup formats
* \arg See \ref AstVideo
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_h264.c b/formats/format_h264.c
index ea82454f3..155f46975 100644
--- a/formats/format_h264.c
+++ b/formats/format_h264.c
@@ -23,6 +23,10 @@
* \ingroup formats
* \arg See \ref AstVideo
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_ilbc.c b/formats/format_ilbc.c
index a60b585d7..7a08ca515 100644
--- a/formats/format_ilbc.c
+++ b/formats/format_ilbc.c
@@ -25,6 +25,10 @@
* \ingroup formats
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_jpeg.c b/formats/format_jpeg.c
index 99de8dac1..d6733020e 100644
--- a/formats/format_jpeg.c
+++ b/formats/format_jpeg.c
@@ -23,6 +23,10 @@
* \arg File name extension: jpeg, jpg
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_ogg_vorbis.c b/formats/format_ogg_vorbis.c
index 949a13f78..46056b894 100644
--- a/formats/format_ogg_vorbis.c
+++ b/formats/format_ogg_vorbis.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>vorbis</depend>
<depend>ogg</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/formats/format_pcm.c b/formats/format_pcm.c
index ec628c5b3..3bf27388c 100644
--- a/formats/format_pcm.c
+++ b/formats/format_pcm.c
@@ -23,6 +23,10 @@
*
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_siren14.c b/formats/format_siren14.c
index 53c9ea922..1ce50fad4 100644
--- a/formats/format_siren14.c
+++ b/formats/format_siren14.c
@@ -22,6 +22,10 @@
* \arg File name extensions: siren14
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_siren7.c b/formats/format_siren7.c
index 16eca5df5..2e5182d3c 100644
--- a/formats/format_siren7.c
+++ b/formats/format_siren7.c
@@ -22,6 +22,10 @@
* \arg File name extensions: siren7
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_sln.c b/formats/format_sln.c
index 0cb27949d..1a73cdfbb 100644
--- a/formats/format_sln.c
+++ b/formats/format_sln.c
@@ -17,10 +17,13 @@
/*! \file
*
- * \brief RAW SLINEAR Format
- * \arg File name extensions: sln, raw
+ * \brief RAW SLINEAR Formats
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
@@ -30,18 +33,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/module.h"
#include "asterisk/endian.h"
-#define BUF_SIZE 320 /* 320 bytes, 160 samples */
-#define SLIN_SAMPLES 160
-
-static struct ast_frame *slinear_read(struct ast_filestream *s, int *whennext)
+static struct ast_frame *generic_read(struct ast_filestream *s, int *whennext, unsigned int buf_size, enum ast_format_id id)
{
int res;
/* Send a frame from the file to the appropriate channel */
s->fr.frametype = AST_FRAME_VOICE;
- ast_format_set(&s->fr.subclass.format, AST_FORMAT_SLINEAR, 0);
+ ast_format_set(&s->fr.subclass.format, id, 0);
s->fr.mallocd = 0;
- AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
+ AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, buf_size);
if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
if (res)
ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
@@ -52,14 +52,14 @@ static struct ast_frame *slinear_read(struct ast_filestream *s, int *whennext)
return &s->fr;
}
-static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
+static int generic_write(struct ast_filestream *fs, struct ast_frame *f, enum ast_format_id id)
{
int res;
if (f->frametype != AST_FRAME_VOICE) {
ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
return -1;
}
- if (f->subclass.format.id != AST_FORMAT_SLINEAR) {
+ if (f->subclass.format.id != id) {
ast_log(LOG_WARNING, "Asked to write non-slinear frame (%s)!\n", ast_getformatname(&f->subclass.format));
return -1;
}
@@ -103,6 +103,8 @@ static off_t slinear_tell(struct ast_filestream *fs)
return ftello(fs->f) / 2;
}
+static int slinear_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR);}
+static struct ast_frame *slinear_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 320, AST_FORMAT_SLINEAR);}
static struct ast_format_def slin_f = {
.name = "sln",
.exts = "sln|raw",
@@ -111,23 +113,161 @@ static struct ast_format_def slin_f = {
.trunc = slinear_trunc,
.tell = slinear_tell,
.read = slinear_read,
- .buf_size = BUF_SIZE + AST_FRIENDLY_OFFSET,
+ .buf_size = 320 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear12_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR12);}
+static struct ast_frame *slinear12_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 480, AST_FORMAT_SLINEAR12);}
+static struct ast_format_def slin12_f = {
+ .name = "sln12",
+ .exts = "sln12",
+ .write = slinear12_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear12_read,
+ .buf_size = 480 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear16_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR16);}
+static struct ast_frame *slinear16_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 640, AST_FORMAT_SLINEAR16);}
+static struct ast_format_def slin16_f = {
+ .name = "sln16",
+ .exts = "sln16",
+ .write = slinear16_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear16_read,
+ .buf_size = 640 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear24_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR24);}
+static struct ast_frame *slinear24_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 960, AST_FORMAT_SLINEAR24);}
+static struct ast_format_def slin24_f = {
+ .name = "sln24",
+ .exts = "sln24",
+ .write = slinear24_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear24_read,
+ .buf_size = 960 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear32_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR32);}
+static struct ast_frame *slinear32_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 1280, AST_FORMAT_SLINEAR32);}
+static struct ast_format_def slin32_f = {
+ .name = "sln32",
+ .exts = "sln32",
+ .write = slinear32_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear32_read,
+ .buf_size = 1280 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear44_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR44);}
+static struct ast_frame *slinear44_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 1764, AST_FORMAT_SLINEAR44);}
+static struct ast_format_def slin44_f = {
+ .name = "sln44",
+ .exts = "sln44",
+ .write = slinear44_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear44_read,
+ .buf_size = 1764 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear48_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR48);}
+static struct ast_frame *slinear48_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 1920, AST_FORMAT_SLINEAR48);}
+static struct ast_format_def slin48_f = {
+ .name = "sln48",
+ .exts = "sln48",
+ .write = slinear48_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear48_read,
+ .buf_size = 1920 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear96_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR96);}
+static struct ast_frame *slinear96_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 3840, AST_FORMAT_SLINEAR96);}
+static struct ast_format_def slin96_f = {
+ .name = "sln96",
+ .exts = "sln96",
+ .write = slinear96_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear96_read,
+ .buf_size = 3840 + AST_FRIENDLY_OFFSET,
+};
+
+static int slinear192_write(struct ast_filestream *fs, struct ast_frame *f){return generic_write(fs, f, AST_FORMAT_SLINEAR192);}
+static struct ast_frame *slinear192_read(struct ast_filestream *s, int *whennext){return generic_read(s, whennext, 7680, AST_FORMAT_SLINEAR192);}
+static struct ast_format_def slin192_f = {
+ .name = "sln192",
+ .exts = "sln192",
+ .write = slinear192_write,
+ .seek = slinear_seek,
+ .trunc = slinear_trunc,
+ .tell = slinear_tell,
+ .read = slinear192_read,
+ .buf_size = 7680 + AST_FRIENDLY_OFFSET,
+};
+
+static struct ast_format_def *slin_list[] = {
+ &slin_f,
+ &slin12_f,
+ &slin16_f,
+ &slin24_f,
+ &slin32_f,
+ &slin44_f,
+ &slin48_f,
+ &slin96_f,
+ &slin192_f,
};
static int load_module(void)
{
+ int i;
ast_format_set(&slin_f.format, AST_FORMAT_SLINEAR, 0);
- if (ast_format_def_register(&slin_f))
- return AST_MODULE_LOAD_FAILURE;
+ ast_format_set(&slin12_f.format, AST_FORMAT_SLINEAR12, 0);
+ ast_format_set(&slin16_f.format, AST_FORMAT_SLINEAR16, 0);
+ ast_format_set(&slin24_f.format, AST_FORMAT_SLINEAR24, 0);
+ ast_format_set(&slin32_f.format, AST_FORMAT_SLINEAR32, 0);
+ ast_format_set(&slin44_f.format, AST_FORMAT_SLINEAR44, 0);
+ ast_format_set(&slin48_f.format, AST_FORMAT_SLINEAR48, 0);
+ ast_format_set(&slin96_f.format, AST_FORMAT_SLINEAR96, 0);
+ ast_format_set(&slin192_f.format, AST_FORMAT_SLINEAR192, 0);
+
+ for (i = 0; i < ARRAY_LEN(slin_list); i++) {
+ if (ast_format_def_register(slin_list[i])) {
+ return AST_MODULE_LOAD_FAILURE;
+ }
+ }
+
return AST_MODULE_LOAD_SUCCESS;
}
static int unload_module(void)
{
- return ast_format_def_unregister(slin_f.name);
+ int res = 0;
+ int i = 0;
+
+ for (i = 0; i < ARRAY_LEN(slin_list); i++) {
+ if (ast_format_def_unregister(slin_list[i]->name)) {
+ res |= AST_MODULE_LOAD_FAILURE;
+ }
+ }
+ return res;
}
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw Signed Linear Audio support (SLN)",
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw Signed Linear Audio support (SLN) 8khz-192khz",
.load = load_module,
.unload = unload_module,
.load_pri = AST_MODPRI_APP_DEPEND
diff --git a/formats/format_sln16.c b/formats/format_sln16.c
deleted file mode 100644
index cac019615..000000000
--- a/formats/format_sln16.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Asterisk -- An open source telephony toolkit.
- *
- * Copyright (C) 1999 - 2008, Anthony Minessale and Digium, Inc.
- * Anthony Minessale (anthmct@yahoo.com)
- * Kevin P. Fleming <kpfleming@digium.com>
- *
- * See http://www.asterisk.org for more information about
- * the Asterisk project. Please do not directly contact
- * any of the maintainers of this project for assistance;
- * the project provides a web site, mailing lists and IRC
- * channels for your use.
- *
- * This program is free software, distributed under the terms of
- * the GNU General Public License Version 2. See the LICENSE file
- * at the top of the source tree.
- */
-
-/*! \file
- *
- * \brief RAW SLINEAR 16 Format
- * \arg File name extensions: sln16
- * \ingroup formats
- */
-
-#include "asterisk.h"
-
-ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
-
-#include "asterisk/mod_format.h"
-#include "asterisk/module.h"
-#include "asterisk/endian.h"
-
-#define BUF_SIZE 640 /* 640 bytes, 320 samples */
-#define SLIN_SAMPLES 320
-
-static struct ast_frame *slinear_read(struct ast_filestream *s, int *whennext)
-{
- int res;
- /* Send a frame from the file to the appropriate channel */
-
- s->fr.frametype = AST_FRAME_VOICE;
- ast_format_set(&s->fr.subclass.format, AST_FORMAT_SLINEAR16, 0);
- s->fr.mallocd = 0;
- AST_FRAME_SET_BUFFER(&s->fr, s->buf, AST_FRIENDLY_OFFSET, BUF_SIZE);
- if ((res = fread(s->fr.data.ptr, 1, s->fr.datalen, s->f)) < 1) {
- if (res)
- ast_log(LOG_WARNING, "Short read (%d) (%s)!\n", res, strerror(errno));
- return NULL;
- }
- *whennext = s->fr.samples = res/2;
- s->fr.datalen = res;
- return &s->fr;
-}
-
-static int slinear_write(struct ast_filestream *fs, struct ast_frame *f)
-{
- int res;
-
- if (f->frametype != AST_FRAME_VOICE) {
- ast_log(LOG_WARNING, "Asked to write non-voice frame!\n");
- return -1;
- }
- if (f->subclass.format.id != AST_FORMAT_SLINEAR16) {
- ast_log(LOG_WARNING, "Asked to write non-slinear16 frame (%s)!\n", ast_getformatname(&f->subclass.format));
- return -1;
- }
- if ((res = fwrite(f->data.ptr, 1, f->datalen, fs->f)) != f->datalen) {
- ast_log(LOG_WARNING, "Bad write (%d/%d): %s\n", res, f->datalen, strerror(errno));
- return -1;
- }
- return 0;
-}
-
-static int slinear_seek(struct ast_filestream *fs, off_t sample_offset, int whence)
-{
- off_t offset = 0, min = 0, cur, max;
-
- sample_offset <<= 1;
-
- cur = ftello(fs->f);
-
- fseeko(fs->f, 0, SEEK_END);
-
- max = ftello(fs->f);
-
- if (whence == SEEK_SET)
- offset = sample_offset;
- else if (whence == SEEK_CUR || whence == SEEK_FORCECUR)
- offset = sample_offset + cur;
- else if (whence == SEEK_END)
- offset = max - sample_offset;
-
- if (whence != SEEK_FORCECUR)
- offset = (offset > max) ? max : offset;
-
- /* always protect against seeking past begining. */
- offset = (offset < min) ? min : offset;
-
- return fseeko(fs->f, offset, SEEK_SET);
-}
-
-static int slinear_trunc(struct ast_filestream *fs)
-{
- return ftruncate(fileno(fs->f), ftello(fs->f));
-}
-
-static off_t slinear_tell(struct ast_filestream *fs)
-{
- return ftello(fs->f) / 2;
-}
-
-static struct ast_format_def slin_f = {
- .name = "sln16",
- .exts = "sln16",
- .write = slinear_write,
- .seek = slinear_seek,
- .trunc = slinear_trunc,
- .tell = slinear_tell,
- .read = slinear_read,
- .buf_size = BUF_SIZE + AST_FRIENDLY_OFFSET,
-};
-
-static int load_module(void)
-{
- ast_format_set(&slin_f.format, AST_FORMAT_SLINEAR16, 0);
- if (ast_format_def_register(&slin_f))
- return AST_MODULE_LOAD_FAILURE;
-
- return AST_MODULE_LOAD_SUCCESS;
-}
-
-static int unload_module(void)
-{
- return ast_format_def_unregister(slin_f.name);
-}
-
-AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "Raw Signed Linear 16KHz Audio support (SLN16)",
- .load = load_module,
- .unload = unload_module,
- .load_pri = AST_MODPRI_APP_DEPEND
-);
diff --git a/formats/format_vox.c b/formats/format_vox.c
index 05ecdeeaf..7d34df99c 100644
--- a/formats/format_vox.c
+++ b/formats/format_vox.c
@@ -23,6 +23,10 @@
*
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
#include "asterisk.h"
diff --git a/formats/format_wav.c b/formats/format_wav.c
index f35fd5278..f311522e5 100644
--- a/formats/format_wav.c
+++ b/formats/format_wav.c
@@ -24,6 +24,10 @@
* \ingroup formats
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/formats/format_wav_gsm.c b/formats/format_wav_gsm.c
index ae1f11ed8..35d4339f9 100644
--- a/formats/format_wav_gsm.c
+++ b/formats/format_wav_gsm.c
@@ -26,6 +26,10 @@
* e-mail attachments mainly.
* \ingroup formats
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/funcs/func_aes.c b/funcs/func_aes.c
index 891106b6f..c176f4863 100644
--- a/funcs/func_aes.c
+++ b/funcs/func_aes.c
@@ -24,6 +24,7 @@
/*** MODULEINFO
<use type="external">crypto</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/funcs/func_audiohookinherit.c b/funcs/func_audiohookinherit.c
index 528aed51f..59faa9019 100644
--- a/funcs/func_audiohookinherit.c
+++ b/funcs/func_audiohookinherit.c
@@ -28,6 +28,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
#include "asterisk/datastore.h"
#include "asterisk/channel.h"
diff --git a/funcs/func_base64.c b/funcs/func_base64.c
index 274e291ce..1a7619d91 100644
--- a/funcs/func_base64.c
+++ b/funcs/func_base64.c
@@ -22,6 +22,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_blacklist.c b/funcs/func_blacklist.c
index b940b5891..be3bbc5fb 100644
--- a/funcs/func_blacklist.c
+++ b/funcs/func_blacklist.c
@@ -26,6 +26,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_callcompletion.c b/funcs/func_callcompletion.c
index b3fab310f..cee06faa4 100644
--- a/funcs/func_callcompletion.c
+++ b/funcs/func_callcompletion.c
@@ -21,6 +21,10 @@
* \author Mark Michelson <mmichelson@digium.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_callerid.c b/funcs/func_callerid.c
index a653d8660..bb631fe4e 100644
--- a/funcs/func_callerid.c
+++ b/funcs/func_callerid.c
@@ -24,6 +24,10 @@
* \arg \ref AstCREDITS
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_cdr.c b/funcs/func_cdr.c
index 3d0c846f9..34fdd6736 100644
--- a/funcs/func_cdr.c
+++ b/funcs/func_cdr.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_channel.c b/funcs/func_channel.c
index 202036e84..7baf2485e 100644
--- a/funcs/func_channel.c
+++ b/funcs/func_channel.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_config.c b/funcs/func_config.c
index 21d291c2e..cbc51aaae 100644
--- a/funcs/func_config.c
+++ b/funcs/func_config.c
@@ -27,6 +27,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_curl.c b/funcs/func_curl.c
index 24f6fd923..7e97eb56e 100644
--- a/funcs/func_curl.c
+++ b/funcs/func_curl.c
@@ -32,6 +32,7 @@
/*** MODULEINFO
<depend>curl</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/funcs/func_cut.c b/funcs/func_cut.c
index 10bca0a9f..762dd61fe 100644
--- a/funcs/func_cut.c
+++ b/funcs/func_cut.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_db.c b/funcs/func_db.c
index a932cf5b1..20c8829a6 100644
--- a/funcs/func_db.c
+++ b/funcs/func_db.c
@@ -27,6 +27,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_devstate.c b/funcs/func_devstate.c
index 396657768..274f1ac03 100644
--- a/funcs/func_devstate.c
+++ b/funcs/func_devstate.c
@@ -30,6 +30,10 @@
* when I couldn't sleep. :)
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_dialgroup.c b/funcs/func_dialgroup.c
index b1fa78017..4a789d627 100644
--- a/funcs/func_dialgroup.c
+++ b/funcs/func_dialgroup.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_dialplan.c b/funcs/func_dialplan.c
index 4e1ab3bed..c39b3e376 100644
--- a/funcs/func_dialplan.c
+++ b/funcs/func_dialplan.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_enum.c b/funcs/func_enum.c
index d8c8b252d..cc4d47a78 100644
--- a/funcs/func_enum.c
+++ b/funcs/func_enum.c
@@ -33,6 +33,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_env.c b/funcs/func_env.c
index aa0abb4b3..c7b431dca 100644
--- a/funcs/func_env.c
+++ b/funcs/func_env.c
@@ -21,6 +21,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_extstate.c b/funcs/func_extstate.c
index d3c7ba4b7..940c455c2 100644
--- a/funcs/func_extstate.c
+++ b/funcs/func_extstate.c
@@ -26,6 +26,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_frame_trace.c b/funcs/func_frame_trace.c
index 03711ee7d..681f151fc 100644
--- a/funcs/func_frame_trace.c
+++ b/funcs/func_frame_trace.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_global.c b/funcs/func_global.c
index a501aee58..6b158aafb 100644
--- a/funcs/func_global.c
+++ b/funcs/func_global.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_groupcount.c b/funcs/func_groupcount.c
index 70c396436..609d01fef 100644
--- a/funcs/func_groupcount.c
+++ b/funcs/func_groupcount.c
@@ -21,6 +21,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_iconv.c b/funcs/func_iconv.c
index 231b4880f..4c4f65f1a 100644
--- a/funcs/func_iconv.c
+++ b/funcs/func_iconv.c
@@ -25,7 +25,8 @@
*/
/*** MODULEINFO
- <depend>iconv</depend>
+ <depend>iconv</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/funcs/func_lock.c b/funcs/func_lock.c
index 27d199e36..c3cf7a987 100644
--- a/funcs/func_lock.c
+++ b/funcs/func_lock.c
@@ -26,6 +26,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_logic.c b/funcs/func_logic.c
index 27734ed78..21f08a13f 100644
--- a/funcs/func_logic.c
+++ b/funcs/func_logic.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_math.c b/funcs/func_math.c
index f3a690c5d..e7217c7b3 100644
--- a/funcs/func_math.c
+++ b/funcs/func_math.c
@@ -28,6 +28,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_md5.c b/funcs/func_md5.c
index 7c61d9f8c..2e6018586 100644
--- a/funcs/func_md5.c
+++ b/funcs/func_md5.c
@@ -26,6 +26,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_module.c b/funcs/func_module.c
index 44ec08e4d..b0b346116 100644
--- a/funcs/func_module.c
+++ b/funcs/func_module.c
@@ -21,6 +21,11 @@
*
* \ingroup functions
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c
index fad548a92..e940021a3 100644
--- a/funcs/func_odbc.c
+++ b/funcs/func_odbc.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<depend>res_odbc</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -1130,7 +1131,7 @@ static char *cli_odbc_read(struct ast_cli_entry *e, int cmd, struct ast_cli_args
}
if (ast_strlen_zero(query->sql_read)) {
- ast_cli(a->fd, "The function %s has no writesql parameter.\n", a->argv[2]);
+ ast_cli(a->fd, "The function %s has no readsql parameter.\n", a->argv[2]);
AST_RWLIST_UNLOCK(&queries);
return CLI_SUCCESS;
}
diff --git a/funcs/func_pitchshift.c b/funcs/func_pitchshift.c
index b14894712..ca441f985 100644
--- a/funcs/func_pitchshift.c
+++ b/funcs/func_pitchshift.c
@@ -58,6 +58,10 @@
*
*****************************************************************************/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_rand.c b/funcs/func_rand.c
index 2d4e02fcf..6491b371d 100644
--- a/funcs/func_rand.c
+++ b/funcs/func_rand.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_sha1.c b/funcs/func_sha1.c
index 985e11a38..c6b757545 100644
--- a/funcs/func_sha1.c
+++ b/funcs/func_sha1.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_shell.c b/funcs/func_shell.c
index df7164d5f..1f274b83d 100644
--- a/funcs/func_shell.c
+++ b/funcs/func_shell.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_speex.c b/funcs/func_speex.c
index e17e8ca9c..2b29271f3 100644
--- a/funcs/func_speex.c
+++ b/funcs/func_speex.c
@@ -34,6 +34,7 @@
<depend>speex</depend>
<depend>speex_preprocess</depend>
<use type="external">speexdsp</use>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/funcs/func_sprintf.c b/funcs/func_sprintf.c
index 4e3fbb99c..4d5fc7a6c 100644
--- a/funcs/func_sprintf.c
+++ b/funcs/func_sprintf.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_srv.c b/funcs/func_srv.c
index de48f0d06..deb94835f 100644
--- a/funcs/func_srv.c
+++ b/funcs/func_srv.c
@@ -23,6 +23,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 0d2b95efc..055fd0c4e 100644
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_sysinfo.c b/funcs/func_sysinfo.c
index 2d9a8dd24..a7e358bb8 100644
--- a/funcs/func_sysinfo.c
+++ b/funcs/func_sysinfo.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 87233 $")
diff --git a/funcs/func_timeout.c b/funcs/func_timeout.c
index 79d908d18..53bbab753 100644
--- a/funcs/func_timeout.c
+++ b/funcs/func_timeout.c
@@ -24,6 +24,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_uri.c b/funcs/func_uri.c
index ecf23d8ff..f4ecf3d67 100644
--- a/funcs/func_uri.c
+++ b/funcs/func_uri.c
@@ -28,6 +28,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_version.c b/funcs/func_version.c
index 8ed6c218f..d8ba757a4 100644
--- a/funcs/func_version.c
+++ b/funcs/func_version.c
@@ -22,6 +22,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_vmcount.c b/funcs/func_vmcount.c
index f409e75ce..c4d80d499 100644
--- a/funcs/func_vmcount.c
+++ b/funcs/func_vmcount.c
@@ -25,6 +25,10 @@
* \ingroup functions
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/funcs/func_volume.c b/funcs/func_volume.c
index 938fbba38..806564bee 100644
--- a/funcs/func_volume.c
+++ b/funcs/func_volume.c
@@ -26,6 +26,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/include/asterisk/bridging.h b/include/asterisk/bridging.h
index 849f88741..54137b028 100644
--- a/include/asterisk/bridging.h
+++ b/include/asterisk/bridging.h
@@ -190,6 +190,9 @@ struct ast_bridge_video_talker_src_data {
/*! Only accept video coming from this channel */
struct ast_channel *chan_vsrc;
int average_talking_energy;
+
+ /*! Current talker see's this person */
+ struct ast_channel *chan_old_vsrc;
};
struct ast_bridge_video_mode {
@@ -528,7 +531,17 @@ void ast_bridge_set_talker_src_video_mode(struct ast_bridge *bridge);
void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct ast_channel *chan, int talker_energy, int is_keyfame);
/*!
+ * \brief Returns the number of video sources currently active in the bridge
+ */
+int ast_bridge_number_video_src(struct ast_bridge *bridge);
+
+/*!
* \brief Determine if a channel is a video src for the bridge
+ *
+ * \retval 0 Not a current video source of the bridge.
+ * \retval None 0, is a video source of the bridge, The number
+ * returned represents the priority this video stream has
+ * on the bridge where 1 is the highest priority.
*/
int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan);
diff --git a/include/asterisk/celt.h b/include/asterisk/celt.h
new file mode 100644
index 000000000..815525a7b
--- /dev/null
+++ b/include/asterisk/celt.h
@@ -0,0 +1,37 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * David Vossel <dvossel@digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief CELT Format Attributes
+ *
+ * \author David Vossel <dvossel@digium.com>
+ */
+#ifndef _AST_FORMAT_CELT_H_
+#define _AST_FORMAT_CELT_H_
+
+#define AST_CELT_DEFAULT_FRAME_SIZE 480
+
+/*! CELT format attribute key value pairs, all are accessible through ast_format_get_value()*/
+enum celt_attr_keys {
+ CELT_ATTR_KEY_SAMP_RATE, /*!< value is an unsigned integer representing sample rate */
+ CELT_ATTR_KEY_MAX_BITRATE, /*!< value is an int */
+ CELT_ATTR_KEY_FRAME_SIZE, /*!< value is an int */
+};
+
+#endif /* _AST_FORMAT_CELT_H */
diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h
index 333415200..78c9a74ac 100644
--- a/include/asterisk/dsp.h
+++ b/include/asterisk/dsp.h
@@ -45,7 +45,8 @@
#define DSP_FAXMODE_DETECT_CNG (1 << 0)
#define DSP_FAXMODE_DETECT_CED (1 << 1)
-#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED)
+#define DSP_FAXMODE_DETECT_V21 (1 << 2)
+#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED | DSP_FAXMODE_DETECT_V21)
#define DSP_TONE_STATE_SILENCE 0
#define DSP_TONE_STATE_RINGING 1
diff --git a/include/asterisk/extconf.h b/include/asterisk/extconf.h
index a5d36ad23..1a04b01bf 100644
--- a/include/asterisk/extconf.h
+++ b/include/asterisk/extconf.h
@@ -111,7 +111,7 @@ struct ast_exten {
char stuff[0];
};
/* from pbx.h */
-typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
+typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data);
struct ast_timing {
int hastime; /*!< If time construct exists */
unsigned int monthmask; /*!< Mask for month */
diff --git a/include/asterisk/format.h b/include/asterisk/format.h
index 67e4178a2..d0f1021d5 100644
--- a/include/asterisk/format.h
+++ b/include/asterisk/format.h
@@ -28,6 +28,7 @@
#include "asterisk/astobj2.h"
#include "asterisk/silk.h"
+#include "asterisk/celt.h"
#define AST_FORMAT_ATTR_SIZE 128
#define AST_FORMAT_INC 100000
@@ -99,6 +100,7 @@ enum ast_format_id {
/*! Raw 16-bit Signed Linear (192000 Hz) PCM. maybe we're taking this too far. */
AST_FORMAT_SLINEAR192 = 27 + AST_FORMAT_TYPE_AUDIO,
AST_FORMAT_SPEEX32 = 28 + AST_FORMAT_TYPE_AUDIO,
+ AST_FORMAT_CELT = 29 + AST_FORMAT_TYPE_AUDIO,
/*! H.261 Video */
AST_FORMAT_H261 = 1 + AST_FORMAT_TYPE_VIDEO,
diff --git a/include/asterisk/jingle.h b/include/asterisk/jingle.h
index bbe86c8f2..77820654c 100644
--- a/include/asterisk/jingle.h
+++ b/include/asterisk/jingle.h
@@ -44,6 +44,7 @@
#define JINGLE_DTMF_NS "urn:xmpp:tmp:jingle:dtmf"
#define GOOGLE_NS "http://www.google.com/session"
+#define GOOGLE_JINGLE_NS "urn:xmpp:jingle:1"
#define GOOGLE_AUDIO_NS "http://www.google.com/session/phone"
#define GOOGLE_VIDEO_NS "http://www.google.com/session/video"
#define GOOGLE_TRANSPORT_NS "http://www.google.com/transport/p2p"
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h
index 8e86470f5..4c9e27b28 100644
--- a/include/asterisk/linkedlists.h
+++ b/include/asterisk/linkedlists.h
@@ -838,7 +838,10 @@ struct { \
*/
#define AST_LIST_REMOVE(head, elm, field) ({ \
__typeof(elm) __res = NULL; \
- if ((head)->first == (elm)) { \
+ __typeof(elm) __tmp = elm; \
+ if (!__tmp) { \
+ __res = NULL; \
+ } else if ((head)->first == (elm)) { \
__res = (head)->first; \
(head)->first = (elm)->field.next; \
if ((head)->last == (elm)) \
@@ -854,7 +857,9 @@ struct { \
(head)->last = curelm; \
} \
} \
- (elm)->field.next = NULL; \
+ if (__res) { \
+ (__res)->field.next = NULL; \
+ } \
(__res); \
})
diff --git a/include/asterisk/netsock2.h b/include/asterisk/netsock2.h
index afb1ea90f..83af23a97 100644
--- a/include/asterisk/netsock2.h
+++ b/include/asterisk/netsock2.h
@@ -453,7 +453,7 @@ int ast_sockaddr_is_ipv4(const struct ast_sockaddr *addr);
int ast_sockaddr_is_ipv4_mapped(const struct ast_sockaddr *addr);
/*!
- * \since 1.10
+ * \since 10.0
*
* \brief
* Determine if an IPv4 address is a multicast address
diff --git a/include/asterisk/pbx.h b/include/asterisk/pbx.h
index 1489ee2d6..36bc0724c 100644
--- a/include/asterisk/pbx.h
+++ b/include/asterisk/pbx.h
@@ -76,7 +76,7 @@ struct ast_ignorepat;
struct ast_sw;
/*! \brief Typedef for devicestate and hint callbacks */
-typedef int (*ast_state_cb_type)(char *context, char* id, enum ast_extension_states state, void *data);
+typedef int (*ast_state_cb_type)(const char *context, const char *exten, enum ast_extension_states state, void *data);
/*! \brief Data structure associated with a custom dialplan function */
struct ast_custom_function {
diff --git a/include/asterisk/rtp_engine.h b/include/asterisk/rtp_engine.h
index e04303ca6..7e27f5a82 100644
--- a/include/asterisk/rtp_engine.h
+++ b/include/asterisk/rtp_engine.h
@@ -349,6 +349,8 @@ struct ast_rtp_engine {
void (*alt_remote_address_set)(struct ast_rtp_instance *instance, struct ast_sockaddr *sa);
/*! Callback for changing DTMF mode */
int (*dtmf_mode_set)(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode);
+ /*! Callback for getting DTMF mode */
+ enum ast_rtp_dtmf_mode (*dtmf_mode_get)(struct ast_rtp_instance *instance);
/*! Callback for retrieving statistics */
int (*get_stat)(struct ast_rtp_instance *instance, struct ast_rtp_instance_stats *stats, enum ast_rtp_instance_stat stat);
/*! Callback for setting QoS values */
@@ -1059,7 +1061,7 @@ struct ast_rtp_payload_type ast_rtp_codecs_payload_lookup(struct ast_rtp_codecs
* \retval pointer to format structure on success
* \retval NULL on failure
*
- * \since 1.10
+ * \since 10.0
*/
struct ast_format *ast_rtp_codecs_get_payload_format(struct ast_rtp_codecs *codecs, int payload);
diff --git a/main/Makefile b/main/Makefile
index ad4d39c03..9533163e3 100644
--- a/main/Makefile
+++ b/main/Makefile
@@ -33,8 +33,9 @@ endif
AST_LIBS += $(OPENSSL_LIB)
AST_LIBS += $(BKTR_LIB)
AST_LIBS += $(LIBXML2_LIB)
+AST_LIBS += $(SQLITE3_LIB)
-ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-gnueabi kfreebsd-gnu),)
+ifneq ($(findstring $(OSARCH), linux-gnu uclinux linux-uclibc linux-gnueabi kfreebsd-gnu linux-gnueabihf),)
ifneq ($(findstring LOADABLE_MODULES,$(MENUSELECT_CFLAGS)),)
AST_LIBS+=-ldl
endif
@@ -111,9 +112,6 @@ editline/libedit.a: CHECK_SUBDIR
cd editline && test -f config.h || CFLAGS="$(PTHREAD_CFLAGS) $(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS:-Werror=) $(ASTCFLAGS))" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" ./configure --build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --with-ncurses=$(NCURSES_DIR) --with-curses=$(CURSES_DIR) --with-termcap=$(TERMCAP_DIR) --with-tinfo=$(TINFO_DIR)
$(MAKE) -C editline libedit.a
-db1-ast/libdb1.a: CHECK_SUBDIR
- _ASTCFLAGS="$(_ASTCFLAGS) -Wno-strict-aliasing" ASTCFLAGS="$(ASTCFLAGS)" $(MAKE) -C db1-ast libdb1.a
-
ifneq ($(findstring REBUILD_PARSERS,$(MENUSELECT_CFLAGS)),)
ast_expr2.c ast_expr2.h: ast_expr2.y
else
@@ -143,6 +141,8 @@ testexpr2: ast_expr2f.c ast_expr2.c ast_expr2.h
$(CC) -g -o testexpr2 ast_expr2f.o ast_expr2.o -lm
rm ast_expr2.o ast_expr2f.o
+db.o: _ASTCFLAGS+=$(SQLITE3_INCLUDE)
+
ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
http.o: _ASTCFLAGS+=$(GMIME_INCLUDE)
endif
@@ -177,13 +177,13 @@ endif
$(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\"
-$(MAIN_TGT): $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS)
+$(MAIN_TGT): $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS)
@$(CC) -c -o buildinfo.o $(_ASTCFLAGS) buildinfo.c $(ASTCFLAGS)
- $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) -> $@"
+ $(ECHO_PREFIX) echo " [LD] $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) -> $@"
ifneq ($(findstring chan_h323,$(MENUSELECT_CHANNELS)),)
- $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS)
+ $(CMD_PREFIX) $(CC) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(GMIMELDFLAGS)
else
- $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a db1-ast/libdb1.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS)
+ $(CMD_PREFIX) $(CXX) $(STATIC_BUILD) -o $@ $(ASTLINK) $(AST_EMBED_LDFLAGS) $(_ASTLDFLAGS) $(ASTLDFLAGS) $(H323LDFLAGS) $(OBJS) editline/libedit.a $(AST_EMBED_LDSCRIPTS) buildinfo.o $(AST_LIBS) $(AST_EMBED_LIBS) $(H323LDLIBS) $(GMIMELDFLAGS)
endif
ifeq ($(GNU_LD),1)
@@ -194,9 +194,7 @@ endif
clean::
rm -f asterisk
- rm -f db1-ast/.*.d
rm -f asterisk.exports
@if [ -f editline/Makefile ]; then $(MAKE) -C editline distclean ; fi
- @$(MAKE) -C db1-ast clean
@$(MAKE) -C stdtime clean
rm -f libresample/src/*.o
diff --git a/main/asterisk.c b/main/asterisk.c
index a325fec85..e23bf9bcb 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -291,6 +291,7 @@ static int sig_alert_pipe[2] = { -1, -1 };
static struct {
unsigned int need_reload:1;
unsigned int need_quit:1;
+ unsigned int need_quit_handler:1;
} sig_flags;
#if !defined(LOW_MEMORY)
@@ -1657,21 +1658,24 @@ static void quit_handler(int num, int niceness, int safeshutdown, int restart)
ast_module_shutdown();
}
if (ast_opt_console || (ast_opt_remote && !ast_opt_exec)) {
- pthread_t thisthread = pthread_self();
if (getenv("HOME")) {
snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME"));
}
if (!ast_strlen_zero(filename)) {
ast_el_write_history(filename);
}
- if (consolethread == AST_PTHREADT_NULL || consolethread == thisthread || mon_sig_flags == thisthread) {
- /* Only end if we are the consolethread or signal handler, otherwise there's a race with that thread. */
+ if (consolethread == AST_PTHREADT_NULL || consolethread == pthread_self()) {
+ /* Only end if we are the consolethread, otherwise there's a race with that thread. */
if (el != NULL) {
el_end(el);
}
if (el_hist != NULL) {
history_end(el_hist);
}
+ } else if (mon_sig_flags == pthread_self()) {
+ if (consolethread != AST_PTHREADT_NULL) {
+ pthread_kill(consolethread, SIGURG);
+ }
}
}
if (option_verbose)
@@ -2150,7 +2154,7 @@ static int ast_el_read_char(EditLine *editline, char *cp)
}
res = ast_poll(fds, max, -1);
if (res < 0) {
- if (sig_flags.need_quit)
+ if (sig_flags.need_quit || sig_flags.need_quit_handler)
break;
if (errno == EINTR)
continue;
@@ -2707,7 +2711,7 @@ static void ast_remotecontrol(char *data)
sprintf(tmp, "%s%s", prefix, data);
if (write(ast_consock, tmp, strlen(tmp) + 1) < 0) {
ast_log(LOG_ERROR, "write() failed: %s\n", strerror(errno));
- if (sig_flags.need_quit == 1) {
+ if (sig_flags.need_quit || sig_flags.need_quit_handler) {
return;
}
}
@@ -2745,7 +2749,7 @@ static void ast_remotecontrol(char *data)
char buffer[512] = "", *curline = buffer, *nextline;
int not_written = 1;
- if (sig_flags.need_quit == 1) {
+ if (sig_flags.need_quit || sig_flags.need_quit_handler) {
break;
}
@@ -2793,7 +2797,7 @@ static void ast_remotecontrol(char *data)
for (;;) {
ebuf = (char *)el_gets(el, &num);
- if (sig_flags.need_quit == 1) {
+ if (sig_flags.need_quit || sig_flags.need_quit_handler) {
break;
}
@@ -3115,7 +3119,12 @@ static void *monitor_sig_flags(void *unused)
}
if (sig_flags.need_quit) {
sig_flags.need_quit = 0;
- quit_handler(0, 0, 1, 0);
+ if (consolethread != AST_PTHREADT_NULL) {
+ sig_flags.need_quit_handler = 1;
+ pthread_kill(consolethread, SIGURG);
+ } else {
+ quit_handler(0, 0, 1, 0);
+ }
}
if (read(sig_alert_pipe[0], &a, sizeof(a)) != sizeof(a)) {
}
@@ -3759,6 +3768,11 @@ int main(int argc, char *argv[])
ast_xmldoc_load_documentation();
#endif
+ if (astdb_init()) {
+ printf("%s", term_quit());
+ exit(1);
+ }
+
if (ast_msg_init()) {
printf("%s", term_quit());
exit(1);
@@ -3834,11 +3848,6 @@ int main(int argc, char *argv[])
exit(1);
}
- if (astdb_init()) {
- printf("%s", term_quit());
- exit(1);
- }
-
if (ast_enum_init()) {
printf("%s", term_quit());
exit(1);
@@ -3900,7 +3909,13 @@ int main(int argc, char *argv[])
snprintf(title, sizeof(title), "Asterisk Console on '%s' (pid %ld)", hostname, (long)ast_mainpid);
set_title(title);
+ el_set(el, EL_GETCFN, ast_el_read_char);
+
for (;;) {
+ if (sig_flags.need_quit || sig_flags.need_quit_handler) {
+ quit_handler(0, 0, 0, 0);
+ break;
+ }
buf = (char *) el_gets(el, &num);
if (!buf && write(1, "", 1) < 0)
diff --git a/main/bridging.c b/main/bridging.c
index 1563e4789..dea4f77a0 100644
--- a/main/bridging.c
+++ b/main/bridging.c
@@ -1489,6 +1489,9 @@ static void cleanup_video_mode(struct ast_bridge *bridge)
if (bridge->video_mode.mode_data.talker_src_data.chan_vsrc) {
ast_channel_unref(bridge->video_mode.mode_data.talker_src_data.chan_vsrc);
}
+ if (bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc) {
+ ast_channel_unref(bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc);
+ }
}
memset(&bridge->video_mode, 0, sizeof(bridge->video_mode));
}
@@ -1525,20 +1528,52 @@ void ast_bridge_update_talker_src_video_mode(struct ast_bridge *bridge, struct a
if (data->chan_vsrc == chan) {
data->average_talking_energy = talker_energy;
} else if ((data->average_talking_energy < talker_energy) && is_keyframe) {
+ if (data->chan_old_vsrc) {
+ ast_channel_unref(data->chan_old_vsrc);
+ }
if (data->chan_vsrc) {
- ast_channel_unref(data->chan_vsrc);
+ data->chan_old_vsrc = data->chan_vsrc;
+ ast_indicate(data->chan_old_vsrc, AST_CONTROL_VIDUPDATE);
}
data->chan_vsrc = ast_channel_ref(chan);
data->average_talking_energy = talker_energy;
- ast_indicate(chan, AST_CONTROL_VIDUPDATE);
+ ast_indicate(data->chan_vsrc, AST_CONTROL_VIDUPDATE);
} else if ((data->average_talking_energy < talker_energy) && !is_keyframe) {
ast_indicate(chan, AST_CONTROL_VIDUPDATE);
} else if (!data->chan_vsrc && is_keyframe) {
data->chan_vsrc = ast_channel_ref(chan);
data->average_talking_energy = talker_energy;
ast_indicate(chan, AST_CONTROL_VIDUPDATE);
+ } else if (!data->chan_old_vsrc && is_keyframe) {
+ data->chan_old_vsrc = ast_channel_ref(chan);
+ ast_indicate(chan, AST_CONTROL_VIDUPDATE);
+ }
+ ao2_unlock(bridge);
+}
+
+int ast_bridge_number_video_src(struct ast_bridge *bridge)
+{
+ int res = 0;
+
+ ao2_lock(bridge);
+ switch (bridge->video_mode.mode) {
+ case AST_BRIDGE_VIDEO_MODE_NONE:
+ break;
+ case AST_BRIDGE_VIDEO_MODE_SINGLE_SRC:
+ if (bridge->video_mode.mode_data.single_src_data.chan_vsrc) {
+ res = 1;
+ }
+ break;
+ case AST_BRIDGE_VIDEO_MODE_TALKER_SRC:
+ if (bridge->video_mode.mode_data.talker_src_data.chan_vsrc) {
+ res++;
+ }
+ if (bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc) {
+ res++;
+ }
}
ao2_unlock(bridge);
+ return res;
}
int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan)
@@ -1557,7 +1592,10 @@ int ast_bridge_is_video_src(struct ast_bridge *bridge, struct ast_channel *chan)
case AST_BRIDGE_VIDEO_MODE_TALKER_SRC:
if (bridge->video_mode.mode_data.talker_src_data.chan_vsrc == chan) {
res = 1;
+ } else if (bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc == chan) {
+ res = 2;
}
+
}
ao2_unlock(bridge);
return res;
@@ -1583,6 +1621,13 @@ void ast_bridge_remove_video_src(struct ast_bridge *bridge, struct ast_channel *
ast_channel_unref(bridge->video_mode.mode_data.talker_src_data.chan_vsrc);
}
bridge->video_mode.mode_data.talker_src_data.chan_vsrc = NULL;
+ bridge->video_mode.mode_data.talker_src_data.average_talking_energy = 0;
+ }
+ if (bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc == chan) {
+ if (bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc) {
+ ast_channel_unref(bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc);
+ }
+ bridge->video_mode.mode_data.talker_src_data.chan_old_vsrc = NULL;
}
}
ao2_unlock(bridge);
diff --git a/main/channel.c b/main/channel.c
index ed84da1e6..902c79d85 100644
--- a/main/channel.c
+++ b/main/channel.c
@@ -1081,6 +1081,8 @@ struct ast_format *ast_best_codec(struct ast_format_cap *cap, struct ast_format
AST_FORMAT_SPEEX,
/*! SILK is pretty awesome. */
AST_FORMAT_SILK,
+ /*! CELT supports crazy high sample rates */
+ AST_FORMAT_CELT,
/*! Ick, LPC10 sounds terrible, but at least we have code for it, if you're tacky enough
to use it */
AST_FORMAT_LPC10,
@@ -5019,12 +5021,13 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
from the single frame we passed in; if so, feed each one of them to the
channel, freeing each one after it has been written */
if ((f != fr) && AST_LIST_NEXT(f, frame_list)) {
- struct ast_frame *cur, *next;
+ struct ast_frame *cur, *next = NULL;
unsigned int skip = 0;
- for (cur = f, next = AST_LIST_NEXT(cur, frame_list);
- cur;
- cur = next, next = cur ? AST_LIST_NEXT(cur, frame_list) : NULL) {
+ cur = f;
+ while (cur) {
+ next = AST_LIST_NEXT(cur, frame_list);
+ AST_LIST_NEXT(cur, frame_list) = NULL;
if (!skip) {
if ((res = chan->tech->write(chan, cur)) < 0) {
chan->_softhangup |= AST_SOFTHANGUP_DEV;
@@ -5037,6 +5040,7 @@ int ast_write(struct ast_channel *chan, struct ast_frame *fr)
}
}
ast_frfree(cur);
+ cur = next;
}
/* reset f so the code below doesn't attempt to free it */
diff --git a/main/db.c b/main/db.c
index a0efc8c05..6a48b331f 100644
--- a/main/db.c
+++ b/main/db.c
@@ -20,11 +20,11 @@
*
* \brief ASTdb Management
*
- * \author Mark Spencer <markster@digium.com>
+ * \author Mark Spencer <markster@digium.com>
*
* \note DB3 is licensed under Sleepycat Public License and is thus incompatible
- * with GPL. To avoid having to make another exception (and complicate
- * licensing even further) we elect to use DB1 which is BSD licensed
+ * with GPL. To avoid having to make another exception (and complicate
+ * licensing even further) we elect to use DB1 which is BSD licensed
*/
#include "asterisk.h"
@@ -34,8 +34,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/_private.h"
#include "asterisk/paths.h" /* use ast_config_AST_DB */
#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
#include <signal.h>
#include <dirent.h>
+#include <sqlite3.h>
#include "asterisk/channel.h"
#include "asterisk/file.h"
@@ -44,9 +48,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/astdb.h"
#include "asterisk/cli.h"
#include "asterisk/utils.h"
-#include "asterisk/lock.h"
#include "asterisk/manager.h"
-#include "db1-ast/include/db.h"
/*** DOCUMENTATION
<manager name="DBGet" language="en_US">
@@ -101,242 +103,362 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
***/
#define MAX_DB_FIELD 256
-
-static DB *astdb;
AST_MUTEX_DEFINE_STATIC(dblock);
static ast_cond_t dbcond;
-typedef int (*process_keys_cb)(DBT *key, DBT *value, const char *filter, void *data);
+static sqlite3 *astdb;
+static pthread_t syncthread;
+static int doexit;
static void db_sync(void);
-static int dbinit(void)
+#define DEFINE_SQL_STATEMENT(stmt,sql) static sqlite3_stmt *stmt; \
+ const char stmt##_sql[] = sql;
+
+DEFINE_SQL_STATEMENT(put_stmt, "INSERT OR REPLACE INTO astdb (key, value) VALUES (?, ?)")
+DEFINE_SQL_STATEMENT(get_stmt, "SELECT value FROM astdb WHERE key=?")
+DEFINE_SQL_STATEMENT(del_stmt, "DELETE FROM astdb WHERE key=?")
+DEFINE_SQL_STATEMENT(deltree_stmt, "DELETE FROM astdb WHERE key LIKE ? || '/' || '%'")
+DEFINE_SQL_STATEMENT(deltree_all_stmt, "DELETE FROM astdb")
+DEFINE_SQL_STATEMENT(gettree_stmt, "SELECT key, value FROM astdb WHERE key LIKE ? || '/' || '%'")
+DEFINE_SQL_STATEMENT(gettree_all_stmt, "SELECT key, value FROM astdb")
+DEFINE_SQL_STATEMENT(showkey_stmt, "SELECT key, value FROM astdb WHERE key LIKE '%' || '/' || ?")
+DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))")
+
+static int init_stmt(sqlite3_stmt **stmt, const char *sql, size_t len)
{
- if (!astdb && !(astdb = dbopen(ast_config_AST_DB, O_CREAT | O_RDWR, AST_FILE_MODE, DB_BTREE, NULL))) {
- ast_log(LOG_WARNING, "Unable to open Asterisk database '%s': %s\n", ast_config_AST_DB, strerror(errno));
+ ast_mutex_lock(&dblock);
+ if (sqlite3_prepare(astdb, sql, len, stmt, NULL) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Couldn't prepare statement '%s': %s\n", sql, sqlite3_errmsg(astdb));
+ ast_mutex_unlock(&dblock);
return -1;
}
+ ast_mutex_unlock(&dblock);
+
return 0;
}
-
-static inline int keymatch(const char *key, const char *prefix)
+static int init_statements(void)
{
- int preflen = strlen(prefix);
- if (!preflen)
- return 1;
- if (!strcasecmp(key, prefix))
- return 1;
- if ((strlen(key) > preflen) && !strncasecmp(key, prefix, preflen)) {
- if (key[preflen] == '/')
- return 1;
- }
- return 0;
+ /* Don't initialize create_astdb_statment here as the astdb table needs to exist
+ * brefore these statments can be initialized */
+ return init_stmt(&get_stmt, get_stmt_sql, sizeof(get_stmt_sql))
+ || init_stmt(&del_stmt, del_stmt_sql, sizeof(del_stmt_sql))
+ || init_stmt(&deltree_stmt, deltree_stmt_sql, sizeof(deltree_stmt_sql))
+ || init_stmt(&deltree_all_stmt, deltree_all_stmt_sql, sizeof(deltree_all_stmt_sql))
+ || init_stmt(&gettree_stmt, gettree_stmt_sql, sizeof(gettree_stmt_sql))
+ || init_stmt(&gettree_all_stmt, gettree_all_stmt_sql, sizeof(gettree_all_stmt_sql))
+ || init_stmt(&showkey_stmt, showkey_stmt_sql, sizeof(showkey_stmt_sql))
+ || init_stmt(&put_stmt, put_stmt_sql, sizeof(put_stmt_sql));
}
-static inline int subkeymatch(const char *key, const char *suffix)
+static int convert_bdb_to_sqlite3(void)
{
- int suffixlen = strlen(suffix);
- if (suffixlen) {
- const char *subkey = key + strlen(key) - suffixlen;
- if (subkey < key)
- return 0;
- if (!strcasecmp(subkey, suffix))
- return 1;
- }
- return 0;
+ char *cmd;
+ int res;
+
+ ast_asprintf(&cmd, "astdb2sqlite3 '%s'\n", ast_config_AST_DB);
+ res = ast_safe_system(cmd);
+ ast_free(cmd);
+
+ return res;
}
-static const char *dbt_data2str(DBT *dbt)
+static int db_create_astdb(void)
{
- char *data = "";
+ int res = 0;
- if (dbt->size) {
- data = dbt->data;
- data[dbt->size - 1] = '\0';
+ if (!create_astdb_stmt) {
+ init_stmt(&create_astdb_stmt, create_astdb_stmt_sql, sizeof(create_astdb_stmt_sql));
}
- return data;
-}
+ ast_mutex_lock(&dblock);
+ if (sqlite3_step(create_astdb_stmt) != SQLITE_DONE) {
+ ast_log(LOG_WARNING, "Couldn't create astdb table: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ }
+ sqlite3_reset(create_astdb_stmt);
+ db_sync();
+ ast_mutex_unlock(&dblock);
-static inline const char *dbt_data2str_full(DBT *dbt, const char *def)
-{
- return S_OR(dbt_data2str(dbt), def);
+ return res;
}
-static int process_db_keys(process_keys_cb cb, void *data, const char *filter, int sync)
+static int db_open(void)
{
- DBT key = { 0, }, value = { 0, }, last_key = { 0, };
- int counter = 0;
- int res, last = 0;
- char last_key_s[MAX_DB_FIELD];
+ char *dbname;
+ struct stat dont_care;
+
+ if (!(dbname = alloca(strlen(ast_config_AST_DB) + sizeof(".sqlite3")))) {
+ return -1;
+ }
+ strcpy(dbname, ast_config_AST_DB);
+ strcat(dbname, ".sqlite3");
+
+ if (stat(dbname, &dont_care) && !stat(ast_config_AST_DB, &dont_care)) {
+ if (convert_bdb_to_sqlite3()) {
+ ast_log(LOG_ERROR, "*** Database conversion failed!\n");
+ ast_log(LOG_ERROR, "*** Asterisk now uses SQLite3 for its internal\n");
+ ast_log(LOG_ERROR, "*** database. Conversion from the old astdb\n");
+ ast_log(LOG_ERROR, "*** failed. Most likely the astdb2sqlite3 utility\n");
+ ast_log(LOG_ERROR, "*** was not selected for build. To convert the\n");
+ ast_log(LOG_ERROR, "*** old astdb, please delete '%s'\n", dbname);
+ ast_log(LOG_ERROR, "*** and re-run 'make menuselect' and select astdb2sqlite3\n");
+ ast_log(LOG_ERROR, "*** in the Utilities section, then 'make && make install'.\n");
+ sleep(5);
+ } else {
+ ast_log(LOG_NOTICE, "Database conversion succeeded!\n");
+ }
+ }
ast_mutex_lock(&dblock);
- if (dbinit()) {
+ if (sqlite3_open(dbname, &astdb) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Unable to open Asterisk database '%s': %s\n", dbname, sqlite3_errmsg(astdb));
+ sqlite3_close(astdb);
ast_mutex_unlock(&dblock);
return -1;
}
+ ast_mutex_unlock(&dblock);
- /* Somehow, the database can become corrupted such that astdb->seq will continue looping through
- * the database indefinitely. The pointer to last_key.data ends up getting re-used by the BDB lib
- * so this specifically queries for the last entry, makes a copy of the key, and then uses it as
- * a sentinel to avoid repeatedly looping over the list. */
+ return 0;
+}
- if (astdb->seq(astdb, &last_key, &value, R_LAST)) {
- /* Empty database */
- ast_mutex_unlock(&dblock);
+static int db_init(void)
+{
+ if (astdb) {
return 0;
}
- memcpy(last_key_s, last_key.data, MIN(last_key.size - 1, sizeof(last_key_s)));
- last_key_s[last_key.size - 1] = '\0';
- for (res = astdb->seq(astdb, &key, &value, R_FIRST);
- !res;
- res = astdb->seq(astdb, &key, &value, R_NEXT)) {
- /* The callback might delete the key, so we have to check it before calling */
- last = !strcmp(dbt_data2str_full(&key, "<bad key>"), last_key_s);
- counter += cb(&key, &value, filter, data);
- if (last) {
- break;
- }
+ if (db_open() || db_create_astdb() || init_statements()) {
+ return -1;
}
- if (sync) {
- db_sync();
+ return 0;
+}
+
+/* We purposely don't lock around the sqlite3 call because the transaction
+ * calls will be called with the database lock held. For any other use, make
+ * sure to take the dblock yourself. */
+static int db_execute_sql(const char *sql, int (*callback)(void *, int, char **, char **), void *arg)
+{
+ char *errmsg = NULL;
+ int res =0;
+
+ sqlite3_exec(astdb, sql, callback, arg, &errmsg);
+ if (errmsg) {
+ ast_log(LOG_WARNING, "Error executing SQL: %s\n", errmsg);
+ sqlite3_free(errmsg);
+ res = -1;
}
- ast_mutex_unlock(&dblock);
+ return res;
+}
- return counter;
+static int ast_db_begin_transaction(void)
+{
+ return db_execute_sql("BEGIN TRANSACTION", NULL, NULL);
}
-static int db_deltree_cb(DBT *key, DBT *value, const char *filter, void *data)
+static int ast_db_commit_transaction(void)
{
- int res = 0;
+ return db_execute_sql("COMMIT", NULL, NULL);
+}
- if (keymatch(dbt_data2str_full(key, "<bad key>"), filter)) {
- astdb->del(astdb, key, 0);
- res = 1;
- }
- return res;
+static int ast_db_rollback_transaction(void)
+{
+ return db_execute_sql("ROLLBACK", NULL, NULL);
}
-int ast_db_deltree(const char *family, const char *keytree)
+int ast_db_put(const char *family, const char *key, const char *value)
{
- char prefix[MAX_DB_FIELD];
+ char fullkey[MAX_DB_FIELD];
+ size_t fullkey_len;
+ int res = 0;
- if (family) {
- if (keytree) {
- snprintf(prefix, sizeof(prefix), "/%s/%s", family, keytree);
- } else {
- snprintf(prefix, sizeof(prefix), "/%s", family);
- }
- } else if (keytree) {
+ if (strlen(family) + strlen(key) + 2 > sizeof(fullkey) - 1) {
+ ast_log(LOG_WARNING, "Family and key length must be less than %zu bytes\n", sizeof(fullkey) - 3);
return -1;
- } else {
- prefix[0] = '\0';
}
- return process_db_keys(db_deltree_cb, NULL, prefix, 1);
+ fullkey_len = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, key);
+
+ ast_mutex_lock(&dblock);
+ if (sqlite3_bind_text(put_stmt, 1, fullkey, fullkey_len, SQLITE_STATIC) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Couldn't bind key to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_bind_text(put_stmt, 2, value, -1, SQLITE_STATIC) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Couldn't bind value to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_step(put_stmt) != SQLITE_DONE) {
+ ast_log(LOG_WARNING, "Couldn't execute statment: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ }
+
+ sqlite3_reset(put_stmt);
+ db_sync();
+ ast_mutex_unlock(&dblock);
+
+ return res;
}
-int ast_db_put(const char *family, const char *keys, const char *value)
+int ast_db_get(const char *family, const char *key, char *value, int valuelen)
{
+ const unsigned char *result;
char fullkey[MAX_DB_FIELD];
- DBT key, data;
- int res, fullkeylen;
+ size_t fullkey_len;
+ int res = 0;
- ast_mutex_lock(&dblock);
- if (dbinit()) {
- ast_mutex_unlock(&dblock);
+ if (strlen(family) + strlen(key) + 2 > sizeof(fullkey) - 1) {
+ ast_log(LOG_WARNING, "Family and key length must be less than %zu bytes\n", sizeof(fullkey) - 3);
return -1;
}
- fullkeylen = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, keys);
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
- key.data = fullkey;
- key.size = fullkeylen + 1;
- data.data = (char *) value;
- data.size = strlen(value) + 1;
- res = astdb->put(astdb, &key, &data, 0);
- db_sync();
+ fullkey_len = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, key);
+
+ ast_mutex_lock(&dblock);
+ if (sqlite3_bind_text(get_stmt, 1, fullkey, fullkey_len, SQLITE_STATIC) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Couldn't bind key to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_step(get_stmt) != SQLITE_ROW) {
+ ast_debug(1, "Unable to find key '%s' in family '%s'\n", key, family);
+ res = -1;
+ } else if (!(result = sqlite3_column_text(get_stmt, 0))) {
+ ast_log(LOG_WARNING, "Couldn't get value\n");
+ res = -1;
+ } else {
+ strncpy(value, (const char *) result, valuelen);
+ }
+ sqlite3_reset(get_stmt);
ast_mutex_unlock(&dblock);
- if (res)
- ast_log(LOG_WARNING, "Unable to put value '%s' for key '%s' in family '%s'\n", value, keys, family);
return res;
}
-int ast_db_get(const char *family, const char *keys, char *value, int valuelen)
+int ast_db_del(const char *family, const char *key)
{
- char fullkey[MAX_DB_FIELD] = "";
- DBT key, data;
- int res, fullkeylen;
+ char fullkey[MAX_DB_FIELD];
+ size_t fullkey_len;
+ int res = 0;
- ast_mutex_lock(&dblock);
- if (dbinit()) {
- ast_mutex_unlock(&dblock);
+ if (strlen(family) + strlen(key) + 2 > sizeof(fullkey) - 1) {
+ ast_log(LOG_WARNING, "Family and key length must be less than %zu bytes\n", sizeof(fullkey) - 3);
return -1;
}
- fullkeylen = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, keys);
- memset(&key, 0, sizeof(key));
- memset(&data, 0, sizeof(data));
- memset(value, 0, valuelen);
- key.data = fullkey;
- key.size = fullkeylen + 1;
+ fullkey_len = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, key);
- res = astdb->get(astdb, &key, &data, 0);
+ ast_mutex_lock(&dblock);
+ if (sqlite3_bind_text(del_stmt, 1, fullkey, fullkey_len, SQLITE_STATIC) != SQLITE_OK) {
+ ast_log(LOG_WARNING, "Couldn't bind key to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_step(del_stmt) != SQLITE_DONE) {
+ ast_debug(1, "Unable to find key '%s' in family '%s'\n", key, family);
+ res = -1;
+ }
+ sqlite3_reset(del_stmt);
+ db_sync();
+ ast_mutex_unlock(&dblock);
- /* Be sure to NULL terminate our data either way */
- if (res) {
- ast_debug(1, "Unable to find key '%s' in family '%s'\n", keys, family);
- } else {
-#if 0
- printf("Got value of size %d\n", data.size);
-#endif
- if (data.size) {
- ((char *)data.data)[data.size - 1] = '\0';
- /* Make sure that we don't write too much to the dst pointer or we don't read too much from the source pointer */
- ast_copy_string(value, data.data, (valuelen > data.size) ? data.size : valuelen);
+ return res;
+}
+
+int ast_db_deltree(const char *family, const char *subfamily)
+{
+ sqlite3_stmt *stmt = deltree_stmt;
+ char prefix[MAX_DB_FIELD];
+ int res = 0;
+
+ if (!ast_strlen_zero(family)) {
+ if (!ast_strlen_zero(subfamily)) {
+ /* Family and key tree */
+ snprintf(prefix, sizeof(prefix), "/%s/%s", family, subfamily);
} else {
- ast_log(LOG_NOTICE, "Strange, empty value for /%s/%s\n", family, keys);
+ /* Family only */
+ snprintf(prefix, sizeof(prefix), "/%s", family);
}
+ } else {
+ prefix[0] = '\0';
+ stmt = deltree_all_stmt;
}
- /* Data is not fully isolated for concurrency, so the lock must be extended
- * to after the copy to the output buffer. */
+ ast_mutex_lock(&dblock);
+ if (!ast_strlen_zero(prefix) && (sqlite3_bind_text(stmt, 1, prefix, -1, SQLITE_STATIC) != SQLITE_OK)) {
+ ast_log(LOG_WARNING, "Could bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_step(stmt) != SQLITE_DONE) {
+ ast_log(LOG_WARNING, "Couldn't execute stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ }
+ res = sqlite3_changes(astdb);
+ sqlite3_reset(stmt);
+ db_sync();
ast_mutex_unlock(&dblock);
return res;
}
-int ast_db_del(const char *family, const char *keys)
+struct ast_db_entry *ast_db_gettree(const char *family, const char *subfamily)
{
- char fullkey[MAX_DB_FIELD];
- DBT key;
- int res, fullkeylen;
+ char prefix[MAX_DB_FIELD];
+ sqlite3_stmt *stmt = gettree_stmt;
+ struct ast_db_entry *cur, *last = NULL, *ret = NULL;
+
+ if (!ast_strlen_zero(family)) {
+ if (!ast_strlen_zero(subfamily)) {
+ /* Family and key tree */
+ snprintf(prefix, sizeof(prefix), "/%s/%s", family, subfamily);
+ } else {
+ /* Family only */
+ snprintf(prefix, sizeof(prefix), "/%s", family);
+ }
+ } else {
+ prefix[0] = '\0';
+ stmt = gettree_all_stmt;
+ }
ast_mutex_lock(&dblock);
- if (dbinit()) {
+ if (!ast_strlen_zero(prefix) && (sqlite3_bind_text(stmt, 1, prefix, -1, SQLITE_STATIC) != SQLITE_OK)) {
+ ast_log(LOG_WARNING, "Could bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
+ sqlite3_reset(stmt);
ast_mutex_unlock(&dblock);
- return -1;
+ return NULL;
}
-
- fullkeylen = snprintf(fullkey, sizeof(fullkey), "/%s/%s", family, keys);
- memset(&key, 0, sizeof(key));
- key.data = fullkey;
- key.size = fullkeylen + 1;
-
- res = astdb->del(astdb, &key, 0);
- db_sync();
-
+
+ while (sqlite3_step(stmt) == SQLITE_ROW) {
+ const char *key_s, *value_s;
+ if (!(key_s = (const char *) sqlite3_column_text(stmt, 0))) {
+ break;
+ }
+ if (!(value_s = (const char *) sqlite3_column_text(stmt, 1))) {
+ break;
+ }
+ if (!(cur = ast_malloc(sizeof(*cur) + strlen(key_s) + strlen(value_s) + 2))) {
+ break;
+ }
+ cur->next = NULL;
+ cur->key = cur->data + strlen(value_s) + 1;
+ strcpy(cur->data, value_s);
+ strcpy(cur->key, key_s);
+ if (last) {
+ last->next = cur;
+ } else {
+ ret = cur;
+ }
+ last = cur;
+ }
+ sqlite3_reset(stmt);
ast_mutex_unlock(&dblock);
- if (res) {
- ast_debug(1, "Unable to find key '%s' in family '%s'\n", keys, family);
+ return ret;
+}
+
+void ast_db_freetree(struct ast_db_entry *dbe)
+{
+ struct ast_db_entry *last;
+ while (dbe) {
+ last = dbe;
+ dbe = dbe->next;
+ ast_free(last);
}
- return res;
}
static char *handle_cli_database_put(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
@@ -429,8 +551,8 @@ static char *handle_cli_database_deltree(struct ast_cli_entry *e, int cmd, struc
case CLI_INIT:
e->command = "database deltree";
e->usage =
- "Usage: database deltree <family> [keytree]\n"
- " Deletes a family or specific keytree within a family\n"
+ "Usage: database deltree <family> [subfamily]\n"
+ " Deletes a family or specific subfamily within a family\n"
" in the Asterisk database.\n";
return NULL;
case CLI_GENERATE:
@@ -452,32 +574,19 @@ static char *handle_cli_database_deltree(struct ast_cli_entry *e, int cmd, struc
return CLI_SUCCESS;
}
-static int db_show_cb(DBT *key, DBT *value, const char *filter, void *data)
-{
- struct ast_cli_args *a = data;
- const char *key_s = dbt_data2str_full(key, "<bad key>");
- const char *value_s = dbt_data2str_full(value, "<bad value>");
-
- if (keymatch(key_s, filter)) {
- ast_cli(a->fd, "%-50s: %-25s\n", key_s, value_s);
- return 1;
- }
-
- return 0;
-}
-
static char *handle_cli_database_show(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
char prefix[MAX_DB_FIELD];
int counter = 0;
+ sqlite3_stmt *stmt = gettree_stmt;
switch (cmd) {
case CLI_INIT:
e->command = "database show";
e->usage =
- "Usage: database show [family [keytree]]\n"
+ "Usage: database show [family [subfamily]]\n"
" Shows Asterisk database contents, optionally restricted\n"
- " to a given family, or family and keytree.\n";
+ " to a given family, or family and subfamily.\n";
return NULL;
case CLI_GENERATE:
return NULL;
@@ -492,118 +601,123 @@ static char *handle_cli_database_show(struct ast_cli_entry *e, int cmd, struct a
} else if (a->argc == 2) {
/* Neither */
prefix[0] = '\0';
+ stmt = gettree_all_stmt;
+
} else {
return CLI_SHOWUSAGE;
}
- if((counter = process_db_keys(db_show_cb, a, prefix, 0)) < 0) {
- ast_cli(a->fd, "Database unavailable\n");
- return CLI_SUCCESS;
+ ast_mutex_lock(&dblock);
+ if (!ast_strlen_zero(prefix) && (sqlite3_bind_text(stmt, 1, prefix, -1, SQLITE_STATIC) != SQLITE_OK)) {
+ ast_log(LOG_WARNING, "Could bind %s to stmt: %s\n", prefix, sqlite3_errmsg(astdb));
+ sqlite3_reset(stmt);
+ ast_mutex_unlock(&dblock);
+ return NULL;
}
- ast_cli(a->fd, "%d results found.\n", counter);
- return CLI_SUCCESS;
-}
-
-static int db_showkey_cb(DBT *key, DBT *value, const char *filter, void *data)
-{
- struct ast_cli_args *a = data;
- const char *key_s = dbt_data2str_full(key, "<bad key>");
- const char *value_s = dbt_data2str_full(value, "<bad value>");
-
- if (subkeymatch(key_s, filter)) {
+ while (sqlite3_step(stmt) == SQLITE_ROW) {
+ const char *key_s, *value_s;
+ if (!(key_s = (const char *) sqlite3_column_text(stmt, 0))) {
+ ast_log(LOG_WARNING, "Skipping invalid key!\n");
+ continue;
+ }
+ if (!(value_s = (const char *) sqlite3_column_text(stmt, 1))) {
+ ast_log(LOG_WARNING, "Skipping invalid value!\n");
+ continue;
+ }
+ ++counter;
ast_cli(a->fd, "%-50s: %-25s\n", key_s, value_s);
- return 1;
}
- return 0;
+ sqlite3_reset(stmt);
+ ast_mutex_unlock(&dblock);
+
+ ast_cli(a->fd, "%d results found.\n", counter);
+ return CLI_SUCCESS;
}
static char *handle_cli_database_showkey(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- char suffix[MAX_DB_FIELD];
int counter = 0;
switch (cmd) {
case CLI_INIT:
e->command = "database showkey";
e->usage =
- "Usage: database showkey <keytree>\n"
+ "Usage: database showkey <subfamily>\n"
" Shows Asterisk database contents, restricted to a given key.\n";
return NULL;
case CLI_GENERATE:
return NULL;
}
- if (a->argc == 3) {
- /* Key only */
- snprintf(suffix, sizeof(suffix), "/%s", a->argv[2]);
- } else {
+ if (a->argc != 3) {
return CLI_SHOWUSAGE;
}
- if ((counter = process_db_keys(db_showkey_cb, a, suffix, 0)) < 0) {
- ast_cli(a->fd, "Database unavailable\n");
- return CLI_SUCCESS;
+ ast_mutex_lock(&dblock);
+ if (!ast_strlen_zero(a->argv[2]) && (sqlite3_bind_text(showkey_stmt, 1, a->argv[2], -1, SQLITE_STATIC) != SQLITE_OK)) {
+ ast_log(LOG_WARNING, "Could bind %s to stmt: %s\n", a->argv[2], sqlite3_errmsg(astdb));
+ sqlite3_reset(showkey_stmt);
+ ast_mutex_unlock(&dblock);
+ return NULL;
+ }
+
+ while (sqlite3_step(showkey_stmt) == SQLITE_ROW) {
+ const char *key_s, *value_s;
+ if (!(key_s = (const char *) sqlite3_column_text(showkey_stmt, 0))) {
+ break;
+ }
+ if (!(value_s = (const char *) sqlite3_column_text(showkey_stmt, 1))) {
+ break;
+ }
+ ++counter;
+ ast_cli(a->fd, "%-50s: %-25s\n", key_s, value_s);
}
+ sqlite3_reset(showkey_stmt);
+ ast_mutex_unlock(&dblock);
ast_cli(a->fd, "%d results found.\n", counter);
return CLI_SUCCESS;
}
-static int db_gettree_cb(DBT *key, DBT *value, const char *filter, void *data)
+static int display_results(void *arg, int columns, char **values, char **colnames)
{
- struct ast_db_entry **ret = data;
- struct ast_db_entry *cur;
- const char *key_s = dbt_data2str_full(key, "<bad key>");
- const char *value_s = dbt_data2str_full(value, "<bad value>");
- size_t key_slen = strlen(key_s) + 1, value_slen = strlen(value_s) + 1;
+ struct ast_cli_args *a = arg;
+ size_t x;
- if (keymatch(key_s, filter) && (cur = ast_malloc(sizeof(*cur) + key_slen + value_slen))) {
- cur->next = *ret;
- cur->key = cur->data + value_slen;
- strcpy(cur->data, value_s);
- strcpy(cur->key, key_s);
- *ret = cur;
- return 1;
+ for (x = 0; x < columns; x++) {
+ ast_cli(a->fd, "%-5s: %-50s\n", colnames[x], values[x]);
}
+ ast_cli(a->fd, "\n");
return 0;
}
-struct ast_db_entry *ast_db_gettree(const char *family, const char *keytree)
+static char *handle_cli_database_query(struct ast_cli_entry *e, int cmd, struct ast_cli_args *a)
{
- char prefix[MAX_DB_FIELD];
- struct ast_db_entry *ret = NULL;
- if (!ast_strlen_zero(family)) {
- if (!ast_strlen_zero(keytree)) {
- /* Family and key tree */
- snprintf(prefix, sizeof(prefix), "/%s/%s", family, keytree);
- } else {
- /* Family only */
- snprintf(prefix, sizeof(prefix), "/%s", family);
- }
- } else {
- prefix[0] = '\0';
+ switch (cmd) {
+ case CLI_INIT:
+ e->command = "database query";
+ e->usage =
+ "Usage: database query \"<SQL Statement>\"\n"
+ " Run a user-specified SQL query on the database. Be careful.\n";
+ return NULL;
+ case CLI_GENERATE:
+ return NULL;
}
- if (process_db_keys(db_gettree_cb, &ret, prefix, 0) < 0) {
- ast_log(LOG_WARNING, "Database unavailable\n");
- return NULL;
+ if (a->argc != 3) {
+ return CLI_SHOWUSAGE;
}
- return ret;
-}
+ ast_mutex_lock(&dblock);
+ db_execute_sql(a->argv[2], display_results, a);
+ db_sync(); /* Go ahead and sync the db in case they write */
+ ast_mutex_unlock(&dblock);
-void ast_db_freetree(struct ast_db_entry *dbe)
-{
- struct ast_db_entry *last;
- while (dbe) {
- last = dbe;
- dbe = dbe->next;
- ast_free(last);
- }
+ return CLI_SUCCESS;
}
static struct ast_cli_entry cli_database[] = {
@@ -612,7 +726,8 @@ static struct ast_cli_entry cli_database[] = {
AST_CLI_DEFINE(handle_cli_database_get, "Gets database value"),
AST_CLI_DEFINE(handle_cli_database_put, "Adds/updates database value"),
AST_CLI_DEFINE(handle_cli_database_del, "Removes database key/value"),
- AST_CLI_DEFINE(handle_cli_database_deltree, "Removes database keytree/values")
+ AST_CLI_DEFINE(handle_cli_database_deltree, "Removes database subfamily/values"),
+ AST_CLI_DEFINE(handle_cli_database_query, "Run a user-specified query on the astdb"),
};
static int manager_dbput(struct mansession *s, const struct message *m)
@@ -726,7 +841,7 @@ static int manager_dbdeltree(struct mansession *s, const struct message *m)
astman_send_error(s, m, "Database entry not found");
else
astman_send_ack(s, m, "Key tree deleted successfully");
-
+
return 0;
}
@@ -754,27 +869,48 @@ static void db_sync(void)
static void *db_sync_thread(void *data)
{
ast_mutex_lock(&dblock);
+ ast_db_begin_transaction();
for (;;) {
+ /* We're ok with spurious wakeups, so we don't worry about a predicate */
ast_cond_wait(&dbcond, &dblock);
+ if (ast_db_commit_transaction()) {
+ ast_db_rollback_transaction();
+ }
+ if (doexit) {
+ ast_mutex_unlock(&dblock);
+ break;
+ }
+ ast_db_begin_transaction();
ast_mutex_unlock(&dblock);
sleep(1);
ast_mutex_lock(&dblock);
- astdb->sync(astdb, 0);
}
return NULL;
}
+static void astdb_atexit(void)
+{
+ doexit = 1;
+ db_sync();
+ pthread_join(syncthread, NULL);
+ ast_mutex_lock(&dblock);
+ sqlite3_close(astdb);
+ ast_mutex_unlock(&dblock);
+}
+
int astdb_init(void)
{
- pthread_t dont_care;
+ if (db_init()) {
+ return -1;
+ }
ast_cond_init(&dbcond, NULL);
- if (ast_pthread_create_background(&dont_care, NULL, db_sync_thread, NULL)) {
+ if (ast_pthread_create_background(&syncthread, NULL, db_sync_thread, NULL)) {
return -1;
}
- dbinit();
+ ast_register_atexit(astdb_atexit);
ast_cli_register_multiple(cli_database, ARRAY_LEN(cli_database));
ast_manager_register_xml("DBGet", EVENT_FLAG_SYSTEM | EVENT_FLAG_REPORTING, manager_dbget);
ast_manager_register_xml("DBPut", EVENT_FLAG_SYSTEM, manager_dbput);
diff --git a/main/dsp.c b/main/dsp.c
index ee1891823..da982d0c1 100644
--- a/main/dsp.c
+++ b/main/dsp.c
@@ -246,6 +246,20 @@ typedef struct
typedef struct
{
+ int block_size;
+ goertzel_state_t tone;
+ float energy; /* Accumulated energy of the current block */
+ int samples_pending; /* Samples remain to complete the current block */
+
+ float threshold; /* Energy of the tone relative to energy from all other signals to consider a hit */
+
+ int hit_count;
+ int miss_count;
+
+} v21_detect_state_t;
+
+typedef struct
+{
goertzel_state_t row_out[4];
goertzel_state_t col_out[4];
int hits_to_begin; /* How many successive hits needed to consider begin of a digit */
@@ -391,6 +405,7 @@ struct ast_dsp {
digit_detect_state_t digit_state;
tone_detect_state_t cng_tone_state;
tone_detect_state_t ced_tone_state;
+ v21_detect_state_t v21_state;
};
static void mute_fragment(struct ast_dsp *dsp, fragment_t *fragment)
@@ -463,10 +478,55 @@ static void ast_tone_detect_init(tone_detect_state_t *s, int freq, int duration,
ast_debug(1, "Setup tone %d Hz, %d ms, block_size=%d, hits_required=%d\n", freq, duration, s->block_size, s->hits_required);
}
+static void ast_v21_detect_init(v21_detect_state_t *s, unsigned int sample_rate)
+{
+ float x;
+ int periods_in_block;
+
+ /* If we want to remove tone, it is important to have block size not
+ to exceed frame size. Otherwise by the moment tone is detected it is too late
+ to squelch it from previous frames. Block size is 20ms at the given sample rate.*/
+ s->block_size = (20 * sample_rate) / 1000;
+
+ periods_in_block = s->block_size * 1850 / sample_rate;
+
+ /* Make sure we will have at least 5 periods at target frequency for analisys.
+ This may make block larger than expected packet and will make squelching impossible
+ but at least we will be detecting the tone */
+ if (periods_in_block < 5)
+ periods_in_block = 5;
+
+ /* Now calculate final block size. It will contain integer number of periods */
+ s->block_size = periods_in_block * sample_rate / 1850;
+
+ goertzel_init(&s->tone, 1850.0, s->block_size, sample_rate);
+
+ s->samples_pending = s->block_size;
+ s->hit_count = 0;
+ s->miss_count = 0;
+ s->energy = 0.0;
+
+ /* We want tone energy to be amp decibels above the rest of the signal (the noise).
+ According to Parseval's theorem the energy computed in time domain equals to energy
+ computed in frequency domain. So subtracting energy in the frequency domain (Goertzel result)
+ from the energy in the time domain we will get energy of the remaining signal (without the tone
+ we are detecting). We will be checking that
+ 10*log(Ew / (Et - Ew)) > amp
+ Calculate threshold so that we will be actually checking
+ Ew > Et * threshold
+ */
+
+ x = pow(10.0, 16 / 10.0);
+ s->threshold = x / (x + 1);
+
+ ast_debug(1, "Setup v21 detector, block_size=%d\n", s->block_size);
+}
+
static void ast_fax_detect_init(struct ast_dsp *s)
{
ast_tone_detect_init(&s->cng_tone_state, FAX_TONE_CNG_FREQ, FAX_TONE_CNG_DURATION, FAX_TONE_CNG_DB, s->sample_rate);
ast_tone_detect_init(&s->ced_tone_state, FAX_TONE_CED_FREQ, FAX_TONE_CED_DURATION, FAX_TONE_CED_DB, s->sample_rate);
+ ast_v21_detect_init(&s->v21_state, s->sample_rate);
}
static void ast_dtmf_detect_init (dtmf_detect_state_t *s, unsigned int sample_rate)
@@ -513,6 +573,89 @@ static void ast_digit_detect_init(digit_detect_state_t *s, int mf, unsigned int
}
}
+/*! \brief Detect a v21 preamble.
+ * This code is derived from the tone_detect code and detects a pattern of 1850
+ * Hz tone found in a v21 preamble.
+ */
+static int v21_detect(struct ast_dsp *dsp, v21_detect_state_t *s, int16_t *amp, int samples)
+{
+ float tone_energy;
+ int i;
+ int hit = 0;
+ int limit;
+ int res = 0;
+ int16_t *ptr;
+ int start, end;
+
+ for (start = 0; start < samples; start = end) {
+ /* Process in blocks. */
+ limit = samples - start;
+ if (limit > s->samples_pending) {
+ limit = s->samples_pending;
+ }
+ end = start + limit;
+
+ for (i = limit, ptr = amp ; i > 0; i--, ptr++) {
+ /* signed 32 bit int should be enough to suqare any possible signed 16 bit value */
+ s->energy += (int32_t) *ptr * (int32_t) *ptr;
+
+ goertzel_sample(&s->tone, *ptr);
+ }
+
+ s->samples_pending -= limit;
+
+ if (s->samples_pending) {
+ /* Finished incomplete (last) block */
+ break;
+ }
+
+ tone_energy = goertzel_result(&s->tone);
+
+ /* Scale to make comparable */
+ tone_energy *= 2.0;
+ s->energy *= s->block_size;
+
+ ast_debug(10, "v21 1850 Ew=%.2E, Et=%.2E, s/n=%10.2f\n", tone_energy, s->energy, tone_energy / (s->energy - tone_energy));
+
+ hit = 0;
+ if (tone_energy > s->energy * s->threshold) {
+ ast_debug(10, "Hit! count=%d; miss_count=%d\n", s->hit_count, s->miss_count);
+ hit = 1;
+ }
+
+ if (hit) {
+ if (s->miss_count == 3) {
+ s->hit_count++;
+ } else {
+ s->hit_count = 1;
+ }
+
+ s->miss_count = 0;
+ } else {
+ s->miss_count++;
+ if (s->miss_count > 3) {
+ s->hit_count = 0;
+ }
+ }
+
+ if (s->hit_count == 4) {
+ ast_debug(1, "v21 preamble detected\n");
+ res = 1;
+ }
+
+ /* Reinitialise the detector for the next block */
+ goertzel_reset(&s->tone);
+
+ /* Advance to the next block */
+ s->energy = 0.0;
+ s->samples_pending = s->block_size;
+
+ amp += limit;
+ }
+
+ return res;
+}
+
static int tone_detect(struct ast_dsp *dsp, tone_detect_state_t *s, int16_t *amp, int samples)
{
float tone_energy;
@@ -1441,6 +1584,10 @@ struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp,
if ((dsp->faxmode & DSP_FAXMODE_DETECT_CED) && tone_detect(dsp, &dsp->ced_tone_state, shortdata, len)) {
fax_digit = 'e';
}
+
+ if ((dsp->faxmode & DSP_FAXMODE_DETECT_V21) && v21_detect(dsp, &dsp->v21_state, shortdata, len)) {
+ fax_digit = 'g';
+ }
}
if (dsp->features & (DSP_FEATURE_DIGIT_DETECT | DSP_FEATURE_BUSY_DETECT)) {
diff --git a/main/features.c b/main/features.c
index 06ec1b698..60f8667d8 100644
--- a/main/features.c
+++ b/main/features.c
@@ -23,6 +23,10 @@
* \author Mark Spencer <markster@digium.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -1989,7 +1993,7 @@ static int check_compat(struct ast_channel *c, struct ast_channel *newchan)
/*!
* \internal
* \brief Builtin attended transfer failed cleanup.
- * \since 1.10
+ * \since 10.0
*
* \param transferee Party A in the transfer.
* \param transferer Party B in the transfer.
@@ -6145,8 +6149,6 @@ static int bridge_exec(struct ast_channel *chan, const char *data)
"Channel2: %s\r\n", chan->name, args.dest_chan);
}
- ast_channel_unlock(current_dest_chan);
-
do_bridge_masquerade(current_dest_chan, final_dest_chan);
chans[0] = current_dest_chan;
diff --git a/main/format.c b/main/format.c
index 28b15ae21..1c60ab770 100644
--- a/main/format.c
+++ b/main/format.c
@@ -748,6 +748,15 @@ int ast_format_rate(const struct ast_format *format)
} else {
return 8000;
}
+ case AST_FORMAT_CELT:
+ {
+ int samplerate;
+ if (!(ast_format_get_value(format,
+ CELT_ATTR_KEY_SAMP_RATE,
+ &samplerate))) {
+ return samplerate;
+ }
+ }
default:
return 8000;
}
@@ -1085,6 +1094,32 @@ init_cleanup:
return -1;
}
+static int custom_celt_format(struct ast_format_list *entry, unsigned int maxbitrate, unsigned int framesize)
+{
+ if (!entry->samplespersecond) {
+ ast_log(LOG_WARNING, "Custom CELT format definition '%s' requires sample rate to be defined.\n", entry->name);
+ }
+ ast_format_set(&entry->format, AST_FORMAT_CELT, 0);
+ if (!has_interface(&entry->format)) {
+ return -1;
+ }
+
+ snprintf(entry->desc, sizeof(entry->desc), "CELT Custom Format %dkhz", entry->samplespersecond/1000);
+
+ ast_format_append(&entry->format,
+ CELT_ATTR_KEY_SAMP_RATE, entry->samplespersecond,
+ CELT_ATTR_KEY_MAX_BITRATE, maxbitrate,
+ CELT_ATTR_KEY_FRAME_SIZE, framesize,
+ AST_FORMAT_ATTR_END);
+
+ entry->fr_len = 80;
+ entry->min_ms = 20;
+ entry->max_ms = 20;
+ entry->inc_ms = 20;
+ entry->def_ms = 20;
+ return 0;
+}
+
static int custom_silk_format(struct ast_format_list *entry, unsigned int maxbitrate, int usedtx, int usefec, int packetloss_percentage)
{
if (!entry->samplespersecond) {
@@ -1144,6 +1179,8 @@ static int conf_process_format_name(const char *name, enum ast_format_id *id)
{
if (!strcasecmp(name, "silk")) {
*id = AST_FORMAT_SILK;
+ } else if (!strcasecmp(name, "celt")) {
+ *id = AST_FORMAT_CELT;
} else {
*id = 0;
return -1;
@@ -1163,8 +1200,14 @@ static int conf_process_sample_rate(const char *rate, unsigned int *result)
*result = 24000;
} else if (!strcasecmp(rate, "32000")) {
*result = 32000;
+ } else if (!strcasecmp(rate, "44100")) {
+ *result = 44100;
} else if (!strcasecmp(rate, "48000")) {
*result = 48000;
+ } else if (!strcasecmp(rate, "96000")) {
+ *result = 96000;
+ } else if (!strcasecmp(rate, "192000")) {
+ *result = 192000;
} else {
*result = 0;
return -1;
@@ -1184,6 +1227,7 @@ static int load_format_config(void)
struct {
enum ast_format_id id;
unsigned int maxbitrate;
+ unsigned int framesize;
unsigned int packetloss_percentage;
int usefec;
int usedtx;
@@ -1221,6 +1265,11 @@ static int load_format_config(void)
ast_log(LOG_WARNING, "maxbitrate '%s' at line %d of %s is not supported.\n",
var->value, var->lineno, FORMAT_CONFIG);
}
+ } else if (!strcasecmp(var->name, "framesize")) {
+ if (sscanf(var->value, "%30u", &settings.framesize) != 1) {
+ ast_log(LOG_WARNING, "framesize '%s' at line %d of %s is not supported.\n",
+ var->value, var->lineno, FORMAT_CONFIG);
+ }
} else if (!strcasecmp(var->name, "dtx")) {
settings.usedtx = ast_true(var->value) ? 1 : 0;
} else if (!strcasecmp(var->name, "fec")) {
@@ -1239,6 +1288,11 @@ static int load_format_config(void)
add_it = 1;
}
break;
+ case AST_FORMAT_CELT:
+ if (!(custom_celt_format(&entry, settings.maxbitrate, settings.framesize))) {
+ add_it = 1;
+ }
+ break;
default:
ast_log(LOG_WARNING, "Can not create custom format %s\n", entry.name);
}
diff --git a/main/frame.c b/main/frame.c
index bb32386ca..b664e2e84 100644
--- a/main/frame.c
+++ b/main/frame.c
@@ -1011,6 +1011,10 @@ int ast_codec_get_samples(struct ast_frame *f)
} else {
return 160;
}
+ case AST_FORMAT_CELT:
+ /* TODO The assumes 20ms delivery right now, which is incorrect */
+ samples = ast_format_rate(&f->subclass.format) / 50;
+ break;
default:
ast_log(LOG_WARNING, "Unable to calculate samples for format %s\n", ast_getformatname(&f->subclass.format));
}
diff --git a/main/http.c b/main/http.c
index 63d91c2b2..724a58fdc 100644
--- a/main/http.c
+++ b/main/http.c
@@ -30,6 +30,10 @@
* \ref AstHTTP - AMI over the http protocol
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/main/manager.c b/main/manager.c
index 5b3da313d..94782418c 100644
--- a/main/manager.c
+++ b/main/manager.c
@@ -41,6 +41,10 @@
/*! @{
Doxygen group */
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -5136,7 +5140,7 @@ int ast_manager_unregister(char *action)
return 0;
}
-static int manager_state_cb(char *context, char *exten, int state, void *data)
+static int manager_state_cb(const char *context, const char *exten, enum ast_extension_states state, void *data)
{
/* Notify managers of change */
char hint[512];
@@ -5621,7 +5625,7 @@ static void xml_translate(struct ast_str **out, char *in, struct ast_variable *g
}
}
-static void process_output(struct mansession *s, struct ast_str *out, struct ast_variable *params, enum output_format format)
+static void process_output(struct mansession *s, struct ast_str **out, struct ast_variable *params, enum output_format format)
{
char *buf;
size_t l;
@@ -5638,14 +5642,14 @@ static void process_output(struct mansession *s, struct ast_str *out, struct ast
ast_log(LOG_WARNING, "mmap failed. Manager output was not processed\n");
} else {
if (format == FORMAT_XML || format == FORMAT_HTML) {
- xml_translate(&out, buf, params, format);
+ xml_translate(out, buf, params, format);
} else {
- ast_str_append(&out, 0, "%s", buf);
+ ast_str_append(out, 0, "%s", buf);
}
munmap(buf, l);
}
} else if (format == FORMAT_XML || format == FORMAT_HTML) {
- xml_translate(&out, "", params, format);
+ xml_translate(out, "", params, format);
}
fclose(s->f);
@@ -5803,7 +5807,7 @@ static int generic_http_callback(struct ast_tcptls_session_instance *ser,
ast_str_append(&out, 0, ROW_FMT, TEST_STRING);
}
- process_output(&s, out, params, format);
+ process_output(&s, &out, params, format);
if (format == FORMAT_XML) {
ast_str_append(&out, 0, "</ajax-response>\n");
@@ -6115,7 +6119,7 @@ static int auth_http_callback(struct ast_tcptls_session_instance *ser,
"<input type=\"submit\" value=\"Send request\" /></th></tr>\r\n");
}
- process_output(&s, out, params, format);
+ process_output(&s, &out, params, format);
if (format == FORMAT_XML) {
ast_str_append(&out, 0, "</ajax-response>\n");
diff --git a/main/pbx.c b/main/pbx.c
index 821fdbfad..e625a873a 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -12,7 +12,7 @@
* channels for your use.
*
* This program is free software, distributed under the terms of
-* the GNU General Public License Version 2. See the LICENSE file
+ * the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
@@ -921,15 +921,18 @@ struct ast_state_cb {
int id;
void *data;
ast_state_cb_type callback;
+ /*! \note Only used by ast_merge_contexts_and_delete */
AST_LIST_ENTRY(ast_state_cb) entry;
};
-/*! \brief Structure for dial plan hints
-
- \note Hints are pointers from an extension in the dialplan to one or
- more devices (tech/name)
- - See \ref AstExtState
-*/
+/*!
+ * \brief Structure for dial plan hints
+ *
+ * \note Hints are pointers from an extension in the dialplan to
+ * one or more devices (tech/name)
+ *
+ * See \ref AstExtState
+ */
struct ast_hint {
struct ast_exten *exten; /*!< Extension */
int laststate; /*!< Last known state */
@@ -1114,12 +1117,12 @@ static void __ast_internal_context_destroy( struct ast_context *con);
static int ast_add_extension_nolock(const char *context, int replace, const char *extension,
int priority, const char *label, const char *callerid,
const char *application, void *data, void (*datad)(void *), const char *registrar);
-static int add_pri_lockopt(struct ast_context *con, struct ast_exten *tmp,
- struct ast_exten *el, struct ast_exten *e, int replace, int lockhints);
static int ast_add_extension2_lockopt(struct ast_context *con,
int replace, const char *extension, int priority, const char *label, const char *callerid,
const char *application, void *data, void (*datad)(void *),
- const char *registrar, int lockconts, int lockhints);
+ const char *registrar, int lock_context);
+static struct ast_context *find_context_locked(const char *context);
+static struct ast_context *find_context(const char *context);
/* a func for qsort to use to sort a char array */
static int compare_char(const void *a, const void *b)
@@ -1263,7 +1266,9 @@ static struct pbx_builtin {
static struct ast_context *contexts;
static struct ast_hashtab *contexts_table = NULL;
-/*!\brief Lock for the ast_context list
+/*!
+ * \brief Lock for the ast_context list
+ * \note
* This lock MUST be recursive, or a deadlock on reload may result. See
* https://issues.asterisk.org/view.php?id=17643
*/
@@ -1274,11 +1279,13 @@ static AST_RWLIST_HEAD_STATIC(apps, ast_app);
static AST_RWLIST_HEAD_STATIC(switches, ast_switch);
static int stateid = 1;
-/*!
- * \brief When holding this container's lock, do _not_ do anything that will cause conlock
- * to be taken, unless you _already_ hold it. The ast_merge_contexts_and_delete
- * function will take the locks in conlock/hints order, so any other
- * paths that require both locks must also take them in that order.
+/*!
+ * \note When holding this container's lock, do _not_ do
+ * anything that will cause conlock to be taken, unless you
+ * _already_ hold it. The ast_merge_contexts_and_delete function
+ * will take the locks in conlock/hints order, so any other
+ * paths that require both locks must also take them in that
+ * order.
*/
static struct ao2_container *hints;
@@ -1306,8 +1313,6 @@ void check_contexts_trouble(void)
x = 2;
}
-static struct ast_context *find_context_locked(const char *context);
-static struct ast_context *find_context(const char *context);
int check_contexts(char *, int);
int check_contexts(char *file, int line )
@@ -1353,9 +1358,7 @@ int check_contexts(char *file, int line )
hashtab structure */
for(c2=contexts;c2;c2=c2->next) {
c1 = find_context_locked(c2->name);
- if (c1)
- {
-
+ if (c1) {
ast_unlock_contexts();
/* is every entry in the root list also in the root_table? */
@@ -2602,17 +2605,20 @@ struct fake_context /* this struct is purely for matching in the hashtab */
struct ast_context *ast_context_find(const char *name)
{
- struct ast_context *tmp = NULL;
+ struct ast_context *tmp;
struct fake_context item;
- ast_copy_string(item.name, name, sizeof(item.name));
-
+ if (!name) {
+ return NULL;
+ }
ast_rdlock_contexts();
- if( contexts_table ) {
- tmp = ast_hashtab_lookup(contexts_table,&item);
+ if (contexts_table) {
+ ast_copy_string(item.name, name, sizeof(item.name));
+ tmp = ast_hashtab_lookup(contexts_table, &item);
} else {
- while ( (tmp = ast_walk_contexts(tmp)) ) {
- if (!name || !strcasecmp(name, tmp->name)) {
+ tmp = NULL;
+ while ((tmp = ast_walk_contexts(tmp))) {
+ if (!strcasecmp(name, tmp->name)) {
break;
}
}
@@ -2679,11 +2685,7 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan,
if (bypass) { /* bypass means we only look there */
tmp = bypass;
} else { /* look in contexts */
- struct fake_context item;
-
- ast_copy_string(item.name, context, sizeof(item.name));
-
- tmp = ast_hashtab_lookup(contexts_table, &item);
+ tmp = find_context(context);
if (!tmp) {
return NULL;
}
@@ -3661,9 +3663,9 @@ int ast_func_read2(struct ast_channel *chan, const char *function, struct ast_st
if (acfptr->mod) {
u = __ast_module_user_add(acfptr->mod, chan);
}
+ ast_str_reset(*str);
if (acfptr->read2) {
/* ast_str enabled */
- ast_str_reset(*str);
res = acfptr->read2(chan, copy, args, str, maxlen);
} else {
/* Legacy function pointer, allocate buffer for result */
@@ -3730,6 +3732,9 @@ void ast_str_substitute_variables_full(struct ast_str **buf, ssize_t maxlen, str
ast_str_reset(*buf);
whereweare = tmp = templ;
while (!ast_strlen_zero(whereweare)) {
+ /* reset our buffer */
+ ast_str_reset(substr3);
+
/* Assume we're copying the whole remaining string */
pos = strlen(whereweare);
nextvar = NULL;
@@ -4387,9 +4392,9 @@ static int handle_statechange(void *datap)
continue;
}
hint = device->hint;
+
/* Get device state for this hint */
state = ast_extension_state2(hint->exten);
-
if ((state == -1) || (state == hint->laststate)) {
ao2_t_ref(device, -1, "no statechange for device");
continue;
@@ -4439,7 +4444,7 @@ static int handle_statechange(void *datap)
/*! \brief Add watcher for extension states */
int ast_extension_state_add(const char *context, const char *exten,
- ast_state_cb_type callback, void *data)
+ ast_state_cb_type callback, void *data)
{
struct ast_hint *hint;
struct ast_state_cb *state_cb;
@@ -5276,36 +5281,33 @@ void pbx_set_overrideswitch(const char *newval)
/*!
* \brief lookup for a context with a given name,
* \retval found context or NULL if not found.
-*/
+ */
static struct ast_context *find_context(const char *context)
{
- struct ast_context *c = NULL;
struct fake_context item;
ast_copy_string(item.name, context, sizeof(item.name));
- c = ast_hashtab_lookup(contexts_table,&item);
-
- return c;
+ return ast_hashtab_lookup(contexts_table, &item);
}
/*!
* \brief lookup for a context with a given name,
* \retval with conlock held if found.
* \retval NULL if not found.
-*/
+ */
static struct ast_context *find_context_locked(const char *context)
{
- struct ast_context *c = NULL;
+ struct ast_context *c;
struct fake_context item;
ast_copy_string(item.name, context, sizeof(item.name));
ast_rdlock_contexts();
- c = ast_hashtab_lookup(contexts_table,&item);
-
- if (!c)
+ c = ast_hashtab_lookup(contexts_table, &item);
+ if (!c) {
ast_unlock_contexts();
+ }
return c;
}
@@ -5315,12 +5317,13 @@ static struct ast_context *find_context_locked(const char *context)
* This function locks contexts list by &conlist, search for the right context
* structure, leave context list locked and call ast_context_remove_include2
* which removes include, unlock contexts list and return ...
-*/
+ */
int ast_context_remove_include(const char *context, const char *include, const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
/* found, remove include from this context ... */
ret = ast_context_remove_include2(c, include, registrar);
@@ -5376,8 +5379,9 @@ int ast_context_remove_include2(struct ast_context *con, const char *include, co
int ast_context_remove_switch(const char *context, const char *sw, const char *data, const char *registrar)
{
int ret = -1; /* default error return */
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
/* remove switch from this context ... */
ret = ast_context_remove_switch2(c, sw, data, registrar);
@@ -5420,11 +5424,7 @@ int ast_context_remove_switch2(struct ast_context *con, const char *sw, const ch
return ret;
}
-/*
- * \note This functions lock contexts list, search for the right context,
- * call ast_context_remove_extension2, unlock contexts list and return.
- * In this function we are using
- */
+/*! \note This function will lock conlock. */
int ast_context_remove_extension(const char *context, const char *extension, int priority, const char *registrar)
{
return ast_context_remove_extension_callerid(context, extension, priority, NULL, 0, registrar);
@@ -5433,12 +5433,15 @@ int ast_context_remove_extension(const char *context, const char *extension, int
int ast_context_remove_extension_callerid(const char *context, const char *extension, int priority, const char *callerid, int matchcallerid, const char *registrar)
{
int ret = -1; /* default error return */
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) { /* ... remove extension ... */
- ret = ast_context_remove_extension_callerid2(c, extension, priority, callerid, matchcallerid, registrar, 1);
+ ret = ast_context_remove_extension_callerid2(c, extension, priority, callerid,
+ matchcallerid, registrar, 0);
ast_unlock_contexts();
}
+
return ret;
}
@@ -5619,21 +5622,14 @@ int ast_context_remove_extension_callerid2(struct ast_context *con, const char *
*/
int ast_context_lockmacro(const char *context)
{
- struct ast_context *c = NULL;
+ struct ast_context *c;
int ret = -1;
- struct fake_context item;
-
- ast_rdlock_contexts();
-
- ast_copy_string(item.name, context, sizeof(item.name));
- c = ast_hashtab_lookup(contexts_table,&item);
- if (c)
- ret = 0;
- ast_unlock_contexts();
+ c = find_context_locked(context);
+ if (c) {
+ ast_unlock_contexts();
- /* if we found context, lock macrolock */
- if (ret == 0) {
+ /* if we found context, lock macrolock */
ret = ast_mutex_lock(&c->macrolock);
}
@@ -5647,21 +5643,14 @@ int ast_context_lockmacro(const char *context)
*/
int ast_context_unlockmacro(const char *context)
{
- struct ast_context *c = NULL;
+ struct ast_context *c;
int ret = -1;
- struct fake_context item;
-
- ast_rdlock_contexts();
- ast_copy_string(item.name, context, sizeof(item.name));
-
- c = ast_hashtab_lookup(contexts_table,&item);
- if (c)
- ret = 0;
- ast_unlock_contexts();
+ c = find_context_locked(context);
+ if (c) {
+ ast_unlock_contexts();
- /* if we found context, unlock macrolock */
- if (ret == 0) {
+ /* if we found context, unlock macrolock */
ret = ast_mutex_unlock(&c->macrolock);
}
@@ -5955,8 +5944,8 @@ static char *handle_show_hints(struct ast_cli_entry *e, int cmd, struct ast_cli_
ast_extension_state2str(hint->laststate), watchers);
num++;
}
-
ao2_iterator_destroy(&i);
+
ast_cli(a->fd, "----------------\n");
ast_cli(a->fd, "- %d hints registered\n", num);
return CLI_SUCCESS;
@@ -7214,7 +7203,8 @@ static void context_merge(struct ast_context **extcontexts, struct ast_hashtab *
void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_hashtab *exttable, const char *registrar)
{
double ft;
- struct ast_context *tmp, *oldcontextslist;
+ struct ast_context *tmp;
+ struct ast_context *oldcontextslist;
struct ast_hashtab *oldtable;
struct store_hints store = AST_LIST_HEAD_INIT_VALUE;
struct store_hint *this;
@@ -7224,17 +7214,22 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
struct ast_state_cb *thiscb;
struct ast_hashtab_iter *iter;
struct ao2_iterator i;
+ struct timeval begintime;
+ struct timeval writelocktime;
+ struct timeval endlocktime;
+ struct timeval enddeltime;
- /* it is very important that this function hold the hint list lock _and_ the conlock
- during its operation; not only do we need to ensure that the list of contexts
- and extensions does not change, but also that no hint callbacks (watchers) are
- added or removed during the merge/delete process
-
- in addition, the locks _must_ be taken in this order, because there are already
- other code paths that use this order
- */
-
- struct timeval begintime, writelocktime, endlocktime, enddeltime;
+ /*
+ * It is very important that this function hold the hints
+ * container lock _and_ the conlock during its operation; not
+ * only do we need to ensure that the list of contexts and
+ * extensions does not change, but also that no hint callbacks
+ * (watchers) are added or removed during the merge/delete
+ * process
+ *
+ * In addition, the locks _must_ be taken in this order, because
+ * there are already other code paths that use this order
+ */
begintime = ast_tvnow();
ast_rdlock_contexts();
@@ -7330,13 +7325,17 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
ast_unlock_contexts();
endlocktime = ast_tvnow();
- /* the old list and hashtab no longer are relevant, delete them while the rest of asterisk
- is now freely using the new stuff instead */
+ /*
+ * The old list and hashtab no longer are relevant, delete them
+ * while the rest of asterisk is now freely using the new stuff
+ * instead.
+ */
ast_hashtab_destroy(oldtable, NULL);
for (tmp = oldcontextslist; tmp; ) {
struct ast_context *next; /* next starting point */
+
next = tmp->next;
__ast_internal_context_destroy(tmp);
tmp = next;
@@ -7358,7 +7357,6 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
ft = ast_tvdiff_us(enddeltime, begintime);
ft /= 1000000.0;
ast_verb(3,"Total time merge_contexts_delete: %8.6f sec\n", ft);
- return;
}
/*
@@ -7369,8 +7367,9 @@ void ast_merge_contexts_and_delete(struct ast_context **extcontexts, struct ast_
int ast_context_add_include(const char *context, const char *include, const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
ret = ast_context_add_include2(c, include, registrar);
ast_unlock_contexts();
@@ -7700,8 +7699,9 @@ int ast_context_add_include2(struct ast_context *con, const char *value,
int ast_context_add_switch(const char *context, const char *sw, const char *data, int eval, const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) { /* found, add switch to this context */
ret = ast_context_add_switch2(c, sw, data, eval, registrar);
ast_unlock_contexts();
@@ -7779,8 +7779,9 @@ int ast_context_add_switch2(struct ast_context *con, const char *value,
int ast_context_remove_ignorepat(const char *context, const char *ignorepat, const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
ret = ast_context_remove_ignorepat2(c, ignorepat, registrar);
ast_unlock_contexts();
@@ -7822,8 +7823,9 @@ int ast_context_remove_ignorepat2(struct ast_context *con, const char *ignorepat
int ast_context_add_ignorepat(const char *context, const char *value, const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
ret = ast_context_add_ignorepat2(c, value, registrar);
ast_unlock_contexts();
@@ -7872,8 +7874,10 @@ int ast_context_add_ignorepat2(struct ast_context *con, const char *value, const
int ast_ignore_pattern(const char *context, const char *pattern)
{
struct ast_context *con = ast_context_find(context);
+
if (con) {
struct ast_ignorepat *pat;
+
for (pat = con->ignorepats; pat; pat = pat->next) {
if (ast_extension_match(pat->pattern, pattern))
return 1;
@@ -7893,11 +7897,12 @@ static int ast_add_extension_nolock(const char *context, int replace, const char
const char *application, void *data, void (*datad)(void *), const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context(context);
+ struct ast_context *c;
+ c = find_context(context);
if (c) {
ret = ast_add_extension2_lockopt(c, replace, extension, priority, label, callerid,
- application, data, datad, registrar, 0, 0);
+ application, data, datad, registrar, 1);
}
return ret;
@@ -7912,8 +7917,9 @@ int ast_add_extension(const char *context, int replace, const char *extension,
const char *application, void *data, void (*datad)(void *), const char *registrar)
{
int ret = -1;
- struct ast_context *c = find_context_locked(context);
+ struct ast_context *c;
+ c = find_context_locked(context);
if (c) {
ret = ast_add_extension2(c, replace, extension, priority, label, callerid,
application, data, datad, registrar);
@@ -8071,20 +8077,9 @@ static int ext_strncpy(char *dst, const char *src, int len)
* \retval 0 on success.
* \retval -1 on failure.
*/
-static int add_pri(struct ast_context *con, struct ast_exten *tmp,
+static int add_priority(struct ast_context *con, struct ast_exten *tmp,
struct ast_exten *el, struct ast_exten *e, int replace)
{
- return add_pri_lockopt(con, tmp, el, e, replace, 1);
-}
-
-/*!
- * \brief add the extension in the priority chain.
- * \retval 0 on success.
- * \retval -1 on failure.
-*/
-static int add_pri_lockopt(struct ast_context *con, struct ast_exten *tmp,
- struct ast_exten *el, struct ast_exten *e, int replace, int lockhints)
-{
struct ast_exten *ep;
struct ast_exten *eh=e;
@@ -8220,11 +8215,7 @@ static int add_pri_lockopt(struct ast_context *con, struct ast_exten *tmp,
}
/* And immediately return success. */
if (tmp->priority == PRIORITY_HINT) {
- if (lockhints) {
- ast_add_hint(tmp);
- } else {
- ast_add_hint(tmp);
- }
+ ast_add_hint(tmp);
}
}
return 0;
@@ -8260,18 +8251,21 @@ int ast_add_extension2(struct ast_context *con,
const char *application, void *data, void (*datad)(void *),
const char *registrar)
{
- return ast_add_extension2_lockopt(con, replace, extension, priority, label, callerid, application, data, datad, registrar, 1, 1);
+ return ast_add_extension2_lockopt(con, replace, extension, priority, label, callerid,
+ application, data, datad, registrar, 1);
}
-/*! \brief
- * Does all the work of ast_add_extension2, but adds two args, to determine if
- * context and hint locking should be done. In merge_and_delete, we need to do
- * this without locking, as the locks are already held.
+/*!
+ * \brief Same as ast_add_extension2() but controls the context locking.
+ *
+ * \details
+ * Does all the work of ast_add_extension2, but adds an arg to
+ * determine if context locking should be done.
*/
static int ast_add_extension2_lockopt(struct ast_context *con,
int replace, const char *extension, int priority, const char *label, const char *callerid,
const char *application, void *data, void (*datad)(void *),
- const char *registrar, int lockconts, int lockhints)
+ const char *registrar, int lock_context)
{
/*
* Sort extensions (or patterns) according to the rules indicated above.
@@ -8348,7 +8342,7 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
tmp->datad = datad;
tmp->registrar = registrar;
- if (lockconts) {
+ if (lock_context) {
ast_wrlock_context(con);
}
@@ -8381,9 +8375,9 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
if (res >= 0)
break;
}
- if (e && res == 0) { /* exact match, insert in the pri chain */
- res = add_pri(con, tmp, el, e, replace);
- if (lockconts) {
+ if (e && res == 0) { /* exact match, insert in the priority chain */
+ res = add_priority(con, tmp, el, e, replace);
+ if (lock_context) {
ast_unlock_context(con);
}
if (res < 0) {
@@ -8442,15 +8436,11 @@ static int ast_add_extension2_lockopt(struct ast_context *con,
}
ast_hashtab_insert_safe(con->root_table, tmp);
- if (lockconts) {
+ if (lock_context) {
ast_unlock_context(con);
}
if (tmp->priority == PRIORITY_HINT) {
- if (lockhints) {
- ast_add_hint(tmp);
- } else {
- ast_add_hint(tmp);
- }
+ ast_add_hint(tmp);
}
}
if (option_debug) {
@@ -10102,17 +10092,17 @@ int load_pbx(void)
/*
* Lock context list functions ...
*/
-int ast_wrlock_contexts()
+int ast_wrlock_contexts(void)
{
return ast_mutex_lock(&conlock);
}
-int ast_rdlock_contexts()
+int ast_rdlock_contexts(void)
{
return ast_mutex_lock(&conlock);
}
-int ast_unlock_contexts()
+int ast_unlock_contexts(void)
{
return ast_mutex_unlock(&conlock);
}
diff --git a/main/rtp_engine.c b/main/rtp_engine.c
index a3d9c4d8e..c7d77f809 100644
--- a/main/rtp_engine.c
+++ b/main/rtp_engine.c
@@ -69,8 +69,6 @@ struct ast_rtp_instance {
int holdtimeout;
/*! RTP keepalive interval */
int keepalive;
- /*! DTMF mode in use */
- enum ast_rtp_dtmf_mode dtmf_mode;
/*! Glue currently in use */
struct ast_rtp_glue *glue;
/*! Channel associated with the instance */
@@ -745,18 +743,12 @@ int ast_rtp_instance_dtmf_end_with_duration(struct ast_rtp_instance *instance, c
int ast_rtp_instance_dtmf_mode_set(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode)
{
- if (!instance->engine->dtmf_mode_set || instance->engine->dtmf_mode_set(instance, dtmf_mode)) {
- return -1;
- }
-
- instance->dtmf_mode = dtmf_mode;
-
- return 0;
+ return (!instance->engine->dtmf_mode_set || instance->engine->dtmf_mode_set(instance, dtmf_mode)) ? -1 : 0;
}
enum ast_rtp_dtmf_mode ast_rtp_instance_dtmf_mode_get(struct ast_rtp_instance *instance)
{
- return instance->dtmf_mode;
+ return instance->engine->dtmf_mode_get ? instance->engine->dtmf_mode_get(instance) : 0;
}
void ast_rtp_instance_update_source(struct ast_rtp_instance *instance)
@@ -1291,6 +1283,7 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as
enum ast_rtp_glue_result audio_glue0_res = AST_RTP_GLUE_RESULT_FORBID, video_glue0_res = AST_RTP_GLUE_RESULT_FORBID;
enum ast_rtp_glue_result audio_glue1_res = AST_RTP_GLUE_RESULT_FORBID, video_glue1_res = AST_RTP_GLUE_RESULT_FORBID;
enum ast_bridge_result res = AST_BRIDGE_FAILED;
+ enum ast_rtp_dtmf_mode dmode;
struct ast_format_cap *cap0 = ast_format_cap_alloc_nolock();
struct ast_format_cap *cap1 = ast_format_cap_alloc_nolock();
int unlock_chans = 1;
@@ -1352,11 +1345,13 @@ enum ast_bridge_result ast_rtp_instance_bridge(struct ast_channel *c0, struct as
}
/* If we need to get DTMF see if we can do it outside of the RTP stream itself */
- if ((flags & AST_BRIDGE_DTMF_CHANNEL_0) && instance0->properties[AST_RTP_PROPERTY_DTMF]) {
+ dmode = ast_rtp_instance_dtmf_mode_get(instance0);
+ if ((flags & AST_BRIDGE_DTMF_CHANNEL_0) && dmode) {
res = AST_BRIDGE_FAILED_NOWARN;
goto done;
}
- if ((flags & AST_BRIDGE_DTMF_CHANNEL_1) && instance1->properties[AST_RTP_PROPERTY_DTMF]) {
+ dmode = ast_rtp_instance_dtmf_mode_get(instance1);
+ if ((flags & AST_BRIDGE_DTMF_CHANNEL_1) && dmode) {
res = AST_BRIDGE_FAILED_NOWARN;
goto done;
}
@@ -1931,6 +1926,10 @@ int ast_rtp_engine_load_format(const struct ast_format *format)
set_next_mime_type(format, 0, "audio", "SILK", ast_format_rate(format));
add_static_payload(-1, format, 0);
break;
+ case AST_FORMAT_CELT:
+ set_next_mime_type(format, 0, "audio", "CELT", ast_format_rate(format));
+ add_static_payload(-1, format, 0);
+ break;
default:
break;
}
diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 96c65ff6d..94a6212fa 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -24,6 +24,7 @@
/*** MODULEINFO
<depend>res_ael_share</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c
index e02ef9de6..f0da2e87a 100644
--- a/pbx/pbx_config.c
+++ b/pbx/pbx_config.c
@@ -23,6 +23,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index 26418d760..f2f556915 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -24,6 +24,7 @@
/*** MODULEINFO
<depend>zlib</depend>
<use type="external">crypto</use>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/pbx/pbx_loopback.c b/pbx/pbx_loopback.c
index e283127a0..915a0cb10 100644
--- a/pbx/pbx_loopback.c
+++ b/pbx/pbx_loopback.c
@@ -22,6 +22,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/pbx/pbx_lua.c b/pbx/pbx_lua.c
index cae82adba..c1088629b 100644
--- a/pbx/pbx_lua.c
+++ b/pbx/pbx_lua.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<depend>lua</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/pbx/pbx_realtime.c b/pbx/pbx_realtime.c
index f183c867b..51254a871 100644
--- a/pbx/pbx_realtime.c
+++ b/pbx/pbx_realtime.c
@@ -23,6 +23,10 @@
* \arg See also: \ref AstARA
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index b90866357..b45ff6a59 100644
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -22,6 +22,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_adsi.c b/res/res_adsi.c
index 0a1f623a5..778752495 100644
--- a/res/res_adsi.c
+++ b/res/res_adsi.c
@@ -30,6 +30,10 @@
* res_adsi to load
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_ael_share.c b/res/res_ael_share.c
index 805dfd9a8..f1ae9f33f 100644
--- a/res/res_ael_share.c
+++ b/res/res_ael_share.c
@@ -25,6 +25,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_agi.c b/res/res_agi.c
index b57c498df..87ae21a6d 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -25,6 +25,10 @@
* \todo Convert the rest of the AGI commands over to XML documentation
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_ais.c b/res/res_ais.c
index 9bcceeade..c64e8e674 100644
--- a/res/res_ais.c
+++ b/res/res_ais.c
@@ -34,6 +34,7 @@
/*** MODULEINFO
<depend>ais</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_calendar.c b/res/res_calendar.c
index e6b724baf..b77553781 100644
--- a/res/res_calendar.c
+++ b/res/res_calendar.c
@@ -23,6 +23,10 @@
* \todo Support writing attendees
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_calendar_caldav.c b/res/res_calendar_caldav.c
index dd150afd6..14fce0ca7 100644
--- a/res/res_calendar_caldav.c
+++ b/res/res_calendar_caldav.c
@@ -24,7 +24,9 @@
<depend>neon</depend>
<depend>ical</depend>
<depend>libxml2</depend>
+ <support_level>core</support_level>
***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_calendar_ews.c b/res/res_calendar_ews.c
index 31df35312..51761127e 100644
--- a/res/res_calendar_ews.c
+++ b/res/res_calendar_ews.c
@@ -22,7 +22,9 @@
/*** MODULEINFO
<depend>neon29</depend>
+ <support_level>core</support_level>
***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_calendar_exchange.c b/res/res_calendar_exchange.c
index 2238124db..4a2df1822 100644
--- a/res/res_calendar_exchange.c
+++ b/res/res_calendar_exchange.c
@@ -24,7 +24,9 @@
<depend>neon</depend>
<depend>ical</depend>
<depend>iksemel</depend>
+ <support_level>core</support_level>
***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_calendar_icalendar.c b/res/res_calendar_icalendar.c
index d503eac35..8ef269e4f 100644
--- a/res/res_calendar_icalendar.c
+++ b/res/res_calendar_icalendar.c
@@ -23,7 +23,9 @@
/*** MODULEINFO
<depend>neon</depend>
<depend>ical</depend>
+ <support_level>core</support_level>
***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_clialiases.c b/res/res_clialiases.c
index e2558f274..d67f3ba39 100644
--- a/res/res_clialiases.c
+++ b/res/res_clialiases.c
@@ -26,6 +26,9 @@
* CLI commands.
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/res/res_clioriginate.c b/res/res_clioriginate.c
index f244c165d..8a30be073 100644
--- a/res/res_clioriginate.c
+++ b/res/res_clioriginate.c
@@ -24,6 +24,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
diff --git a/res/res_config_curl.c b/res/res_config_curl.c
index 8488d9bdc..bb8d9b39b 100644
--- a/res/res_config_curl.c
+++ b/res/res_config_curl.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>curl</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_config_ldap.c b/res/res_config_ldap.c
index adfdacb28..55e1526d5 100644
--- a/res/res_config_ldap.c
+++ b/res/res_config_ldap.c
@@ -33,6 +33,7 @@
/*** MODULEINFO
<depend>ldap</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_config_odbc.c b/res/res_config_odbc.c
index 8154ecc2b..86cc25c86 100644
--- a/res/res_config_odbc.c
+++ b/res/res_config_odbc.c
@@ -30,6 +30,7 @@
/*** MODULEINFO
<depend>res_odbc</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -481,7 +482,7 @@ static int update_odbc(const char *database, const char *table, const char *keyf
va_list aq;
struct custom_prepare_struct cps = { .sql = sql, .extra = lookup };
struct odbc_cache_tables *tableptr;
- struct odbc_cache_columns *column;
+ struct odbc_cache_columns *column = NULL;
struct ast_flags connected_flag = { RES_ODBC_CONNECTED };
if (!table) {
@@ -519,7 +520,16 @@ static int update_odbc(const char *database, const char *table, const char *keyf
while((newparam = va_arg(aq, const char *))) {
va_arg(aq, const char *);
if ((tableptr && (column = ast_odbc_find_column(tableptr, newparam))) || count > 63) {
- snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", %s=?", newparam);
+ /* NULL test for integer-based columns */
+ if (ast_strlen_zero(newparam) && tableptr && column && column->nullable && count < 64 &&
+ (column->type == SQL_INTEGER || column->type == SQL_BIGINT ||
+ column->type == SQL_SMALLINT || column->type == SQL_TINYINT ||
+ column->type == SQL_NUMERIC || column->type == SQL_DECIMAL)) {
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", %s=NULL", newparam);
+ cps.skip |= (1LL << count);
+ } else {
+ snprintf(sql + strlen(sql), sizeof(sql) - strlen(sql), ", %s=?", newparam);
+ }
} else { /* the column does not exist in the table */
cps.skip |= (1LL << count);
}
diff --git a/res/res_config_pgsql.c b/res/res_config_pgsql.c
index bbc683a47..6ed6bd294 100644
--- a/res/res_config_pgsql.c
+++ b/res/res_config_pgsql.c
@@ -24,6 +24,7 @@
/*** MODULEINFO
<depend>pgsql</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index 75d353cd5..fbeeac275 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -73,6 +73,7 @@
/*** MODULEINFO
<depend>sqlite</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_convert.c b/res/res_convert.c
index 94d6e1e59..c2966a85f 100644
--- a/res/res_convert.c
+++ b/res/res_convert.c
@@ -26,6 +26,10 @@
*
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_crypto.c b/res/res_crypto.c
index e25b8a4d6..4ae0851d6 100644
--- a/res/res_crypto.c
+++ b/res/res_crypto.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>openssl</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_fax.c b/res/res_fax.c
index 431e7086a..8073f2d6e 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -53,6 +53,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -253,6 +257,8 @@ struct fax_gateway {
int framehook;
/*! \brief bridged */
int bridged:1;
+ /*! \brief 1 if a v21 preamble has been detected */
+ int detected_v21:1;
/*! \brief a flag to track the state of our negotiation */
enum ast_t38_state t38_state;
/*! \brief original audio formats */
@@ -2407,10 +2413,10 @@ static struct fax_gateway *fax_gateway_new(struct ast_fax_session_details *detai
gateway->framehook = -1;
ast_dsp_set_features(gateway->chan_dsp, DSP_FEATURE_FAX_DETECT);
- ast_dsp_set_faxmode(gateway->chan_dsp, DSP_FAXMODE_DETECT_CED);
+ ast_dsp_set_faxmode(gateway->chan_dsp, DSP_FAXMODE_DETECT_V21);
ast_dsp_set_features(gateway->peer_dsp, DSP_FEATURE_FAX_DETECT);
- ast_dsp_set_faxmode(gateway->peer_dsp, DSP_FAXMODE_DETECT_CED);
+ ast_dsp_set_faxmode(gateway->peer_dsp, DSP_FAXMODE_DETECT_V21);
details->caps = AST_FAX_TECH_GATEWAY;
if (!(gateway->s = fax_session_reserve(details, &gateway->token))) {
@@ -2465,57 +2471,68 @@ static int fax_gateway_start(struct fax_gateway *gateway, struct ast_fax_session
return 0;
}
-static struct ast_frame *fax_gateway_detect_ced(struct fax_gateway *gateway, struct ast_channel *chan, struct ast_channel *peer, struct ast_channel *active, struct ast_frame *f)
+static struct ast_frame *fax_gateway_request_t38(struct fax_gateway *gateway, struct ast_channel *chan, struct ast_frame *f)
{
- struct ast_frame *dfr = ast_frdup(f);
- struct ast_dsp *active_dsp = (active == chan) ? gateway->chan_dsp : gateway->peer_dsp;
- struct ast_channel *other = (active == chan) ? peer : chan;
+ struct ast_frame *fp;
+ struct ast_control_t38_parameters t38_parameters = {
+ .request_response = AST_T38_REQUEST_NEGOTIATE,
+ };
+ struct ast_frame control_frame = {
+ .src = "res_fax",
+ .frametype = AST_FRAME_CONTROL,
+ .datalen = sizeof(t38_parameters),
+ .subclass.integer = AST_CONTROL_T38_PARAMETERS,
+ .data.ptr = &t38_parameters,
+ };
- if (!dfr) {
+ struct ast_fax_session_details *details = find_details(chan);
+
+ if (!details) {
+ ast_log(LOG_ERROR, "no FAX session details found on chan %s for T.38 gateway session, odd\n", chan->name);
+ ast_framehook_detach(chan, gateway->framehook);
return f;
}
- if (!(dfr = ast_dsp_process(active, active_dsp, dfr))) {
+ t38_parameters_fax_to_ast(&t38_parameters, &details->our_t38_parameters);
+ ao2_ref(details, -1);
+
+ if (!(fp = ast_frisolate(&control_frame))) {
+ ast_log(LOG_ERROR, "error generating T.38 request control frame on chan %s for T.38 gateway session\n", chan->name);
return f;
}
- if (dfr->frametype == AST_FRAME_DTMF && dfr->subclass.integer == 'e') {
- if (ast_channel_get_t38_state(other) == T38_STATE_UNKNOWN) {
- struct ast_control_t38_parameters t38_parameters = {
- .request_response = AST_T38_REQUEST_NEGOTIATE,
- };
- struct ast_frame control_frame = {
- .src = "res_fax",
- .frametype = AST_FRAME_CONTROL,
- .datalen = sizeof(t38_parameters),
- .subclass.integer = AST_CONTROL_T38_PARAMETERS,
- .data.ptr = &t38_parameters,
- };
+ gateway->t38_state = T38_STATE_NEGOTIATING;
+ gateway->timeout_start = ast_tvnow();
- struct ast_fax_session_details *details = find_details(chan);
- ast_frfree(dfr);
+ ast_debug(1, "requesting T.38 for gateway session for %s\n", chan->name);
+ return fp;
+}
- if (!details) {
- ast_log(LOG_ERROR, "no FAX session details found on chan %s for T.38 gateway session, odd\n", chan->name);
- ast_framehook_detach(chan, gateway->framehook);
- return f;
- }
+static struct ast_frame *fax_gateway_detect_v21(struct fax_gateway *gateway, struct ast_channel *chan, struct ast_channel *peer, struct ast_channel *active, struct ast_frame *f)
+{
+ struct ast_frame *dfr = ast_frdup(f);
+ struct ast_dsp *active_dsp = (active == chan) ? gateway->chan_dsp : gateway->peer_dsp;
+ struct ast_channel *other = (active == chan) ? peer : chan;
- t38_parameters_fax_to_ast(&t38_parameters, &details->our_t38_parameters);
- ao2_ref(details, -1);
+ if (gateway->detected_v21) {
+ return f;
+ }
- if (!(dfr = ast_frisolate(&control_frame))) {
- ast_log(LOG_ERROR, "error generating T.38 request control frame on chan %s for T.38 gateway session\n", chan->name);
- return f;
- }
+ if (!dfr) {
+ return f;
+ }
- gateway->t38_state = T38_STATE_NEGOTIATING;
- gateway->timeout_start = ast_tvnow();
+ if (!(dfr = ast_dsp_process(active, active_dsp, dfr))) {
+ return f;
+ }
- ast_debug(1, "detected CED tone on %s, requesting T.38 on %s for T.38 gateway session\n", active->name, other->name);
- return dfr;
+ if (dfr->frametype == AST_FRAME_DTMF && dfr->subclass.integer == 'g') {
+ gateway->detected_v21 = 1;
+ if (ast_channel_get_t38_state(other) == T38_STATE_UNKNOWN) {
+ ast_debug(1, "detected v21 preamble from %s\n", active->name);
+ return fax_gateway_request_t38(gateway, chan, f);
} else {
- ast_debug(1, "detected CED tone on %s, but %s does not support T.38 for T.38 gateway session\n", active->name, other->name);
+ ast_debug(1, "detected v21 preamble on %s, but %s does not support T.38 for T.38 gateway session\n", active->name, other->name);
}
}
@@ -2568,6 +2585,7 @@ static struct ast_frame *fax_gateway_detect_t38(struct fax_gateway *gateway, str
if (control_params->request_response == AST_T38_REQUEST_NEGOTIATE) {
enum ast_t38_state state = ast_channel_get_t38_state(other);
+
if (state == T38_STATE_UNKNOWN) {
/* we detected a request to negotiate T.38 and the
* other channel appears to support T.38, we'll pass
@@ -2607,7 +2625,7 @@ static struct ast_frame *fax_gateway_detect_t38(struct fax_gateway *gateway, str
return &ast_null_frame;
} else if (gateway->t38_state == T38_STATE_NEGOTIATING) {
/* we got a request to negotiate T.38 after we already
- * sent one to the other party based on CED tone
+ * sent one to the other party based on v21 preamble
* detection. We'll just pretend we passed this request
* through in the first place. */
@@ -2615,12 +2633,12 @@ static struct ast_frame *fax_gateway_detect_t38(struct fax_gateway *gateway, str
gateway->t38_state = T38_STATE_UNKNOWN;
gateway->timeout_start = ast_tvnow();
- ast_debug(1, "%s is attempting to negotiate T.38 after we already sent a negotiation request based on CED detection\n", active->name);
+ ast_debug(1, "%s is attempting to negotiate T.38 after we already sent a negotiation request based on v21 preamble detection\n", active->name);
ao2_ref(details, -1);
return &ast_null_frame;
} else if (gateway->t38_state == T38_STATE_NEGOTIATED) {
/* we got a request to negotiate T.38 after we already
- * sent one to the other party based on CED tone
+ * sent one to the other party based on v21 preamble
* detection and received a response. We need to
* respond to this and shut down the gateway. */
@@ -2841,7 +2859,8 @@ static struct ast_frame *fax_gateway_framehook(struct ast_channel *chan, struct
gateway->timeout_start = ast_tvnow();
- /* we are bridged, change r/w formats to SLIN for CED detection and T.30 */
+ /* we are bridged, change r/w formats to SLIN for v21 preamble
+ * detection and T.30 */
ast_format_copy(&gateway->chan_read_format, &chan->readformat);
ast_format_copy(&gateway->chan_write_format, &chan->readformat);
@@ -2916,16 +2935,16 @@ static struct ast_frame *fax_gateway_framehook(struct ast_channel *chan, struct
return fax_gateway_detect_t38(gateway, chan, peer, active, f);
}
- /* not in gateway mode yet, listen for CED */
- /* XXX this should detect a v21 preamble instead of CED */
- if (gateway->t38_state == T38_STATE_UNAVAILABLE && f->frametype == AST_FRAME_VOICE) {
- return fax_gateway_detect_ced(gateway, chan, peer, active, f);
+ if (!gateway->detected_v21 && gateway->t38_state == T38_STATE_UNAVAILABLE && f->frametype == AST_FRAME_VOICE) {
+ /* not in gateway mode and have not detected v21 yet, listen
+ * for v21 */
+ return fax_gateway_detect_v21(gateway, chan, peer, active, f);
}
/* in gateway mode, gateway some packets */
if (gateway->t38_state == T38_STATE_NEGOTIATED) {
/* framehooks are called in __ast_read() before frame format
- * translation is does, so we need to translate here */
+ * translation is done, so we need to translate here */
if ((f->frametype == AST_FRAME_VOICE) && (f->subclass.format.id != AST_FORMAT_SLINEAR)) {
if (active->readtrans && (f = ast_translate(active->readtrans, f, 1)) == NULL) {
f = &ast_null_frame;
@@ -2942,6 +2961,25 @@ static struct ast_frame *fax_gateway_framehook(struct ast_channel *chan, struct
return f;
}
+ /* force silence on the line if T.38 negotiation might be taking place */
+ if (gateway->t38_state != T38_STATE_UNAVAILABLE && gateway->t38_state != T38_STATE_REJECTED) {
+ if (f->frametype == AST_FRAME_VOICE && f->subclass.format.id == AST_FORMAT_SLINEAR) {
+ short silence_buf[f->samples];
+ struct ast_frame silence_frame = {
+ .frametype = AST_FRAME_VOICE,
+ .data.ptr = silence_buf,
+ .samples = f->samples,
+ .datalen = sizeof(silence_buf),
+ };
+ ast_format_set(&silence_frame.subclass.format, AST_FORMAT_SLINEAR, 0);
+ memset(silence_buf, 0, sizeof(silence_buf));
+
+ return ast_frisolate(&silence_frame);
+ } else {
+ return &ast_null_frame;
+ }
+ }
+
return f;
}
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c
index 02657583d..296dd07a6 100644
--- a/res/res_fax_spandsp.c
+++ b/res/res_fax_spandsp.c
@@ -45,6 +45,7 @@
/*** MODULEINFO
<depend>spandsp</depend>
<depend>res_fax</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_format_attr_celt.c b/res/res_format_attr_celt.c
new file mode 100644
index 000000000..de3de8c40
--- /dev/null
+++ b/res/res_format_attr_celt.c
@@ -0,0 +1,181 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2011, Digium, Inc.
+ *
+ * David Vossel <dvossel@digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief CELT format attribute interface
+ *
+ * \author David Vossel <dvossel@digium.com>
+ */
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/module.h"
+#include "asterisk/format.h"
+
+/*!
+ * \brief CELT attribute structure.
+ *
+ * \note The only attribute that affects compatibility here is the sample rate.
+ */
+struct celt_attr {
+ unsigned int samplerate;
+ unsigned int maxbitrate;
+ unsigned int framesize;
+};
+
+static enum ast_format_cmp_res celt_cmp(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2)
+{
+ struct celt_attr *attr1 = (struct celt_attr *) fattr1;
+ struct celt_attr *attr2 = (struct celt_attr *) fattr2;
+
+ if (attr1->samplerate == attr2->samplerate) {
+ return AST_FORMAT_CMP_EQUAL;
+ }
+ return AST_FORMAT_CMP_NOT_EQUAL;
+}
+
+static int celt_get_val(const struct ast_format_attr *fattr, int key, void *result)
+{
+ const struct celt_attr *attr = (struct celt_attr *) fattr;
+ int *val = result;
+
+ switch (key) {
+ case CELT_ATTR_KEY_SAMP_RATE:
+ *val = attr->samplerate;
+ break;
+ case CELT_ATTR_KEY_MAX_BITRATE:
+ *val = attr->maxbitrate;
+ break;
+ case CELT_ATTR_KEY_FRAME_SIZE:
+ *val = attr->framesize;
+ break;
+ default:
+ return -1;
+ ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ }
+ return 0;
+}
+
+static int celt_isset(const struct ast_format_attr *fattr, va_list ap)
+{
+ enum celt_attr_keys key;
+ const struct celt_attr *attr = (struct celt_attr *) fattr;
+
+ for (key = va_arg(ap, int);
+ key != AST_FORMAT_ATTR_END;
+ key = va_arg(ap, int))
+ {
+ switch (key) {
+ case CELT_ATTR_KEY_SAMP_RATE:
+ if (attr->samplerate != (va_arg(ap, int))) {
+ return -1;
+ }
+ break;
+ case CELT_ATTR_KEY_MAX_BITRATE:
+ if (attr->maxbitrate != (va_arg(ap, int))) {
+ return -1;
+ }
+ break;
+ case CELT_ATTR_KEY_FRAME_SIZE:
+ if (attr->framesize != (va_arg(ap, int))) {
+ return -1;
+ }
+ break;
+ default:
+ return -1;
+ ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ }
+ }
+ return 0;
+}
+static int celt_getjoint(const struct ast_format_attr *fattr1, const struct ast_format_attr *fattr2, struct ast_format_attr *result)
+{
+ struct celt_attr *attr1 = (struct celt_attr *) fattr1;
+ struct celt_attr *attr2 = (struct celt_attr *) fattr2;
+ struct celt_attr *attr_res = (struct celt_attr *) result;
+
+ /* sample rate is the only attribute that has any bearing on if joint capabilities exist or not */
+ if (attr1->samplerate != attr2->samplerate) {
+ return -1;
+ }
+ /* either would work, they are guaranteed the same at this point. */
+ attr_res->samplerate = attr1->samplerate;
+ /* Take the lowest max bitrate */
+ attr_res->maxbitrate = MIN(attr1->maxbitrate, attr2->maxbitrate);
+
+ attr_res->framesize = attr2->framesize; /* TODO figure out what joint framesize means */
+ return 0;
+}
+
+static void celt_set(struct ast_format_attr *fattr, va_list ap)
+{
+ enum celt_attr_keys key;
+ struct celt_attr *attr = (struct celt_attr *) fattr;
+
+ for (key = va_arg(ap, int);
+ key != AST_FORMAT_ATTR_END;
+ key = va_arg(ap, int))
+ {
+ switch (key) {
+ case CELT_ATTR_KEY_SAMP_RATE:
+ attr->samplerate = (va_arg(ap, int));
+ break;
+ case CELT_ATTR_KEY_MAX_BITRATE:
+ attr->maxbitrate = (va_arg(ap, int));
+ break;
+ case CELT_ATTR_KEY_FRAME_SIZE:
+ attr->framesize = (va_arg(ap, int));
+ break;
+ default:
+ ast_log(LOG_WARNING, "unknown attribute type %d\n", key);
+ }
+ }
+}
+
+static struct ast_format_attr_interface celt_interface = {
+ .id = AST_FORMAT_CELT,
+ .format_attr_cmp = celt_cmp,
+ .format_attr_get_joint = celt_getjoint,
+ .format_attr_set = celt_set,
+ .format_attr_isset = celt_isset,
+ .format_attr_get_val = celt_get_val,
+};
+
+static int load_module(void)
+{
+ if (ast_format_attr_reg_interface(&celt_interface)) {
+ return AST_MODULE_LOAD_DECLINE;
+ }
+
+ return AST_MODULE_LOAD_SUCCESS;
+}
+
+static int unload_module(void)
+{
+ ast_format_attr_unreg_interface(&celt_interface);
+ return 0;
+}
+
+AST_MODULE_INFO(ASTERISK_GPL_KEY, AST_MODFLAG_LOAD_ORDER, "CELT Format Attribute Module",
+ .load = load_module,
+ .unload = unload_module,
+ .load_pri = AST_MODPRI_CHANNEL_DEPEND,
+);
diff --git a/formats/format_attr_silk.c b/res/res_format_attr_silk.c
index 49122fe80..49122fe80 100644
--- a/formats/format_attr_silk.c
+++ b/res/res_format_attr_silk.c
diff --git a/res/res_http_post.c b/res/res_http_post.c
index 0f2373730..3dde6484d 100644
--- a/res/res_http_post.c
+++ b/res/res_http_post.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>gmime</depend>
+ <support_level>core</support_level>
***/
@@ -37,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <sys/stat.h>
#include <fcntl.h>
#include <gmime/gmime.h>
-#if defined (__OpenBSD__) || defined(__FreeBSD__)
+#if defined (__OpenBSD__) || defined(__FreeBSD__) || defined(__Darwin__)
#include <libgen.h>
#endif
diff --git a/res/res_jabber.c b/res/res_jabber.c
index 61d436a92..46229520a 100644
--- a/res/res_jabber.c
+++ b/res/res_jabber.c
@@ -33,6 +33,7 @@
/*** MODULEINFO
<depend>iksemel</depend>
<use type="external">openssl</use>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_limit.c b/res/res_limit.c
index a6b4fef64..dc07a4caf 100644
--- a/res/res_limit.c
+++ b/res/res_limit.c
@@ -18,6 +18,9 @@
* \author Tilghman Lesher <res_limit_200607@the-tilghman.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/res/res_monitor.c b/res/res_monitor.c
index d508da13a..61dc4a2d0 100644
--- a/res/res_monitor.c
+++ b/res/res_monitor.c
@@ -22,6 +22,10 @@
*
* \author Mark Spencer <markster@digium.com>
*/
+
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
#include "asterisk.h"
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c
index cc98543c6..4a052d43d 100644
--- a/res/res_musiconhold.c
+++ b/res/res_musiconhold.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<conflict>win32</conflict>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_mutestream.c b/res/res_mutestream.c
index 41b2fd831..92d01c7c7 100644
--- a/res/res_mutestream.c
+++ b/res/res_mutestream.c
@@ -29,6 +29,10 @@
* When we know and understands what happens if we zero out video, we can do that too.
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 89545 $")
diff --git a/res/res_odbc.c b/res/res_odbc.c
index b1e72ac8d..1770bb303 100644
--- a/res/res_odbc.c
+++ b/res/res_odbc.c
@@ -33,6 +33,7 @@
/*** MODULEINFO
<depend>generic_odbc</depend>
<depend>ltdl</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c
index 24d7b6505..c6dc009ea 100644
--- a/res/res_phoneprov.c
+++ b/res/res_phoneprov.c
@@ -26,6 +26,10 @@
* \author Terry Wilson <twilson@digium.com>
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
#include <sys/ioctl.h>
diff --git a/res/res_pktccops.c b/res/res_pktccops.c
index 33ecc3817..0572658ac 100644
--- a/res/res_pktccops.c
+++ b/res/res_pktccops.c
@@ -32,6 +32,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_realtime.c b/res/res_realtime.c
index 1bafe52b7..8b1488fe4 100644
--- a/res/res_realtime.c
+++ b/res/res_realtime.c
@@ -27,6 +27,10 @@
* \ingroup applications
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_rtp_asterisk.c b/res/res_rtp_asterisk.c
index 60f7edacf..06af4832d 100644
--- a/res/res_rtp_asterisk.c
+++ b/res/res_rtp_asterisk.c
@@ -28,6 +28,10 @@
* \ingroup rtp_engines
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
@@ -143,6 +147,7 @@ struct ast_rtp {
unsigned int dtmf_duration; /*!< Total duration in samples since the digit start event */
unsigned int dtmf_timeout; /*!< When this timestamp is reached we consider END frame lost and forcibly abort digit */
unsigned int dtmfsamples;
+ enum ast_rtp_dtmf_mode dtmfmode;/*!< The current DTMF mode of the RTP stream */
/* DTMF Transmission Variables */
unsigned int lastdigitts;
char sending_digit; /*!< boolean - are we sending digits */
@@ -256,6 +261,8 @@ static int ast_rtp_destroy(struct ast_rtp_instance *instance);
static int ast_rtp_dtmf_begin(struct ast_rtp_instance *instance, char digit);
static int ast_rtp_dtmf_end(struct ast_rtp_instance *instance, char digit);
static int ast_rtp_dtmf_end_with_duration(struct ast_rtp_instance *instance, char digit, unsigned int duration);
+static int ast_rtp_dtmf_mode_set(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode);
+static enum ast_rtp_dtmf_mode ast_rtp_dtmf_mode_get(struct ast_rtp_instance *instance);
static void ast_rtp_update_source(struct ast_rtp_instance *instance);
static void ast_rtp_change_source(struct ast_rtp_instance *instance);
static int ast_rtp_write(struct ast_rtp_instance *instance, struct ast_frame *frame);
@@ -282,6 +289,8 @@ static struct ast_rtp_engine asterisk_rtp_engine = {
.dtmf_begin = ast_rtp_dtmf_begin,
.dtmf_end = ast_rtp_dtmf_end,
.dtmf_end_with_duration = ast_rtp_dtmf_end_with_duration,
+ .dtmf_mode_set = ast_rtp_dtmf_mode_set,
+ .dtmf_mode_get = ast_rtp_dtmf_mode_get,
.update_source = ast_rtp_update_source,
.change_source = ast_rtp_change_source,
.write = ast_rtp_write,
@@ -530,6 +539,19 @@ static int ast_rtp_destroy(struct ast_rtp_instance *instance)
return 0;
}
+static int ast_rtp_dtmf_mode_set(struct ast_rtp_instance *instance, enum ast_rtp_dtmf_mode dtmf_mode)
+{
+ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
+ rtp->dtmfmode = dtmf_mode;
+ return 0;
+}
+
+static enum ast_rtp_dtmf_mode ast_rtp_dtmf_mode_get(struct ast_rtp_instance *instance)
+{
+ struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
+ return rtp->dtmfmode;
+}
+
static int ast_rtp_dtmf_begin(struct ast_rtp_instance *instance, char digit)
{
struct ast_rtp *rtp = ast_rtp_instance_get_data(instance);
@@ -1254,6 +1276,7 @@ static int ast_rtp_write(struct ast_rtp_instance *instance, struct ast_frame *fr
case AST_FORMAT_SPEEX16:
case AST_FORMAT_SPEEX32:
case AST_FORMAT_SILK:
+ case AST_FORMAT_CELT:
case AST_FORMAT_G723_1:
case AST_FORMAT_SIREN7:
case AST_FORMAT_SIREN14:
diff --git a/res/res_rtp_multicast.c b/res/res_rtp_multicast.c
index 0e930d61f..18256e90e 100644
--- a/res/res_rtp_multicast.c
+++ b/res/res_rtp_multicast.c
@@ -28,6 +28,10 @@
* \ingroup rtp_engines
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_security_log.c b/res/res_security_log.c
index 2e3d4af52..3e8c48a24 100644
--- a/res/res_security_log.c
+++ b/res/res_security_log.c
@@ -27,6 +27,10 @@
* \todo Escape quotes in string payload IE contents
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
diff --git a/res/res_smdi.c b/res/res_smdi.c
index 3c1ce4c97..e0bde6959 100644
--- a/res/res_smdi.c
+++ b/res/res_smdi.c
@@ -31,6 +31,10 @@
* polling thread handle it.
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_snmp.c b/res/res_snmp.c
index 4bf81a2f0..f717cead0 100644
--- a/res/res_snmp.c
+++ b/res/res_snmp.c
@@ -19,6 +19,7 @@
/*** MODULEINFO
<depend>netsnmp</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_speech.c b/res/res_speech.c
index 7a8d17e5a..de0c41e08 100644
--- a/res/res_speech.c
+++ b/res/res_speech.c
@@ -23,6 +23,10 @@
* \author Joshua Colp <jcolp@digium.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
diff --git a/res/res_srtp.c b/res/res_srtp.c
index 3e9525afd..223b79bbb 100644
--- a/res/res_srtp.c
+++ b/res/res_srtp.c
@@ -29,7 +29,8 @@
*/
/*** MODULEINFO
- <depend>srtp</depend>
+ <depend>srtp</depend>
+ <support_level>core</support_level>
***/
/* See https://wiki.asterisk.org/wiki/display/AST/Secure+Calling */
diff --git a/res/res_stun_monitor.c b/res/res_stun_monitor.c
index 8ce77141d..64ca73eda 100644
--- a/res/res_stun_monitor.c
+++ b/res/res_stun_monitor.c
@@ -23,6 +23,10 @@
* \author David Vossel <dvossel@digium.com>
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
diff --git a/res/res_timing_dahdi.c b/res/res_timing_dahdi.c
index 41f74f6c9..61dda6a44 100644
--- a/res/res_timing_dahdi.c
+++ b/res/res_timing_dahdi.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>dahdi</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_timing_kqueue.c b/res/res_timing_kqueue.c
index 1fef5fb99..57091bf41 100644
--- a/res/res_timing_kqueue.c
+++ b/res/res_timing_kqueue.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<depend>kqueue</depend>
<conflict>launchd</conflict>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/res/res_timing_pthread.c b/res/res_timing_pthread.c
index 8cb2898d9..e89ded2d6 100644
--- a/res/res_timing_pthread.c
+++ b/res/res_timing_pthread.c
@@ -23,6 +23,10 @@
* \brief pthread timing interface
*/
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
ASTERISK_FILE_VERSION(__FILE__, "$Revision$");
diff --git a/res/res_timing_timerfd.c b/res/res_timing_timerfd.c
index 3e686f810..80e5ca8a5 100644
--- a/res/res_timing_timerfd.c
+++ b/res/res_timing_timerfd.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>timerfd</depend>
+ <support_level>core</support_level>
***/
#include "asterisk.h"
@@ -162,35 +163,7 @@ static void timerfd_timer_ack(int handle, unsigned int quantity)
uint64_t expirations;
int read_result = 0;
- struct timerfd_timer *our_timer, find_helper = {
- .handle = handle,
- };
-
- if (!(our_timer = ao2_find(timerfd_timers, &find_helper, OBJ_POINTER))) {
- ast_log(LOG_ERROR, "Couldn't find timer with handle %d\n", handle);
- return;
- }
-
- if (our_timer->saved_timer.it_value.tv_nsec == 0L) {
- ast_log(LOG_DEBUG, "Reading attempt on idle timerfd.\n");
- return;
- }
-
do {
- struct itimerspec timer_status;
-
- if (timerfd_gettime(handle, &timer_status)) {
- ast_log(LOG_ERROR, "Call to timerfd_gettime() error: %s\n", strerror(errno));
- expirations = 0;
- break;
- }
-
- if ((timer_status.it_value.tv_sec == 0) && (timer_status.it_value.tv_nsec == 0)) {
- ast_log(LOG_DEBUG, "Call to timerfd_timer_ack() with disarmed timer - break now.\n");
- expirations = 0;
- break;
- }
-
read_result = read(handle, &expirations, sizeof(expirations));
if (read_result == -1) {
if (errno == EINTR || errno == EAGAIN) {
diff --git a/sounds/Makefile b/sounds/Makefile
index 178c30c7b..9826d9fb8 100644
--- a/sounds/Makefile
+++ b/sounds/Makefile
@@ -15,19 +15,10 @@
-include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/makeopts
-# Make doesn't tolerate spaces in pathnames well. I hate to hardcode the OS X
-# path, but Make doesn't allow spaces as arguments, either.
-ifneq ($(findstring Application Support,$(ASTDATADIR)),)
-TMPDATADIR=/tmp/astdatadir
-PREFIXCMD=ln -sf "$(ASTDATADIR)/" /tmp/astdatadir
-else
-TMPDATADIR=$(ASTDATADIR)
-endif
-
CMD_PREFIX?=@
-SOUNDS_DIR:=$(DESTDIR)$(TMPDATADIR)/sounds
+SOUNDS_DIR:=$(DESTDIR)$(ASTDATADIR)/sounds
SOUNDS_CACHE_DIR?=
-MOH_DIR:=$(DESTDIR)$(TMPDATADIR)/moh
+MOH_DIR:=$(DESTDIR)$(ASTDATADIR)/moh
CORE_SOUNDS_VERSION:=1.4.21
EXTRA_SOUNDS_VERSION:=1.4.11
MOH_VERSION:=2.03
@@ -142,13 +133,7 @@ endef
endif
-all: prefixcmd $(SOUNDS_CACHE_DIR) $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
-
-prefixcmd:
- if [ -d /tmp/astdatadir ] ; then \
- rm -rf /tmp/astdatadir ; \
- fi
- @$(PREFIXCMD)
+all: $(SOUNDS_CACHE_DIR) $(CORE_SOUNDS) $(EXTRA_SOUNDS) $(MOH)
have_download:
@if test "$(DOWNLOAD)" = ":" ; then \
@@ -196,7 +181,7 @@ dist-clean:
$(SOUNDS_DIR)/en $(MOH_DIR) $(SOUNDS_DIR)/en_AU $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(SOUNDS_DIR)/ru $(SOUNDS_CACHE_DIR):
mkdir -p $@
-install: prefixcmd $(SOUNDS_CACHE_DIR) $(SOUNDS_DIR)/en $(SOUNDS_DIR)/en_AU $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(SOUNDS_DIR)/ru $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
+install: $(SOUNDS_CACHE_DIR) $(SOUNDS_DIR)/en $(SOUNDS_DIR)/en_AU $(SOUNDS_DIR)/es $(SOUNDS_DIR)/fr $(MOH_DIR) $(CORE_SOUND_TAGS) $(EXTRA_SOUND_TAGS) $(MOH_TAGS)
uninstall:
rm -rf $(SOUNDS_DIR)
diff --git a/tests/test_acl.c b/tests/test_acl.c
index 693c8054d..b84ca4364 100644
--- a/tests/test_acl.c
+++ b/tests/test_acl.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_amihooks.c b/tests/test_amihooks.c
index 2fd23a476..dfb64866b 100644
--- a/tests/test_amihooks.c
+++ b/tests/test_amihooks.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_aoc.c b/tests/test_aoc.c
index 23663ee02..2a4294300 100644
--- a/tests/test_aoc.c
+++ b/tests/test_aoc.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_app.c b/tests/test_app.c
index b4b2c22e1..75992f30f 100644
--- a/tests/test_app.c
+++ b/tests/test_app.c
@@ -26,6 +26,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_ast_format_str_reduce.c b/tests/test_ast_format_str_reduce.c
index c92245213..6723513b8 100644
--- a/tests/test_ast_format_str_reduce.c
+++ b/tests/test_ast_format_str_reduce.c
@@ -36,6 +36,7 @@
<depend>format_sln</depend>
<depend>format_wav</depend>
<depend>format_wav_gsm</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_astobj2.c b/tests/test_astobj2.c
index 12632c63a..9466f3384 100644
--- a/tests/test_astobj2.c
+++ b/tests/test_astobj2.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_db.c b/tests/test_db.c
index 105a6ab1e..95532c780 100644
--- a/tests/test_db.c
+++ b/tests/test_db.c
@@ -205,10 +205,37 @@ AST_TEST_DEFINE(gettree_deltree)
return res;
}
+AST_TEST_DEFINE(perftest)
+{
+ int res = AST_TEST_PASS;
+ size_t x;
+ char buf[10];
+
+ switch (cmd) {
+ case TEST_INIT:
+ info->name = "perftest";
+ info->category = "/main/astdb/";
+ info->summary = "astdb performance unit test";
+ info->description =
+ "Measure astdb performance";
+ return AST_TEST_NOT_RUN;
+ case TEST_EXECUTE:
+ break;
+ }
+
+ for (x = 0; x < 100000; x++) {
+ sprintf(buf, "%zu", x);
+ ast_db_put("astdbtest", buf, buf);
+ }
+ ast_db_deltree("astdbtest", NULL);
+
+ return res;
+}
static int unload_module(void)
{
AST_TEST_UNREGISTER(put_get_del);
AST_TEST_UNREGISTER(gettree_deltree);
+ AST_TEST_UNREGISTER(perftest);
return 0;
}
@@ -216,6 +243,7 @@ static int load_module(void)
{
AST_TEST_REGISTER(put_get_del);
AST_TEST_REGISTER(gettree_deltree);
+ AST_TEST_REGISTER(perftest);
return AST_MODULE_LOAD_SUCCESS;
}
diff --git a/tests/test_devicestate.c b/tests/test_devicestate.c
index 415cda271..77e718bd2 100644
--- a/tests/test_devicestate.c
+++ b/tests/test_devicestate.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_dlinklists.c b/tests/test_dlinklists.c
index 45a34eaf7..2af251f71 100644
--- a/tests/test_dlinklists.c
+++ b/tests/test_dlinklists.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_event.c b/tests/test_event.c
index e6f345133..01bb9ee4c 100644
--- a/tests/test_event.c
+++ b/tests/test_event.c
@@ -44,6 +44,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_expr.c b/tests/test_expr.c
index b4adc4aac..b7f416446 100644
--- a/tests/test_expr.c
+++ b/tests/test_expr.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_func_file.c b/tests/test_func_file.c
index 4e8823ba9..6e35fe921 100644
--- a/tests/test_func_file.c
+++ b/tests/test_func_file.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_gosub.c b/tests/test_gosub.c
index e69acfb17..f8b7482fd 100644
--- a/tests/test_gosub.c
+++ b/tests/test_gosub.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_heap.c b/tests/test_heap.c
index 3e70848d1..d14f1620f 100644
--- a/tests/test_heap.c
+++ b/tests/test_heap.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_linkedlists.c b/tests/test_linkedlists.c
new file mode 100644
index 000000000..55944570b
--- /dev/null
+++ b/tests/test_linkedlists.c
@@ -0,0 +1,215 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2011, Terry Wilson
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ *
+ * \brief Linked List Tests
+ *
+ * \author Terry Wilson <twilson@digium.com>
+ *
+ * \ingroup tests
+ */
+
+/*** MODULEINFO
+ <defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
+ ***/
+
+#include "asterisk.h"
+
+ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include "asterisk/module.h"
+#include "asterisk/test.h"
+#include "asterisk/strings.h"
+#include "asterisk/logger.h"
+#include "asterisk/linkedlists.h"
+
+struct test_val {
+ const char *name;
+ AST_LIST_ENTRY(test_val) list;
+};
+
+static struct test_val a = { "A" };
+static struct test_val b = { "B" };
+static struct test_val c = { "C" };
+static struct test_val d = { "D" };
+
+AST_LIST_HEAD_NOLOCK(test_list, test_val);
+
+static int list_expect(struct test_list *test_list, char *expect, struct ast_str **buf)
+{
+ struct test_val *i;
+
+ ast_str_reset(*buf);
+ AST_LIST_TRAVERSE(test_list, i, list) {
+ ast_str_append(buf, 0, "%s", i->name);
+ }
+
+ return strcmp(expect, ast_str_buffer(*buf));
+}
+
+#define MATCH_OR_FAIL(list, val, retbuf) \
+ if (list_expect(list, val, &retbuf)) { \
+ ast_test_status_update(test, "Expected: %s, Got: %s\n", val, ast_str_buffer(retbuf)); \
+ ast_free(retbuf); \
+ return AST_TEST_FAIL; \
+ }
+
+#define ELEM_OR_FAIL(x,y) \
+ if ((x) != (y)) { \
+ ast_test_status_update(test, "Expected: %s, Got: %s\n", (x)->name, (y)->name); \
+ return AST_TEST_FAIL; \
+ }
+
+AST_TEST_DEFINE(ll_tests)
+{
+ struct ast_str *buf;
+ struct test_list test_list = { 0, };
+ struct test_val *bogus;
+
+ switch (cmd) {
+ case TEST_INIT:
+ info->name = "ll_tests";
+ info->category = "/main/linkedlists";
+ info->summary = "linked list unit test";
+ info->description =
+ "Test the linked list API";
+ return AST_TEST_NOT_RUN;
+ case TEST_EXECUTE:
+ break;
+ }
+
+ if (!(buf = ast_str_create(16))) {
+ return AST_TEST_FAIL;
+ }
+
+ if (!(bogus = alloca(sizeof(*bogus)))) {
+ return AST_TEST_FAIL;
+ }
+
+ if (AST_LIST_REMOVE(&test_list, bogus, list)) {
+ ast_test_status_update(test, "AST_LIST_REMOVE should safely return NULL for missing element from empty list\n");
+ return AST_TEST_FAIL;
+ }
+
+ /* INSERT_HEAD and REMOVE_HEAD tests */
+ AST_LIST_INSERT_HEAD(&test_list, &a, list);
+ MATCH_OR_FAIL(&test_list, "A", buf);
+ AST_LIST_INSERT_HEAD(&test_list, &b, list);
+ MATCH_OR_FAIL(&test_list, "BA", buf);
+ AST_LIST_INSERT_HEAD(&test_list, &c, list);
+ MATCH_OR_FAIL(&test_list, "CBA", buf);
+ AST_LIST_INSERT_HEAD(&test_list, &d, list);
+ MATCH_OR_FAIL(&test_list, "DCBA", buf);
+ AST_LIST_REMOVE_HEAD(&test_list, list);
+ MATCH_OR_FAIL(&test_list, "CBA", buf);
+ AST_LIST_REMOVE_HEAD(&test_list, list);
+ MATCH_OR_FAIL(&test_list, "BA", buf);
+ AST_LIST_REMOVE_HEAD(&test_list, list);
+ MATCH_OR_FAIL(&test_list, "A", buf);
+ AST_LIST_REMOVE_HEAD(&test_list, list);
+ MATCH_OR_FAIL(&test_list, "", buf);
+
+ if (AST_LIST_REMOVE_HEAD(&test_list, list)) {
+ ast_test_status_update(test, "Somehow removed an item from the head of a list that didn't exist\n");
+ return AST_TEST_FAIL;
+ }
+
+ if (!AST_LIST_EMPTY(&test_list)) {
+ ast_test_status_update(test, "List should be empty\n");
+ return AST_TEST_FAIL;
+ }
+
+ AST_LIST_INSERT_TAIL(&test_list, &a, list);
+ MATCH_OR_FAIL(&test_list, "A", buf);
+ AST_LIST_INSERT_TAIL(&test_list, &b, list);
+ MATCH_OR_FAIL(&test_list, "AB", buf);
+ AST_LIST_INSERT_TAIL(&test_list, &c, list);
+ MATCH_OR_FAIL(&test_list, "ABC", buf);
+ AST_LIST_INSERT_TAIL(&test_list, &d, list);
+ MATCH_OR_FAIL(&test_list, "ABCD", buf);
+
+ if (AST_LIST_REMOVE(&test_list, bogus, list)) {
+ ast_test_status_update(test, "AST_LIST_REMOVE should safely return NULL for missing element\n");
+ return AST_TEST_FAIL;
+ }
+
+ bogus = NULL;
+
+ if (AST_LIST_REMOVE(&test_list, bogus, list)) {
+ ast_test_status_update(test, "AST_LIST_REMOVE should safely return NULL for element set to NULL\n");
+ return AST_TEST_FAIL;
+ }
+
+ AST_LIST_REMOVE(&test_list, &b, list);
+ MATCH_OR_FAIL(&test_list, "ACD", buf);
+ AST_LIST_REMOVE(&test_list, &d, list);
+ MATCH_OR_FAIL(&test_list, "AC", buf);
+ AST_LIST_REMOVE(&test_list, &a, list);
+ MATCH_OR_FAIL(&test_list, "C", buf);
+ AST_LIST_REMOVE(&test_list, &c, list);
+ MATCH_OR_FAIL(&test_list, "", buf);
+
+ if (!AST_LIST_EMPTY(&test_list)) {
+ ast_test_status_update(test, "List should be empty\n");
+ return AST_TEST_FAIL;
+ }
+
+ if (AST_LIST_REMOVE(&test_list, bogus, list)) {
+ ast_test_status_update(test, "AST_LIST_REMOVE should safely return NULL asked to remove a NULL pointer from an empty list\n");
+ return AST_TEST_FAIL;
+ }
+
+ AST_LIST_INSERT_HEAD(&test_list, &a, list);
+ MATCH_OR_FAIL(&test_list, "A", buf);
+ AST_LIST_INSERT_TAIL(&test_list, &b, list);
+ MATCH_OR_FAIL(&test_list, "AB", buf);
+ AST_LIST_INSERT_AFTER(&test_list, &a, &c, list);
+ MATCH_OR_FAIL(&test_list, "ACB", buf);
+ AST_LIST_INSERT_AFTER(&test_list, &b, &d, list);
+ MATCH_OR_FAIL(&test_list, "ACBD", buf);
+
+ ELEM_OR_FAIL(AST_LIST_FIRST(&test_list), &a);
+ ELEM_OR_FAIL(AST_LIST_LAST(&test_list), &d);
+ ELEM_OR_FAIL(AST_LIST_NEXT(&a, list), &c);
+
+ AST_LIST_TRAVERSE_SAFE_BEGIN(&test_list, bogus, list) {
+ AST_LIST_REMOVE_CURRENT(list);
+ }
+ AST_LIST_TRAVERSE_SAFE_END;
+
+ if (!AST_LIST_EMPTY(&test_list)) {
+ ast_test_status_update(test, "List should be empty after traversing and removal. It wasn't.\n");
+ return AST_TEST_FAIL;
+ }
+
+ return AST_TEST_PASS;
+}
+
+static int unload_module(void)
+{
+ AST_TEST_UNREGISTER(ll_tests);
+ return 0;
+}
+
+static int load_module(void)
+{
+ AST_TEST_REGISTER(ll_tests);
+ return AST_MODULE_LOAD_SUCCESS;
+}
+
+AST_MODULE_INFO_STANDARD(ASTERISK_GPL_KEY, "Test Linked Lists");
diff --git a/tests/test_locale.c b/tests/test_locale.c
index 46271c232..89148d17a 100644
--- a/tests/test_locale.c
+++ b/tests/test_locale.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_logger.c b/tests/test_logger.c
index 04b5a1058..41467ee6e 100644
--- a/tests/test_logger.c
+++ b/tests/test_logger.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_netsock2.c b/tests/test_netsock2.c
index 3bbf25770..8d7e1ebd8 100644
--- a/tests/test_netsock2.c
+++ b/tests/test_netsock2.c
@@ -69,7 +69,6 @@ AST_TEST_DEFINE(parsing)
{ "[2001::1]", 1 },
{ "[2001:0000:4136:e378:8000:63bf:3fff:fdd2]:5060", 1 },
{ "2001:0000:4136:e378:8000:63bf:3fff:fdd2:5060", 0 }, /* port, but no brackets */
- { "[fe80::200:5aee:feaa:20a2%eth0]", 1 }, /* link-local with scope id */
{ "[fe80::200::abcd", 0 }, /* multiple zero expansions */
};
@@ -101,7 +100,9 @@ AST_TEST_DEFINE(parsing)
tmp = ast_sockaddr_stringify(&addr);
ast_sockaddr_parse(&tmp_addr, tmp, 0);
if (ast_sockaddr_cmp_addr(&addr, &tmp_addr)) {
- ast_test_status_update(test, "Re-parsed stringification did not match: '%s' vs '%s'\n", ast_sockaddr_stringify(&addr), ast_sockaddr_stringify(&tmp_addr));
+ char buf[64];
+ ast_copy_string(buf, ast_sockaddr_stringify(&addr), sizeof(buf));
+ ast_test_status_update(test, "Re-parsed stringification of '%s' did not match: '%s' vs '%s'\n", test_vals[x].address, buf, ast_sockaddr_stringify(&tmp_addr));
res = AST_TEST_FAIL;
}
}
diff --git a/tests/test_pbx.c b/tests/test_pbx.c
index 3ecc9e937..a86ba36b8 100644
--- a/tests/test_pbx.c
+++ b/tests/test_pbx.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_poll.c b/tests/test_poll.c
index 815e0c6c4..bdab29142 100644
--- a/tests/test_poll.c
+++ b/tests/test_poll.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_sched.c b/tests/test_sched.c
index 0062afb09..bcd501aa0 100644
--- a/tests/test_sched.c
+++ b/tests/test_sched.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_security_events.c b/tests/test_security_events.c
index 33b40e877..c2c7c2921 100644
--- a/tests/test_security_events.c
+++ b/tests/test_security_events.c
@@ -25,6 +25,7 @@
/*** MODULEINFO
<defaultenabled>no</defaultenabled>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_skel.c b/tests/test_skel.c
index 609e399a7..98d604012 100644
--- a/tests/test_skel.c
+++ b/tests/test_skel.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_stringfields.c b/tests/test_stringfields.c
index dd3f0aaa1..2cd51ddae 100644
--- a/tests/test_stringfields.c
+++ b/tests/test_stringfields.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_strings.c b/tests/test_strings.c
index 34062f04d..b1d1205e6 100644
--- a/tests/test_strings.c
+++ b/tests/test_strings.c
@@ -29,6 +29,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_substitution.c b/tests/test_substitution.c
index aa7d14f91..eb3bb54e2 100644
--- a/tests/test_substitution.c
+++ b/tests/test_substitution.c
@@ -28,6 +28,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
<depend>func_curl</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
@@ -261,6 +262,9 @@ AST_TEST_DEFINE(test_substitution)
TEST(test_expected_result(test, c, "A${${baz}o:-2:-1}A", "A2A"));
pbx_builtin_setvar_helper(c, "list1", "ab&cd&ef");
TEST(test_expected_result(test, c, "${LISTFILTER(list1,&,cd)}", "ab&ef"));
+ TEST(test_expected_result(test, c, "${SHELL(printf '%d' 123)},${SHELL(printf '%d' 456)}", "123,456"));
+ TEST(test_expected_result(test, c, "${foo},${CDR(answer)},${SHELL(printf '%d' 456)}", "123,,456"));
+ TEST(test_expected_result(test, c, "${foo},${this_does_not_exist},${THIS_DOES_NOT_EXIST(either)}", "123,,"));
#undef TEST
/* For testing dialplan functions */
diff --git a/tests/test_time.c b/tests/test_time.c
index c81c9bb12..ae8834d94 100644
--- a/tests/test_time.c
+++ b/tests/test_time.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/tests/test_utils.c b/tests/test_utils.c
index fd9d3bc4a..3e7df97e2 100644
--- a/tests/test_utils.c
+++ b/tests/test_utils.c
@@ -27,6 +27,7 @@
/*** MODULEINFO
<depend>TEST_FRAMEWORK</depend>
+ <support_level>extended</support_level>
***/
#include "asterisk.h"
diff --git a/utils/Makefile b/utils/Makefile
index 1981fb2e2..d80a488d9 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -89,6 +89,8 @@ clean:
rm -f md5.c strcompat.c ast_expr2.c ast_expr2.h ast_expr2f.c pbx_ael.c pval.c hashtab.c lock.c
rm -f aelparse.c aelbison.c conf2ael
rm -f utils.c strings.c threadstorage.c sha1.c astobj2.c hashtest2 hashtest refcounter
+ rm -f db1-ast/.*.d
+ @$(MAKE) -C db1-ast clean
md5.c: $(ASTTOPDIR)/main/md5.c
$(ECHO_PREFIX) echo " [CP] $(subst $(ASTTOPDIR)/,,$<) -> $@"
@@ -206,6 +208,14 @@ muted: muted.o
muted: LIBS+=$(AUDIO_LIBS)
muted: _ASTCFLAGS:=$(filter-out -Werror,$(_ASTCFLAGS))
+CHECK_SUBDIR: # do nothing, just make sure that we recurse in the subdir/
+db1-ast/libdb1.a: CHECK_SUBDIR
+ _ASTCFLAGS="$(_ASTCFLAGS) -Wno-strict-aliasing" ASTCFLAGS="$(ASTCFLAGS)" $(MAKE) -C db1-ast libdb1.a
+
+astdb2sqlite3: LIBS+=$(SQLITE3_LIB)
+astdb2sqlite3: _ASTCFLAGS+=$(SQLITE3_INCLUDE)
+astdb2sqlite3: db1-ast/libdb1.a
+
ifneq ($(wildcard .*.d),)
include .*.d
endif
diff --git a/utils/ael_main.c b/utils/ael_main.c
index e5a7346ed..52aa47993 100644
--- a/utils/ael_main.c
+++ b/utils/ael_main.c
@@ -6,6 +6,11 @@
* it was copied from;
* - fixing the formatting
*/
+
+/*** MODULEINFO
+ <support_level>extended</support_level>
+ ***/
+
#include "asterisk.h"
#include <locale.h>
diff --git a/utils/astcanary.c b/utils/astcanary.c
index 8cfa3feb7..9432c57a7 100644
--- a/utils/astcanary.c
+++ b/utils/astcanary.c
@@ -16,6 +16,10 @@
* at the top of the source tree.
*/
+/*** MODULEINFO
+ <support_level>core</support_level>
+ ***/
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
diff --git a/utils/astdb2sqlite3.c b/utils/astdb2sqlite3.c
new file mode 100644
index 000000000..b0751dc3b
--- /dev/null
+++ b/utils/astdb2sqlite3.c
@@ -0,0 +1,231 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 1999 - 2005, Digium, Inc.
+ *
+ * Mark Spencer <markster@digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*! \file
+ *
+ * \brief Berekeley DB to SQLite3 converter
+ *
+ * \author Terry Wilson <twilson@digium.com>
+ */
+
+#include "asterisk.h"
+
+//ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sqlite3.h>
+#include <libgen.h> /* OS X doesn't have the basename function in strings.h */
+
+#include "db1-ast/include/db.h"
+
+#define MAX_DB_FIELD 256
+#define MIN(a,b) \
+({ typeof (a) _a = (a); \
+ typeof (b) _b = (b); \
+ a < _b ? _a : _b; })
+
+static sqlite3 *astdb;
+
+#define DEFINE_SQL_STATEMENT(stmt,sql) static sqlite3_stmt *stmt; \
+ const char stmt##_sql[] = sql;
+
+DEFINE_SQL_STATEMENT(put_stmt, "INSERT OR REPLACE INTO astdb (key, value) VALUES (?, ?)")
+DEFINE_SQL_STATEMENT(create_astdb_stmt, "CREATE TABLE IF NOT EXISTS astdb(key VARCHAR(256), value VARCHAR(256), PRIMARY KEY(key))")
+
+static int db_execute_transaction_sql(const char *sql)
+{
+ char *errmsg = NULL;
+ int res =0;
+
+ sqlite3_exec(astdb, sql, NULL, NULL, &errmsg);
+ if (errmsg) {
+ fprintf(stderr, "Error executing SQL: %s\n", errmsg);
+ sqlite3_free(errmsg);
+ res = -1;
+ }
+
+ return res;
+}
+
+static int ast_db_begin_transaction(void)
+{
+ return db_execute_transaction_sql("BEGIN TRANSACTION");
+}
+
+static int ast_db_commit_transaction(void)
+{
+ return db_execute_transaction_sql("COMMIT");
+}
+
+static int ast_db_rollback_transaction(void)
+{
+ return db_execute_transaction_sql("ROLLBACK");
+}
+
+static int db_put_raw(const char *key, size_t keylen, const char *value, size_t valuelen)
+{
+ int res = 0;
+
+ if (sqlite3_bind_text(put_stmt, 1, key, keylen, SQLITE_STATIC) != SQLITE_OK) {
+ fprintf(stderr, "Couldn't bind key to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_bind_text(put_stmt, 2, value, valuelen, SQLITE_STATIC) != SQLITE_OK) {
+ fprintf(stderr, "Couldn't bind value to stmt: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ } else if (sqlite3_step(put_stmt) != SQLITE_DONE) {
+ fprintf(stderr, "Couldn't execute statment: %s\n", sqlite3_errmsg(astdb));
+ res = -1;
+ }
+ sqlite3_reset(put_stmt);
+
+ return res;
+}
+
+static int convert_bdb_to_sqlite3(const char *bdb_dbname)
+{
+ DB *bdb;
+ DBT key = { 0, }, value = { 0, }, last_key = { 0, };
+ int res, last = 0;
+ char last_key_s[MAX_DB_FIELD];
+
+ if (!(bdb = dbopen(bdb_dbname, O_RDONLY, AST_FILE_MODE, DB_BTREE, NULL))) {
+ fprintf(stderr, "Unable to open Asterisk database '%s'\n", bdb_dbname);
+ return -1;
+ }
+
+ if (bdb->seq(bdb, &last_key, &value, R_LAST)) {
+ /* Empty database */
+ return 0;
+ }
+
+ memcpy(last_key_s, last_key.data, MIN(last_key.size - 1, sizeof(last_key_s)));
+ last_key_s[last_key.size - 1] = '\0';
+ for (res = bdb->seq(bdb, &key, &value, R_FIRST);
+ !res; res = bdb->seq(bdb, &key, &value, R_NEXT)) {
+ last = !strcmp(key.data, last_key_s);
+ db_put_raw((const char *) key.data, key.size - 1, (const char *) value.data, value.size - 1);
+ if (last) {
+ break;
+ }
+ }
+
+ bdb->close(bdb);
+
+ return 0;
+}
+
+static int init_stmt(sqlite3_stmt **stmt, const char *sql, size_t len)
+{
+ if (sqlite3_prepare(astdb, sql, len, stmt, NULL) != SQLITE_OK) {
+ fprintf(stderr, "Couldn't prepare statement '%s': %s\n", sql, sqlite3_errmsg(astdb));
+ return -1;
+ }
+
+ return 0;
+}
+
+static int db_create_astdb(void)
+{
+ if (init_stmt(&create_astdb_stmt, create_astdb_stmt_sql, sizeof(create_astdb_stmt_sql))) {
+ return -1;
+ }
+
+ ast_db_begin_transaction();
+ if (sqlite3_step(create_astdb_stmt) != SQLITE_DONE) {
+ fprintf(stderr, "Couldn't create astdb table: %s\n", sqlite3_errmsg(astdb));
+ ast_db_rollback_transaction();
+ sqlite3_reset(create_astdb_stmt);
+ return -1;
+ }
+
+ ast_db_commit_transaction();
+ sqlite3_reset(create_astdb_stmt);
+
+ return 0;
+}
+
+static int init_statements(void)
+{
+ /* Don't initialize create_astdb_statment here as the astdb table needs to exist
+ * brefore these statments can be initialized */
+ return init_stmt(&put_stmt, put_stmt_sql, sizeof(put_stmt_sql));
+}
+
+static int db_open(const char *dbname)
+{
+ if (sqlite3_open(dbname, &astdb) != SQLITE_OK) {
+ fprintf(stderr, "Unable to open Asterisk database '%s': %s\n", dbname, sqlite3_errmsg(astdb));
+ sqlite3_close(astdb);
+ return -1;
+ }
+
+ return 0;
+}
+
+static int sql_db_init(const char *dbname)
+{
+ if (db_open(dbname) || db_create_astdb() || init_statements()) {
+ return -1;
+ }
+
+ return 0;
+}
+
+int main(int argc, char *argv[])
+{
+ char *dbname;
+ struct stat dont_care;
+
+ if (argc != 2) {
+ fprintf(stderr, "%s takes the path of astdb as its only argument\n", basename(argv[0]));
+ exit(-1);
+ }
+
+ if (stat(argv[1], &dont_care)) {
+ fprintf(stderr, "Unable to open %s: %s\n", argv[1], strerror(errno));
+ exit(-1);
+ }
+
+ if (!(dbname = alloca(strlen(argv[1]) + sizeof(".sqlite3")))) {
+ exit(-1);
+ }
+
+ strcpy(dbname, argv[1]);
+ strcat(dbname, ".sqlite3");
+
+ if (!stat(dbname, &dont_care)) {
+ fprintf(stderr, "%s already exists!\n", dbname);
+ exit(-1);
+ }
+
+ if (sql_db_init(dbname)) {
+ exit(-1);
+ }
+
+ if (convert_bdb_to_sqlite3(argv[1])) {
+ fprintf(stderr, "Database conversion failed!\n");