ModuleSupport LevelDeprecated InRemoved InDependencies
chan_pjsipcorepjproject, res_pjsip, res_pjsip_pubsub, res_pjsip_session, pjproject, res_pjsip, res_pjsip_pubsub, res_pjsip_session
chan_rtpcoreres_rtp_multicast, res_rtp_multicast
config_parserdeprecated
utilsdeprecated
reqresp_parserdeprecated
routedeprecated
security_eventsdeprecated
dialplan_functionsdeprecated
console_videoextended
chan_ossdeprecated1619oss, oss
chan_nbsdeprecated1619nbs, nbs
sig_ss7core
chan_iax2core
chan_audiosocketextendedres_audiosocket, res_audiosocket
chan_bridge_mediacore
vgrabbersextended
chan_mgcpextended1921
chan_misdndeprecated1619isdnnet, misdn, suppserv, isdnnet, misdn, suppserv
console_guiextended
chan_phonedeprecated1619ixjuser, ixjuser
chan_consoleextendedportaudio, portaudio
chan_dahdicoredahdi, tonezone, dahdi, tonezone
console_boardextended
chan_unistimextended
chan_sipdeprecated1721
ieextended
portinfoextended
isdn_libextended
isdn_msg_parserextended
chan_alsaextended1921alsa, alsa
bridge_native_dahdicore
dialplan_functionscore
sig_analogcore
chan_skinnyextended1921
vcodecsextended
sig_pricore
provisioncore
codec_prefcore
parsercore
format_compatibilitycore
netsockcore
firmwarecore
chan_motifcoreiksemel, res_xmpp, iksemel, res_xmpp
misdn_configextended
pbx_spoolcore
pbx_realtimeextended
pbx_loopbackcore
pbx_aelextendedres_ael_share, res_ael_share
pbx_configcore
pbx_dundiextendedzlib, zlib
dundi-parserextended
pbx_luaextendedlua, lua
app_macrodeprecated1621
app_dialcore
app_speech_utilscoreres_speech, res_speech
app_execcore
app_senddtmfcore
app_stream_echocore
app_readcore
app_skelcore
app_minivmextended
app_getcpeiddeprecatedres_adsi, res_adsi
app_jackextendedjack, resample, jack, resample
app_directorycore
app_memoryextended
app_audiosocketextendedres_audiosocket, res_audiosocket
app_agent_poolcore
app_dbcore
app_softhangupcore
app_dumpchancore
app_celgenusereventcore
app_milliwattcore
app_transfercore
app_flashcoredahdi, dahdi
app_waitforsilenceextended
app_followmecore
app_statsdextendedres_statsd, res_statsd
app_sendtextcore
func_dbchanextended
app_controlplaybackcore
app_sayunixtimecore
app_saycountedextended
app_adsiprogdeprecatedres_adsi, res_adsi
app_usereventcore
app_mailextended
app_mp3extended
app_stasiscoreres_stasis, res_stasis
app_verbosecore
app_imagedeprecated1619
app_echocore
app_nbscatdeprecated1619
app_privacycore
app_directed_pickupcore
app_waitforringextended
app_ivrdemoextended
app_bridgeaddchancore
app_bridgewaitcorebridge_holding, bridge_holding
app_tddextendedspandsp, spandsp
app_assertextended
app_testextended
app_zapatellerextended
app_amdextended
app_icesdeprecated1619
app_urldeprecated1619
app_queuecore
app_originatecore
app_authenticatecore
app_mfextended
app_ifextended
app_meetmeextended1921dahdi, dahdi
app_whilecore
app_dictateextended
app_softmodemextendedspandsp, spandsp
app_channelredirectcore
app_cdrcore
conf_state_multicore
conf_state_inactivecore
conf_state_single_markedcore
conf_state_multi_markedcore
conf_state_singlecore
conf_statecore
conf_state_emptycore
conf_config_parsercore
app_smsextended
app_stackcore
app_morsecodeextended
app_faxdeprecated1619spandsp, spandsp
app_talkdetectcore
app_readextencore
app_dtmfstoreextended
app_recordcore
app_playbackcore
app_attended_transferextended
app_mixmonitorcore
app_alarmreceiverextended
app_dialtoneextended
app_frameextended
app_pagecoreapp_confbridge, app_confbridge
app_confbridgecore
app_forkcdrcore
app_waituntilcore
app_tonetestextended
app_chanisavailextended
app_systemcore
app_disacore
app_playtonescore
app_reloadextended
app_chanspycore
app_dahdirasdeprecated1619dahdi, dahdi
app_osplookupextended1921osptk, openssl, osptk, openssl
app_streamsilenceextended
app_festivalextended
app_waitforcondextended
app_externalivrextended
app_blind_transferextended
codec_a_mucore
codec_alawcore
codec_speexcorespeex, speex_preprocess, speex, speex_preprocess
codec_dahdicoredahdi, dahdi
codec_ulawcore
codec_resamplecore
codec_g726core
codec_lpc10core
codec_ilbccore
codec_gsmcoregsm, gsm
codec_g722core
codec_codec2corecodec2, codec2
codec_adpcmcore
format_g719core
format_ogg_vorbiscorevorbis, ogg, vorbis, ogg
format_voxextended
format_wavcore
format_g726core
format_g723core
format_h264core
format_wav_gsmcore
format_ilbccore
format_siren7core
format_gsmcore
format_pcmcore
format_slncore
format_siren14core
format_g729core
format_ogg_speexextendedspeex, ogg, speex, ogg
format_h263core
cdr_managercore
cdr_tdsextendedfreetds, freetds
cdr_odbcextendedres_odbc, generic_odbc, res_odbc, generic_odbc
cdr_beanstalkdextendedbeanstalk, beanstalk
cdr_sqlite3_customextendedsqlite3, sqlite3
cdr_csvextended
cdr_customcore
cdr_adaptive_odbccoreres_odbc, generic_odbc, res_odbc, generic_odbc
cdr_radiusextendedradius, radius
cdr_pgsqlextendedpgsql, pgsql
cdr_syslogdeprecated1619syslog, syslog
cel_beanstalkdextendedbeanstalk, beanstalk
cel_tdsextendedfreetds, freetds
cel_radiusextendedradius, radius
cel_customcore
cel_managercore
cel_sqlite3_customextendedsqlite3, sqlite3
cel_odbccoreres_odbc, generic_odbc, res_odbc, generic_odbc
cel_pgsqlextendedpgsql, pgsql
bridge_builtin_featurescore
bridge_native_rtpcore
bridge_builtin_interval_featurescore
bridge_softmixcore
bridge_holdingcore
bridge_simplecore
func_frame_traceextended
func_stringscore
func_frame_dropextended
func_evalextenextended
func_extstatecore
func_odbccoreres_odbc, generic_odbc, res_odbc, generic_odbc
func_base64core
func_talkdetectcore
func_pjsip_contactcorepjproject, res_pjsip, pjproject, res_pjsip
func_logiccore
func_scrambleextended
func_randcore
func_holdinterceptcore
func_configcore
func_dialgroupcore
func_blacklistcore
func_pjsip_aorcorepjproject, res_pjsip, pjproject, res_pjsip
func_presencestatecore
func_timeoutcore
func_mathcore
func_ochannelextended
func_sorcerycore
func_sprintfcore
func_dbcore
func_globalcore
func_jsonextended
func_sayfilesextended
func_channelcore
func_periodic_hookcoreapp_chanspy, func_cut, func_groupcount, func_uri, app_chanspy, func_cut, func_groupcount, func_uri
func_calleridcore
func_jitterbuffercore
func_cutcore
func_notchfilterextended
func_envcore
func_dialplancore
func_modulecore
func_speexcorespeex, speex_preprocess, speex, speex_preprocess
func_uricore
func_devstatecore
func_volumecore
func_sysinfocore
func_hangupcausecore
func_enumcore
func_shellcore
func_md5core
func_cdrcore
func_aescoreres_crypto, crypto, res_crypto, crypto
func_vmcountcore
func_curlcoreres_curl, curl, res_curl, curl
func_callcompletioncore
func_groupcountcore
func_sha1core
func_realtimecore
func_pitchshiftextended
func_pjsip_endpointcorepjproject, res_pjsip, pjproject, res_pjsip
func_lockcore
func_iconvcoreiconv, iconv
func_srvcore
func_versioncore
test_gosubcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_astobj2_thrashcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_media_cachecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stasis_endpointscoreTEST_FRAMEWORK, res_stasis_test, TEST_FRAMEWORK, res_stasis_test
test_threadpoolcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_channelcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_websocket_clientcoreTEST_FRAMEWORK, res_http_websocket, TEST_FRAMEWORK, res_http_websocket
test_calleridcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_dnscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_heapcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_aclcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_aricoreTEST_FRAMEWORK, res_ari, TEST_FRAMEWORK, res_ari
test_jsoncoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_bucketcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_loggercoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_exprcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_optional_apicoreTEST_FRAMEWORK, OPTIONAL_API, TEST_FRAMEWORK, OPTIONAL_API
test_timecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stringfieldscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_sorcery_realtimecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_dns_srvcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_hashtab_thrashcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_core_codeccoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_eventcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_streamcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_configcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_jitterbufcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stasis_channelscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_sorcery_astdbcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_filecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_endpointscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_format_cachecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_netsock2coreTEST_FRAMEWORK, TEST_FRAMEWORK
test_func_filecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_security_eventscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_devicestatecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_cdrcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_ast_format_str_reducecoreTEST_FRAMEWORK, format_g723, format_g726, format_g729, format_gsm, format_ogg_vorbis, format_pcm, format_siren14, format_siren7, format_sln, format_wav, format_wav_gsm, TEST_FRAMEWORK, format_g723, format_g726, format_g729, format_gsm, format_ogg_vorbis, format_pcm, format_siren14, format_siren7, format_sln, format_wav, format_wav_gsm
test_dns_naptrcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_dns_recurringcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_conversionscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stasis_statecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_mwicoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_res_prometheusextendedTEST_FRAMEWORK, res_prometheus, curl, TEST_FRAMEWORK, res_prometheus, curl
test_aoccoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_format_capcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_vectorcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_dns_query_setcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_celcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_ari_modelcoreTEST_FRAMEWORK, res_ari_model, TEST_FRAMEWORK, res_ari_model
test_astobj2_weakencoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_xml_escapecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_channel_feature_hookscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_named_lockcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_abstract_jbcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_localecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_http_media_cachecoreTEST_FRAMEWORK, curl, res_http_media_cache, TEST_FRAMEWORK, curl, res_http_media_cache
test_res_pjsip_schedulercoreTEST_FRAMEWORK, pjproject, res_pjsip, TEST_FRAMEWORK, pjproject, res_pjsip
test_astobj2coreTEST_FRAMEWORK, TEST_FRAMEWORK
test_res_rtpcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_messagecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_core_formatcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_res_pjsip_session_capscoreTEST_FRAMEWORK, pjproject, res_pjsip, res_pjsip_session, TEST_FRAMEWORK, pjproject, res_pjsip, res_pjsip_session
test_uricoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_voicemail_apicoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stasiscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_linkedlistscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_skelcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_sorcery_memory_cache_thrashcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_bridgingcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_taskprocessorcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_pbxcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_stringscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_schedcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_sorcerycoreTEST_FRAMEWORK, func_sorcery, TEST_FRAMEWORK, func_sorcery
test_scope_tracecoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_uuidcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_utilscoreTEST_FRAMEWORK, res_agi, res_crypto, crypto, TEST_FRAMEWORK, res_agi, res_crypto, crypto
test_dbcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_data_buffercoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_res_stasiscoreTEST_FRAMEWORK, res_stasis, TEST_FRAMEWORK, res_stasis
test_substitutioncoreTEST_FRAMEWORK, func_curl, TEST_FRAMEWORK, func_curl
test_pollcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_scoped_lockcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_dlinklistscoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_appcoreTEST_FRAMEWORK, TEST_FRAMEWORK
test_amihookscoreTEST_FRAMEWORK, TEST_FRAMEWORK
codeccore
timecore
rtp_enginecore
plccore
fskmodem_intcore
strcompatcore
tddcore
conversionscore
stasis_messagecore
framecore
pbx_functionscore
utilscore
bridge_rolescore
ulawcore
privacycore
filecore
testcore
streamcore
devicestatecore
aclcore
jitterbufcore
pbx_switchcore
endpointscore
stasis_statecore
enumcore
formatcore
utf8core
celcore
presencestatecore
clicore
eventcore
channelcore
asteriskcore
dns_tlsacore
sorcerycore
optionscore
dspcore
core_unrealcore
pbxcore
pbx_includecore
pbx_swcore
chanvarscore
httpcore
dns_testcore
heapcore
ccsscore
saycore
pbx_timingcore
dbcore
schedcore
smoothercore
cdrcore
bridge_aftercore
dns_query_setcore
astobj2core
localtimecore
aoccore
stasiscore
autoservicecore
xmlcore
syslogcore
abstract_jbcore
security_eventscore
appcore
stasis_cachecore
xmldoccore
calleridcore
dns_corecore
dns_naptrcore
stringscore
dnscore
bucketcore
config_optionscore
srvcore
mixmonitorcore
fskmodemcore
featurescore
soundscore
sdp_srtpcore
dns_txtcore
bridgecore
fixedjitterbufcore
udptlcore
imagecore
pbx_appcore
stasis_endpointscore
format_cachecore
stuncore
cryptcore
hashtabcore
audiohookcore
pbx_ignorepatcore
timingcore
configcore
taskprocessorcore
format_capcore
termcore
jsoncorejansson, jansson
stasis_cache_patterncore
translatecore
media_cachecore
format_compatibilitycore
pbx_variablescore
stasis_message_routercore
channel_internal_apicore
autochancore
codec_builtincore
global_datastorescore
astmmcore
backtracecore
messagecore
dns_srvcore
astfdcore
core_localcore
stasis_channelscore
astobj2_globalcore
loggercore
managercore
stasis_systemcore
libasteriskpjcore
alawcore
media_indexcore
framehookcore
pbx_builtinscore
indicationscore
netsock2core
stasis_bridgescore
data_buffercore
dialcore
threadstoragecore
bridge_channelcore
datastorecore
fskmodem_floatcore
lockcore
pbx_hangup_handlercore
dnsmgrcore
dns_recurringcore
mwicore
pickupcore
slinfactorycore
iocore
loadercore
res_mwi_externalcore
res_endpoint_statsextendedres_statsd, res_statsd
res_pjsip_phoneprov_providerextendedpjproject, res_pjsip, res_phoneprov, pjproject, res_pjsip, res_phoneprov
res_pjsip_mwicorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_hep_rtcpextendedres_hep, res_hep
res_ari_playbackscoreres_ari, res_ari_model, res_stasis, res_stasis_playback, res_ari, res_ari_model, res_stasis, res_stasis_playback
res_sorcery_memory_cachecore
res_pjsip_sdp_rtpcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_refercorepjproject, res_pjsip, res_pjsip_session, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_session, res_pjsip_pubsub
res_convertcore
res_ari_endpointscoreres_ari, res_ari_model, res_stasis, res_ari, res_ari_model, res_stasis
res_pjsip_empty_infocorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_manager_presencestatecore
res_clioriginatecore
res_ael_shareextended
res_http_media_cachecorecurl, res_curl, curl, res_curl
res_calendar_caldavextendedres_calendar, neon, ical, libxml2, res_calendar, neon, ical, libxml2
res_pjsip_pidf_body_generatorcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_ari_eventscoreres_ari, res_ari_model, res_stasis, res_http_websocket, res_ari, res_ari_model, res_stasis, res_http_websocket
res_format_attr_ilbccore
res_ari_soundscoreres_ari, res_ari_model, res_stasis, res_ari, res_ari_model, res_stasis
res_chan_statsextendedres_statsd, res_statsd
res_calendarextended
res_pjsip_authenticator_digestcorepjproject, res_pjsip, pjproject, res_pjsip
res_mutestreamcore
res_stasis_device_statecoreres_stasis, res_stasis
res_odbccoregeneric_odbc, res_odbc_transaction, generic_odbc, res_odbc_transaction
res_clialiasescore
res_format_attr_vp8core
res_http_websocketcore
res_parkingcorebridge_holding, bridge_holding
res_ari_channelscoreres_ari, res_ari_model, res_stasis, res_stasis_answer, res_stasis_playback, res_stasis_recording, res_stasis_snoop, res_ari, res_ari_model, res_stasis, res_stasis_answer, res_stasis_playback, res_stasis_recording, res_stasis_snoop
res_config_sqlitedeprecated1619sqlite, sqlite
res_pktccopsextended1921
res_realtimecore
res_config_sqlite3coresqlite3, sqlite3
res_phoneprovextended
res_stasis_testcoreTEST_FRAMEWORK, TEST_FRAMEWORK
res_pjsip_sips_contactcorepjproject, res_pjsip, pjproject, res_pjsip
res_ari_asteriskcoreres_ari, res_ari_model, res_stasis, res_ari, res_ari_model, res_stasis
res_pjsip_send_to_voicemailcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_messagingcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_stasis_recordingcoreres_stasis, res_stasis
res_speechcore
res_format_attr_siren14core
res_format_attr_opuscore
res_pjsip_stir_shakencorepjproject, res_pjsip, res_pjsip_session, res_stir_shaken, pjproject, res_pjsip, res_pjsip_session, res_stir_shaken
res_audiosocketextended
res_ari_modelcore
res_pjsip_t38corepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_stasis_mailboxcoreres_stasis, res_mwi_external, res_stasis, res_mwi_external
res_pjsip_natcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_pubsubcorepjproject, res_pjsip, pjproject, res_pjsip
res_corosyncextendedcorosync, corosync
res_pjsip_publish_asteriskcorepjproject, res_pjsip, res_pjsip_outbound_publish, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_outbound_publish, res_pjsip_pubsub
res_pjsip_header_funcscorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_dialog_info_body_generatorcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_rtp_multicastcore
res_pjsip_sessioncorepjproject, res_pjsip, pjproject, res_pjsip
res_security_logcore
res_config_ldapextendedldap, ldap
res_timing_pthreadextended
res_sorcery_memorycore
res_ari_recordingscoreres_ari, res_ari_model, res_stasis, res_stasis_recording, res_ari, res_ari_model, res_stasis, res_stasis_recording
res_aricoreres_http_websocket, res_stasis, res_http_websocket, res_stasis
res_odbc_transactioncoregeneric_odbc, generic_odbc
res_config_pgsqlextendedpgsql, pgsql
res_smdiextended
res_timing_timerfdcoretimerfd, timerfd
res_format_attr_siren7core
res_snmpextendednetsnmp, netsnmp
agentextended
res_limitcore
res_monitordeprecated1621
res_ari_applicationscoreres_ari, res_ari_model, res_stasis, res_ari, res_ari_model, res_stasis
res_sorcery_astdbcore
res_pjsip_xpidf_body_generatorcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_pjsip_rfc3326corepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_sorcery_realtimecore
res_manager_devicestatecore
res_musiconholdcore
res_ari_device_statescoreres_ari, res_ari_model, res_stasis, res_stasis_device_state, res_ari, res_ari_model, res_stasis, res_stasis_device_state
res_calendar_icalendarextendedres_calendar, neon, ical, res_calendar, neon, ical
res_pjsip_config_wizardcorepjproject, res_pjsip, pjproject, res_pjsip
res_pjsip_endpoint_identifier_anonymouscorepjproject, res_pjsip, pjproject, res_pjsip
res_curlcorecurl, curl
res_pjsip_exten_statecorepjproject, res_pjsip, res_pjsip_pubsub, res_pjsip_outbound_publish, pjproject, res_pjsip, res_pjsip_pubsub, res_pjsip_outbound_publish
res_calendar_ewsextendedres_calendar, neon29, res_calendar, neon29
res_format_attr_h263core
res_stasis_playbackcoreres_stasis, res_stasis_recording, res_stasis, res_stasis_recording
res_pjsip_dlg_optionscorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_remb_modifierextended
res_pjsip_caller_idcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_pidf_digium_body_supplementcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_pjsip_transport_websocketcorepjproject, res_pjsip, res_http_websocket, pjproject, res_pjsip, res_http_websocket
res_mwi_devstatecore
res_agicoreres_speech, res_speech
res_ari_mailboxescoreres_ari, res_ari_model, res_stasis, res_stasis_mailbox, res_ari, res_ari_model, res_stasis, res_stasis_mailbox
res_config_odbccoreres_odbc, generic_odbc, res_odbc, generic_odbc
res_cryptocoreopenssl, openssl
res_fax_spandspextendedspandsp, res_fax, spandsp, res_fax
res_pjsip_dtmf_infocorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_notifycorepjproject, res_pjsip, pjproject, res_pjsip
res_timing_dahdicoredahdi, dahdi
res_rtp_asteriskcore
res_timing_kqueueextendedkqueue, kqueue
res_ari_bridgescoreres_ari, res_ari_model, res_stasis, res_stasis_recording, res_stasis_playback, res_ari, res_ari_model, res_stasis, res_stasis_recording, res_stasis_playback
res_statsdextended
res_calendar_exchangeextendedres_calendar, neon, ical, iksemel, res_calendar, neon, ical, iksemel
res_prometheusextended
res_pjsip_diversioncorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_pjsip_registrarcorepjproject, res_pjproject, res_pjsip, pjproject, res_pjproject, res_pjsip
res_pjsip_loggercorepjproject, res_pjsip, pjproject, res_pjsip
res_mwi_external_amicoreres_mwi_external, res_mwi_external
res_stasis_answercoreres_stasis, res_stasis
res_pjsipcorepjproject, res_pjproject, res_sorcery_config, res_sorcery_memory, res_sorcery_astdb, pjproject, res_pjproject, res_sorcery_config, res_sorcery_memory, res_sorcery_astdb
res_pjsip_aclcorepjproject, res_pjsip, pjproject, res_pjsip
res_pjsip_one_touch_record_infocorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_hep_pjsipextendedpjproject, res_pjsip, res_pjsip_session, res_hep, pjproject, res_pjsip, res_pjsip_session, res_hep
res_pjprojectcorepjproject, res_sorcery_config, pjproject, res_sorcery_config
res_hepextended
res_pjsip_endpoint_identifier_ipcorepjproject, res_pjsip, pjproject, res_pjsip
res_stasiscore
res_adsideprecated
res_tonedetectextended
res_pjsip_outbound_registrationcorepjproject, res_pjsip, pjproject, res_pjsip
res_stir_shakencorecrypto, curl, res_curl, crypto, curl, res_curl
res_sorcery_configcore
res_pjsip_mwi_body_generatorcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_resolver_unboundcoreunbound, unbound
res_format_attr_celtcore
res_stasis_snoopcoreres_stasis, res_stasis
res_pjsip_pidf_eyebeam_body_supplementcorepjproject, res_pjsip, res_pjsip_pubsub, pjproject, res_pjsip, res_pjsip_pubsub
res_stun_monitorcore
res_format_attr_silkcore
res_pjsip_historyextendedpjproject, res_pjsip, pjproject, res_pjsip
res_faxcore
pvalextended
res_pjsip_outbound_authenticator_digestcorepjproject, res_pjsip, pjproject, res_pjsip
res_pjsip_endpoint_identifier_usercorepjproject, res_pjsip, pjproject, res_pjsip
resource_bridgescore
resource_recordingscore
resource_playbackscore
resource_mailboxescore
resource_eventscore
resource_channelscore
resource_asteriskcore
resource_device_statescore
res_xmppcoreiksemel, iksemel
res_srtpcoresrtp, srtp
res_format_attr_g729core
res_pjsip_pathcorepjproject, res_pjsip, res_pjsip_session, pjproject, res_pjsip, res_pjsip_session
res_format_attr_h264core
res_config_curlcorefunc_curl, res_curl, curl, func_curl, res_curl, curl
res_http_postcoregmime, gmime
res_pjsip_outbound_publishcorepjproject, res_pjproject, res_pjsip, pjproject, res_pjproject, res_pjsip
app_mysqldeprecated1.819mysqlclient, mysqlclient
chan_mobileextendedbluetooth, bluetooth
cdr_mysqldeprecated1.819mysqlclient, mysqlclient
chan_ooh323extended
format_mp3extended
res_config_mysqlextendedmysqlclient, mysqlclient

IAX2Provision()

Synopsis

Provision a calling IAXy with a given template.

Description

Provisions the calling IAXy (assuming the calling entity is in fact an IAXy) with the given template. Returns -1 on error or 0 on success.

Syntax

IAX2Provision([template])

Arguments


DAHDISendKeypadFacility()

Synopsis

Send digits out of band over a PRI.

Description

This application will send the given string of digits in a Keypad Facility IE over the current channel.

Syntax

DAHDISendKeypadFacility(digits)

Arguments


DAHDISendCallreroutingFacility()

Synopsis

Send an ISDN call rerouting/deflection facility message.

Description

This application will send an ISDN switch specific call rerouting/deflection facility message over the current channel. Supported switches depend upon the version of libpri in use.

Syntax

DAHDISendCallreroutingFacility(destination,[original,[reason]])

Arguments


DAHDIAcceptR2Call()

Synopsis

Accept an R2 call if its not already accepted (you still need to answer it)

Description

This application will Accept the R2 call either with charge or no charge.

Syntax

DAHDIAcceptR2Call(charge)

Arguments


SIPDtmfMode()

Synopsis

Change the dtmfmode for a SIP call.

Description

Changes the dtmfmode for a SIP call.

Syntax

SIPDtmfMode(mode)

Arguments


SIPAddParameter()

Synopsis

Add a SIP parameter to the From header in the outbound call.

Description

Adds a parameter to a SIP call placed with DIAL.

Use this with care. Adding the wrong tags may jeopardize the SIP dialog.

Always returns 0.

Syntax

SIPAddParameter(Parameter,Content)

Arguments


SIPAddHeader()

Synopsis

Add a SIP header to the outbound call.

Description

Adds a header to a SIP call placed with DIAL.

Remember to use the X-header if you are adding non-standard SIP headers, like X-Asterisk-Accountcode:. Use this with care. Adding the wrong headers may jeopardize the SIP dialog.

Always returns 0.

Syntax

SIPAddHeader(Header,Content)

Arguments


SIPRemoveHeader()

Synopsis

Remove SIP headers previously added with SIPAddHeader

Description

SIPRemoveHeader() allows you to remove headers which were previously added with SIPAddHeader(). If no parameter is supplied, all previously added headers will be removed. If a parameter is supplied, only the matching headers will be removed.

For example you have added these 2 headers:

SIPAddHeader(P-Asserted-Identity: sip:foo@bar);

SIPAddHeader(P-Preferred-Identity: sip:bar@foo);

// remove all headers

SIPRemoveHeader();

// remove all P- headers

SIPRemoveHeader(P-);

// remove only the PAI header (note the : at the end)

SIPRemoveHeader(P-Asserted-Identity:);

Always returns 0.

Syntax

SIPRemoveHeader([Header])

Arguments


SIPSendCustomINFO()

Synopsis

Send a custom INFO frame on specified channels.

Description

SIPSendCustomINFO() allows you to send a custom INFO message on all active SIP channels or on channels with the specified User Agent. This application is only available if TEST_FRAMEWORK is defined.

Syntax

SIPSendCustomINFO(Data,[UserAgent])

Arguments


AELSub()

Synopsis

Launch subroutine built with AEL

Description

Execute the named subroutine, defined in AEL, from another dialplan language, such as extensions.conf, Realtime extensions, or Lua.

The purpose of this application is to provide a sane entry point into AEL subroutines, the implementation of which may change from time to time.

Syntax

AELSub(routine,[args])

Arguments


Macro()

Synopsis

Macro Implementation.

Description

Executes a macro using the context macro-name, jumping to the s extension of that context and executing each step, then returning when the steps end.

The calling extension, context, and priority are stored in MACRO_EXTEN, MACRO_CONTEXT and MACRO_PRIORITY respectively. Arguments become , , etc in the macro context.

If you Goto out of the Macro context, the Macro will terminate and control will be returned at the location of the Goto.

If MACRO_OFFSET is set at termination, Macro will attempt to continue at priority MACRO_OFFSET + N + 1 if such a step exists, and N + 1 otherwise.

Syntax

Macro(name,arg1,[arg2[,...]]])

Arguments

See Also


MacroIf()

Synopsis

Conditional Macro implementation.

Description

Executes macro defined in macroiftrue if expr is true (otherwise macroiffalse if provided)

Arguments and return values as in application Macro()

Syntax

MacroIf(expr:macroiftrue:[macroiffalse])

Arguments

See Also


MacroExclusive()

Synopsis

Exclusive Macro Implementation.

Description

Executes macro defined in the context macro-name. Only one call at a time may run the macro. (we'll wait if another call is busy executing in the Macro)

Arguments and return values as in application Macro()

Syntax

MacroExclusive(name,[arg1,[arg2]])

Arguments

See Also


MacroExit()

Synopsis

Exit from Macro.

Description

Causes the currently running macro to exit as if it had ended normally by running out of priorities to execute. If used outside a macro, will likely cause unexpected behavior.

See Also


Dial()

Synopsis

Attempt to connect to another device or endpoint and bridge the call.

Description

This application will place calls to one or more specified channels. As soon as one of the requested channels answers, the originating channel will be answered, if it has not already been answered. These two channels will then be active in a bridged call. All other channels that were requested will then be hung up.

Unless there is a timeout specified, the Dial application will wait indefinitely until one of the called channels answers, the user hangs up, or if all of the called channels are busy or unavailable. Dialplan execution will continue if no requested channels can be called, or if the timeout expires. This application will report normal termination if the originating channel hangs up, or if the call is bridged and either of the parties in the bridge ends the call.

If the OUTBOUND_GROUP variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...). If the OUTBOUND_GROUP_ONCE variable is set, all peer channels created by this application will be put into that group (as in Set(GROUP()=...). Unlike OUTBOUND_GROUP, however, the variable will be unset after use.

This application sets the following channel variables:

Example: Dial with 30 second timeout
	same => n,Dial(PJSIP/alice,30)
Example: Parallel dial with 45 second timeout
	same => n,Dial(PJSIP/alice&PJIP/bob,45)
Example: Dial with 'g' continuation option
	same => n,Dial(PJSIP/alice,,g)
	same => n,Log(NOTICE, Alice call result: ${DIALSTATUS})
Example: Dial with transfer/recording features for calling party
	same => n,Dial(PJSIP/alice,,TX)
Example: Dial with call length limit
	same => n,Dial(PJSIP/alice,,L(60000:30000:10000))
Example: Dial alice and bob and send NO_ANSWER to bob instead of ANSWERED_ELSEWHERE when alice answers
	same => n,Dial(PJSIP/alice&PJSIP/bob,,Q(NO_ANSWER))
Example: Dial with pre-dial subroutines
	[default]
	

	exten => callee_channel,1,NoOp(ARG1=${ARG1} ARG2=${ARG2})
	same => n,Log(NOTICE, I'm called on channel ${CHANNEL} prior to it starting the dial attempt)
	same => n,Return()
	

	exten => called_channel,1,NoOp(ARG1=${ARG1} ARG2=${ARG2})
	same => n,Log(NOTICE, I'm called on outbound channel ${CHANNEL} prior to it being used to dial someone)
	same => n,Return()
	

	exten => _X.,1,NoOp()
	same => n,Dial(PJSIP/alice,,b(default^called_channel^1(my_gosub_arg1^my_gosub_arg2))B(default^callee_channel^1(my_gosub_arg1^my_gosub_arg2)))
	same => n,Hangup()
Example: Dial with post-answer subroutine executed on outbound channel
	[my_gosub_routine]
	

	exten => s,1,NoOp(ARG1=${ARG1} ARG2=${ARG2})
	same => n,Playback(hello)
	same => n,Return()
	
	[default]
	

	exten => _X.,1,NoOp()
	same => n,Dial(PJSIP/alice,,U(my_gosub_routine^my_gosub_arg1^my_gosub_arg2))
	same => n,Hangup()
Example: Dial into ConfBridge using 'G' option
	same => n,Dial(PJSIP/alice,,G(jump_to_here))
	same => n(jump_to_here),Goto(confbridge)
	same => n,Goto(confbridge)
	same => n(confbridge),ConfBridge(${EXTEN})

Syntax

Dial(Technology/Resource&[Technology2/Resource2[&...]],[timeout,[options,[URL]]]])

Arguments

See Also


RetryDial()

Synopsis

Place a call, retrying on failure allowing an optional exit extension.

Description

This application will attempt to place a call using the normal Dial application. If no channel can be reached, the announce file will be played. Then, it will wait sleep number of seconds before retrying the call. After retries number of attempts, the calling channel will continue at the next priority in the dialplan. If the retries setting is set to 0, this application will retry endlessly. While waiting to retry a call, a 1 digit extension may be dialed. If that extension exists in either the context defined in EXITCONTEXT or the current one, The call will jump to that extension immediately. The dialargs are specified in the same format that arguments are provided to the Dial application.

Syntax

RetryDial(announce,sleep,retries,dialargs)

Arguments

See Also


SpeechCreate()

Synopsis

Create a Speech Structure.

Description

This application creates information to be used by all the other applications. It must be called before doing any speech recognition activities such as activating a grammar. It takes the engine name to use as the argument, if not specified the default engine will be used.

Sets the ERROR channel variable to 1 if the engine cannot be used.

Syntax

SpeechCreate(engine_name)

Arguments


SpeechActivateGrammar()

Synopsis

Activate a grammar.

Description

This activates the specified grammar to be recognized by the engine. A grammar tells the speech recognition engine what to recognize, and how to portray it back to you in the dialplan. The grammar name is the only argument to this application.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechActivateGrammar(grammar_name)

Arguments


SpeechStart()

Synopsis

Start recognizing voice in the audio stream.

Description

Tell the speech recognition engine that it should start trying to get results from audio being fed to it.

Hangs up the channel on failure. If this is not desired, use TryExec.


SpeechBackground()

Synopsis

Play a sound file and wait for speech to be recognized.

Description

This application plays a sound file and waits for the person to speak. Once they start speaking playback of the file stops, and silence is heard. Once they stop talking the processing sound is played to indicate the speech recognition engine is working. Once results are available the application returns and results (score and text) are available using dialplan functions.

The first text and score are ${SPEECH_TEXT(0)} AND ${SPEECH_SCORE(0)} while the second are ${SPEECH_TEXT(1)} and ${SPEECH_SCORE(1)}.

The first argument is the sound file and the second is the timeout integer in seconds.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechBackground(sound_file,[timeout,[options]])

Arguments


SpeechDeactivateGrammar()

Synopsis

Deactivate a grammar.

Description

This deactivates the specified grammar so that it is no longer recognized.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechDeactivateGrammar(grammar_name)

Arguments


SpeechProcessingSound()

Synopsis

Change background processing sound.

Description

This changes the processing sound that SpeechBackground plays back when the speech recognition engine is processing and working to get results.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechProcessingSound(sound_file)

Arguments


SpeechDestroy()

Synopsis

End speech recognition.

Description

This destroys the information used by all the other speech recognition applications. If you call this application but end up wanting to recognize more speech, you must call SpeechCreate() again before calling any other application.

Hangs up the channel on failure. If this is not desired, use TryExec.


SpeechLoadGrammar()

Synopsis

Load a grammar.

Description

Load a grammar only on the channel, not globally.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechLoadGrammar(grammar_name,path)

Arguments


SpeechUnloadGrammar()

Synopsis

Unload a grammar.

Description

Unload a grammar.

Hangs up the channel on failure. If this is not desired, use TryExec.

Syntax

SpeechUnloadGrammar(grammar_name)

Arguments


VoiceMail()

Synopsis

Leave a Voicemail message.

Description

This application allows the calling party to leave a message for the specified list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from the first mailbox specified. Dialplan execution will stop if the specified mailbox does not exist.

The Voicemail application will exit if any of the following DTMF digits are received:

This application will set the following channel variable upon completion:

Syntax

VoiceMail(mailbox1&[mailbox2[&...]],[options]])

Arguments

See Also


VoiceMailMain()

Synopsis

Check Voicemail messages.

Description

This application allows the calling party to check voicemail messages. A specific mailbox, and optional corresponding context, may be specified. If a mailbox is not provided, the calling party will be prompted to enter one. If a context is not specified, the default context will be used.

The VoiceMailMain application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VoiceMailMain([mailbox@[context,[options]]])

Arguments

See Also


VMAuthenticate()

Synopsis

Authenticate with Voicemail passwords.

Description

This application behaves the same way as the Authenticate application, but the passwords are taken from voicemail.conf. If the mailbox is specified, only that mailbox's password will be considered valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will be set with the authenticated mailbox.

The VMAuthenticate application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VMAuthenticate([mailbox@[context,[options]]])

Arguments


VoiceMailPlayMsg()

Synopsis

Play a single voice mail msg from a mailbox by msg id.

Description

This application sets the following channel variable upon completion:

Syntax

VoiceMailPlayMsg([mailbox@[context,]]msg_id)

Arguments


VMSayName()

Synopsis

Play the name of a voicemail user

Description

This application will say the recorded name of the voicemail user specified as the argument to this application. If no context is provided, default is assumed.

Similar to the Background() application, playback of the recorded name can be interrupted by entering an extension, which will be searched for in the current context.

Syntax

VMSayName([mailbox@[context]])

Arguments


Exec()

Synopsis

Executes dialplan application.

Description

Allows an arbitrary application to be invoked even when not hard coded into the dialplan. If the underlying application terminates the dialplan, or if the application cannot be found, Exec will terminate the dialplan.

To invoke external applications, see the application System. If you would like to catch any error instead, see TryExec.

Syntax

Exec(arguments)

Arguments


TryExec()

Synopsis

Executes dialplan application, always returning.

Description

Allows an arbitrary application to be invoked even when not hard coded into the dialplan. To invoke external applications see the application System. Always returns to the dialplan. The channel variable TRYSTATUS will be set to one of:

Syntax

TryExec(arguments)

Arguments


ExecIf()

Synopsis

Executes dialplan application, conditionally.

Description

If expr is true, execute and return the result of appiftrue(args).

If expr is true, but appiftrue is not found, then the application will return a non-zero value.

Syntax

ExecIf(expression:appiftrue:[appiffalse])

Arguments


SendDTMF()

Synopsis

Sends arbitrary DTMF digits

Description

It will send all digits or terminate if it encounters an error.

Syntax

SendDTMF(digits,[timeout_ms,[duration_ms,[channel]]])

Arguments

See Also


StreamEcho()

Synopsis

Echo media, up to 'N' streams of a type, and DTMF back to the calling party

Description

If a "num" (the number of streams) is not given then this simply echos back any media or DTMF frames (note, however if '#' is detected then the application exits) read from the calling channel back to itself. This means for any relevant frame read from a particular stream it is written back out to the associated write stream in a one to one fashion.

However if a "num" is specified, and if the calling channel allows it (a new offer is made requesting the allowance of additional streams) then any any media received, like before, is echoed back onto each stream. However, in this case a relevant frame received on a stream of the given "type" is also echoed back out to the other streams of that same type. It should be noted that when operating in this mode only the first stream found of the given "type" is allowed from the original offer. And this first stream found is also the only stream of that "type" granted read (send/receive) capabilities in the new offer whereas the additional ones are set to receive only.

This does not echo CONTROL, MODEM, or NULL frames.

Syntax

StreamEcho([num,[type]])

Arguments


Read()

Synopsis

Read a variable.

Description

Reads a #-terminated string of digits a certain number of times from the user in to the given variable.

This application sets the following channel variable upon completion:

Syntax

Read(variable&filename&[filename2[&...]],[maxdigits,[options,[attempts,[timeout]]]]])

Arguments

See Also


SkelGuessNumber()

Synopsis

An example number guessing game

Description

This simple number guessing application is a template to build other applications from. It shows you the basic structure to create your own Asterisk applications.

Syntax

SkelGuessNumber(level,[options])

Arguments


MinivmRecord()

Synopsis

Receive Mini-Voicemail and forward via e-mail.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf

MiniVM records audio file in configured format and forwards message to e-mail and pager.

If there's no user account for that address, a temporary account will be used with default options.

The recorded file name and path will be stored in MVM_FILENAME and the duration of the message will be stored in MVM_DURATION

If the caller hangs up after the recording, the only way to send the message and clean up is to execute in the h extension. The application will exit if any of the following DTMF digits are received and the requested extension exist in the current context.

Syntax

MinivmRecord(username@domain,[options])

Arguments


MinivmGreet()

Synopsis

Play Mini-Voicemail prompts.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf.

MinivmGreet() plays default prompts or user specific prompts for an account.

Busy and unavailable messages can be choosen, but will be overridden if a temporary message exists for the account.

Syntax

MinivmGreet(username@domain,[options])

Arguments


MinivmNotify()

Synopsis

Notify voicemail owner about new messages.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf.

MiniVMnotify forwards messages about new voicemail to e-mail and pager. If there's no user account for that address, a temporary account will be used with default options (set in minivm.conf).

If the channel variable MVM_COUNTER is set, this will be used in the message file name and available in the template for the message.

If no template is given, the default email template will be used to send email and default pager template to send paging message (if the user account is configured with a paging address.

Syntax

MinivmNotify(username@domain,[options])

Arguments


MinivmDelete()

Synopsis

Delete Mini-Voicemail voicemail messages.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf.

It deletes voicemail file set in MVM_FILENAME or given filename.

Syntax

MinivmDelete(filename)

Arguments


MinivmAccMess()

Synopsis

Record account specific messages.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf.

Use this application to record account specific audio/video messages for busy, unavailable and temporary messages.

Account specific directories will be created if they do not exist.

Syntax

MinivmAccMess(username@domain,[options])

Arguments


MinivmMWI()

Synopsis

Send Message Waiting Notification to subscriber(s) of mailbox.

Description

This application is part of the Mini-Voicemail system, configured in minivm.conf.

MinivmMWI is used to send message waiting indication to any devices whose channels have subscribed to the mailbox passed in the first parameter.

Syntax

MinivmMWI(username@domain,urgent,new,old)

Arguments


GetCPEID()

Synopsis

Get ADSI CPE ID.

Description

Obtains and displays ADSI CPE ID and other information in order to properly setup dahdi.conf for on-hook operations.


JACK()

Synopsis

Jack Audio Connection Kit

Description

When executing this application, two jack ports will be created; one input and one output. Other applications can be hooked up to these ports to access audio coming from, or being send to the channel.

Syntax

JACK([options])

Arguments


Directory()

Synopsis

Provide directory of voicemail extensions.

Description

This application will present the calling channel with a directory of extensions from which they can search by name. The list of names and corresponding extensions is retrieved from the voicemail configuration file, voicemail.conf.

This application will immediately exit if one of the following DTMF digits are received and the extension to jump to exists:

0 - Jump to the 'o' extension, if it exists.

* - Jump to the 'a' extension, if it exists.

This application will set the following channel variable before completion:

Syntax

Directory([vm-context,[dial-context,[options]]])

Arguments


MallocTrim()

Synopsis

Attempts to reclaim unused heap memory.

Description

Attempts to release free memory from the heap.

This application is typically used before the Systemapplication or the SHELL function if system memory conditions prevent these from succeeding ordinarily.

This application may be used to diagnose this memory issue and prevent these calls from failing until the cause of the memory issue is found. You should also build Asterisk with MALLOC_DEBUG to troubleshoot memory issues.


AudioSocket()

Synopsis

Transmit and receive audio between channel and TCP socket

Description

Connects to the given TCP service, then transmits channel audio over that socket. In turn, audio is received from the socket and sent to the channel. Only audio frames will be transmitted.

Protocol is specified at https://wiki.asterisk.org/wiki/display/AST/AudioSocket

This application does not automatically answer and should generally be preceeded by an application such as Answer() or Progress().

Syntax

AudioSocket(uuid,service)

Arguments


AgentLogin()

Synopsis

Login an agent.

Description

Login an agent to the system. Any agent authentication is assumed to already be done by dialplan. While logged in, the agent can receive calls and will hear the sound file specified by the config option custom_beep when a new call comes in for the agent. Login failures will continue in the dialplan with AGENT_STATUS set.

Before logging in, you can setup on the real agent channel the CHANNEL(dtmf_features) an agent will have when talking to a caller and you can setup on the channel running this application the CONNECTEDLINE() information the agent will see while waiting for a caller.

AGENT_STATUS enumeration values:

The Agent:AgentId device state is available to monitor the status of the agent.

Syntax

AgentLogin(AgentId,[options])

Arguments

See Also


AgentRequest()

Synopsis

Request an agent to connect with the channel.

Description

Request an agent to connect with the channel. Failure to find, alert the agent, or acknowledge the call will continue in the dialplan with AGENT_STATUS set.

AGENT_STATUS enumeration values:

Syntax

AgentRequest(AgentId)

Arguments

See Also


DBdeltree()

Synopsis

Delete a family or keytree from the asterisk database.

Description

This application will delete a family or keytree from the Asterisk database.

Syntax

DBdeltree(family,[keytree])

Arguments

See Also


SoftHangup()

Synopsis

Hangs up the requested channel.

Description

Hangs up the requested channel. If there are no channels to hangup, the application will report it.

Syntax

SoftHangup(Technology/Resource,[options])

Arguments


DumpChan()

Synopsis

Dump Info About The Calling Channel.

Description

Displays information on channel and listing of all channel variables. If level is specified, output is only displayed when the verbose level is currently set to that number or greater.

Syntax

DumpChan([level])

Arguments

See Also


VoiceMail()

Synopsis

Leave a Voicemail message.

Description

This application allows the calling party to leave a message for the specified list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from the first mailbox specified. Dialplan execution will stop if the specified mailbox does not exist.

The Voicemail application will exit if any of the following DTMF digits are received:

This application will set the following channel variable upon completion:

Syntax

VoiceMail(mailbox1&[mailbox2[&...]],[options]])

Arguments

See Also


VoiceMailMain()

Synopsis

Check Voicemail messages.

Description

This application allows the calling party to check voicemail messages. A specific mailbox, and optional corresponding context, may be specified. If a mailbox is not provided, the calling party will be prompted to enter one. If a context is not specified, the default context will be used.

The VoiceMailMain application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VoiceMailMain([mailbox@[context,[options]]])

Arguments

See Also


VMAuthenticate()

Synopsis

Authenticate with Voicemail passwords.

Description

This application behaves the same way as the Authenticate application, but the passwords are taken from voicemail.conf. If the mailbox is specified, only that mailbox's password will be considered valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will be set with the authenticated mailbox.

The VMAuthenticate application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VMAuthenticate([mailbox@[context,[options]]])

Arguments


VoiceMailPlayMsg()

Synopsis

Play a single voice mail msg from a mailbox by msg id.

Description

This application sets the following channel variable upon completion:

Syntax

VoiceMailPlayMsg([mailbox@[context,]]msg_id)

Arguments


VMSayName()

Synopsis

Play the name of a voicemail user

Description

This application will say the recorded name of the voicemail user specified as the argument to this application. If no context is provided, default is assumed.

Similar to the Background() application, playback of the recorded name can be interrupted by entering an extension, which will be searched for in the current context.

Syntax

VMSayName([mailbox@[context]])

Arguments


CELGenUserEvent()

Synopsis

Generates a CEL User Defined Event.

Description

A CEL event will be immediately generated by this channel, with the supplied name for a type.

Syntax

CELGenUserEvent(event-name,[extra])

Arguments


Milliwatt()

Synopsis

Generates a 1004 Hz test tone at 0dbm (mu-law).

Description

Generates a 1004 Hz test tone.

By default, this application does not provide a Milliwatt test tone. It simply plays a 1004 Hz tone, which is not suitable for performing a milliwatt test. The m option should be used so that a real Milliwatt test tone is provided. This will include a 1 second silent interval every 10 seconds.

Previous versions of this application generated a constant tone at 1000 Hz. If for some reason you would prefer that behavior, supply the o option to get the old behavior.

Syntax

Milliwatt([options])

Arguments


Transfer()

Synopsis

Transfer caller to remote extension.

Description

Requests the remote caller be transferred to a given destination. If TECH (SIP, IAX2, etc) is used, only an incoming call with the same channel technology will be transferred. Note that for SIP, if you transfer before call is setup, a 302 redirect SIP message will be returned to the caller.

The result of the application will be reported in the TRANSFERSTATUS channel variable:

Syntax

Transfer([Tech/]destination)

Arguments


Flash()

Synopsis

Flashes a DAHDI Trunk.

Description

Performs a flash on a DAHDI trunk. This can be used to access features provided on an incoming analogue circuit such as conference and call waiting. Use with SendDTMF() to perform external transfers.

See Also


WaitForSilence()

Synopsis

Waits for a specified amount of silence.

Description

Waits for up to silencerequired milliseconds of silence, iterations times. An optional timeout specified the number of seconds to return after, even if we do not receive the specified amount of silence. Use timeout with caution, as it may defeat the purpose of this application, which is to wait indefinitely until silence is detected on the line. This is particularly useful for reverse-911-type call broadcast applications where you need to wait for an answering machine to complete its spiel before playing a message.

Typically you will want to include two or more calls to WaitForSilence when dealing with an answering machine; first waiting for the spiel to finish, then waiting for the beep, etc.

Examples:

WaitForSilence(500,2) will wait for 1/2 second of silence, twice

WaitForSilence(1000) will wait for 1 second of silence, once

WaitForSilence(300,3,10) will wait for 300ms silence, 3 times, and returns after 10 sec, even if silence is not detected

Sets the channel variable WAITSTATUS to one of these values:

Syntax

WaitForSilence([silencerequired,[iterations,[timeout]]])

Arguments

See Also


WaitForNoise()

Synopsis

Waits for a specified amount of noise.

Description

Waits for up to noiserequired milliseconds of noise, iterations times. An optional timeout specified the number of seconds to return after, even if we do not receive the specified amount of noise. Use timeout with caution, as it may defeat the purpose of this application, which is to wait indefinitely until noise is detected on the line.

Syntax

WaitForNoise([noiserequired,[iterations,[timeout]]])

Arguments

See Also


FollowMe()

Synopsis

Find-Me/Follow-Me application.

Description

This application performs Find-Me/Follow-Me functionality for the caller as defined in the profile matching the followmeid parameter in followme.conf. If the specified followmeid profile doesn't exist in followme.conf, execution will be returned to the dialplan and call execution will continue at the next priority.

Returns -1 on hangup.

Syntax

FollowMe(followmeid,[options])

Arguments


StatsD()

Synopsis

Allow statistics to be passed to the StatsD server from the dialplan.

Description

This dialplan application sends statistics to the StatsD server specified inside of statsd.conf.

Syntax

StatsD(metric_type,statistic_name,value,[sample_rate])

Arguments


SendText()

Synopsis

Send a Text Message on a channel.

Description

Sends text to the current channel.

The following variables can be set:

Result of transmission will be stored in the following variables:

Examples:

If the channel driver supports enhanced messaging (currently only chan_pjsip), you can set additional variables:

current channel could be the caller or callee depending on the context in which this application is called.

The text encoding and transmission method is completely at the discretion of the channel driver. chan_pjsip will use in-dialog SIP MESSAGE messages always. chan_sip will use T.140 via RTP if a text media type was negotiated and in-dialog SIP MESSAGE messages otherwise.

Example: Send a simple message
	same => n,SendText(Your Text Here)
Example: Alter the From display name
	same => n,Set(SENDTEXT_FROM_DISPLAYNAME=Really From Bob)
	same => n,SendText(Your Text Here)
Example: Send a JSON String
	same => n,Set(SENDTEXT_CONTENT_TYPE=text/json)
	same => n,SendText({"foo":a, "bar":23})
Example: Send a JSON String (alternate)
	same => n,Set(SENDTEXT_CONTENT_TYPE=text/json)
	same => n,Set(SENDTEXT_BODY={"foo":a, "bar":23})
	same => n,SendText()

Syntax

SendText([text])

Arguments

See Also


ControlPlayback()

Synopsis

Play a file with fast forward and rewind.

Description

This application will play back the given filename.

It sets the following channel variables upon completion:

Syntax

ControlPlayback(filename,[skipms,[ff,[rew,[stop,[pause,[restart,[options]]]]]]])

Arguments


SayUnixTime()

Synopsis

Says a specified time in a custom format.

Description

Uses some of the sound files stored in to construct a phrase saying the specified date and/or time in the specified format.

Syntax

SayUnixTime([unixtime,[timezone,[format,[options]]]])

Arguments

See Also


DateTime()

Synopsis

Says a specified time in a custom format.

Description

Say the date and time in a specified format.

Syntax

DateTime([unixtime,[timezone,[format]]])

Arguments


SayCountedNoun()

Synopsis

Say a noun in declined form in order to count things

Description

Selects and plays the proper singular or plural form of a noun when saying things such as "five calls". English has simple rules for deciding when to say "call" and when to say "calls", but other languages have complicated rules which would be extremely difficult to implement in the Asterisk dialplan language.

The correct sound file is selected by examining the number and adding the appropriate suffix to filename. If the channel language is English, then the suffix will be either empty or "s". If the channel language is Russian or some other Slavic language, then the suffix will be empty for nominative, "x1" for genative singular, and "x2" for genative plural.

Note that combining filename with a suffix will not necessarily produce a correctly spelled plural form. For example, SayCountedNoun(2,man) will play the sound file "mans" rather than "men". This behavior is intentional. Since the file name is never seen by the end user, there is no need to implement complicated spelling rules. We simply record the word "men" in the sound file named "mans".

This application does not automatically answer and should be preceeded by an application such as Answer() or Progress.

Syntax

SayCountedNoun(number,filename)

Arguments

See Also


SayCountedAdj()

Synopsis

Say a adjective in declined form in order to count things

Description

Selects and plays the proper form of an adjective according to the gender and of the noun which it modifies and the number of objects named by the noun-verb combination which have been counted. Used when saying things such as "5 new messages". The various singular and plural forms of the adjective are selected by adding suffixes to filename.

If the channel language is English, then no suffix will ever be added (since, in English, adjectives are not declined). If the channel language is Russian or some other slavic language, then the suffix will the specified gender for nominative, and "x" for genative plural. (The genative singular is not used when counting things.) For example, SayCountedAdj(1,new,f) will play sound file "newa" (containing the word "novaya"), but SayCountedAdj(5,new,f) will play sound file "newx" (containing the word "novikh").

This application does not automatically answer and should be preceeded by an application such as Answer(), Progress(), or Proceeding().

Syntax

SayCountedAdj(number,filename,[gender])

Arguments

See Also


ADSIProg()

Synopsis

Load Asterisk ADSI Scripts into phone

Description

This application programs an ADSI Phone with the given script

Syntax

ADSIProg([script])

Arguments

See Also


UserEvent()

Synopsis

Send an arbitrary user-defined event to parties interested in a channel (AMI users and relevant res_stasis applications).

Description

Sends an arbitrary event to interested parties, with an optional body representing additional arguments. The body may be specified as a , delimited list of key:value pairs.

For AMI, each additional argument will be placed on a new line in the event and the format of the event will be:

Event: UserEvent

UserEvent:

[body]

If no body is specified, only Event and UserEvent headers will be present.

For res_stasis applications, the event will be provided as a JSON blob with additional arguments appearing as keys in the object and the eventname under the eventname key.

Syntax

UserEvent(eventname,[body])

Arguments

See Also


SendMail()

Synopsis

Sends an email using the system mailer. The recipient and sender info can be customized per invocation, and multiple attachments can be sent.

Description

Sends an email using the system mailer.

Sets MAILSTATUS to one of the following values:

Syntax

SendMail(recipient,subject,body,options)

Arguments


MP3Player()

Synopsis

Play an MP3 file or M3U playlist file or stream.

Description

Executes mpg123 to play the given location, which typically would be a mp3 filename or m3u playlist filename or a URL. Please read http://en.wikipedia.org/wiki/M3U to see how M3U playlist file format is like, Example usage would be exten => 1234,1,MP3Player(/var/lib/asterisk/playlist.m3u) User can exit by pressing any key on the dialpad, or by hanging up.

This application does not automatically answer and should be preceeded by an application such as Answer() or Progress().

Syntax

MP3Player(Location)

Arguments


Stasis()

Synopsis

Invoke an external Stasis application.

Description

Invoke a Stasis application.

This application will set the following channel variable upon completion:

Syntax

Stasis(app_name,[args])

Arguments


Verbose()

Synopsis

Send arbitrary text to verbose output.

Description

Sends an arbitrary text message to verbose output.

Syntax

Verbose([level,]message)

Arguments


Log()

Synopsis

Send arbitrary text to a selected log level.

Description

Sends an arbitrary text message to a selected log level.

Syntax

Log(level,message)

Arguments


SendImage()

Synopsis

Sends an image file.

Description

Send an image file on a channel supporting it.

Result of transmission will be stored in SENDIMAGESTATUS

Syntax

SendImage(filename)

Arguments

See Also


Echo()

Synopsis

Echo media, DTMF back to the calling party

Description

Echos back any media or DTMF frames read from the calling channel back to itself. This will not echo CONTROL, MODEM, or NULL frames. Note: If '#' detected application exits.

This application does not automatically answer and should be preceeded by an application such as Answer() or Progress().


NBScat()

Synopsis

Play an NBS local stream.

Description

Executes nbscat to listen to the local NBS stream. User can exit by pressing any key.


PrivacyManager()

Synopsis

Require phone number to be entered, if no CallerID sent

Description

If no Caller*ID is sent, PrivacyManager answers the channel and asks the caller to enter their phone number. The caller is given maxretries attempts to do so. The application does nothing if Caller*ID was received on the channel.

The application sets the following channel variable upon completion:

Syntax

PrivacyManager([maxretries,[minlength,[options,[context]]]])

Arguments

See Also


Pickup()

Synopsis

Directed extension call pickup.

Description

This application can pickup a specified ringing channel. The channel to pickup can be specified in the following ways.

1) If no extension targets are specified, the application will pickup a channel matching the pickup group of the requesting channel.

2) If the extension is specified with a context of the special string PICKUPMARK (for example 10@PICKUPMARK), the application will pickup a channel which has defined the channel variable PICKUPMARK with the same value as extension (in this example, 10).

3) If the extension is specified with or without a context, the channel with a matching extension and context will be picked up. If no context is specified, the current context will be used.

The extension is typically set on matching channels by the dial application that created the channel. The context is set on matching channels by the channel driver for the device.

Syntax

Pickup(extension&[extension2[&...]]])

Arguments


PickupChan()

Synopsis

Pickup a ringing channel.

Description

Pickup a specified channel if ringing.

Syntax

PickupChan(channel&[channel2[&...]],[options]])

Arguments


WaitForRing()

Synopsis

Wait for Ring Application.

Description

Returns 0 after waiting at least timeout seconds, and only after the next ring has completed. Returns 0 on success or -1 on hangup.

Syntax

WaitForRing(timeout)

Arguments


IVRDemo()

Synopsis

IVR Demo Application.

Description

This is a skeleton application that shows you the basic structure to create your own asterisk applications and demonstrates the IVR demo.

Syntax

IVRDemo(filename)

Arguments


BridgeAdd()

Synopsis

Join a bridge that contains the specified channel.

Description

This application places the incoming channel into the bridge containing the specified channel. The specified channel only needs to be the prefix of a full channel name IE. 'PJSIP/cisco0001'.

This application sets the following channel variable upon completion:

Syntax

BridgeAdd(channel)

Arguments


BridgeWait()

Synopsis

Put a call into the holding bridge.

Description

This application places the incoming channel into a holding bridge. The channel will then wait in the holding bridge until some event occurs which removes it from the holding bridge.

This application will answer calls which haven't already been answered.

Syntax

BridgeWait([name,[role,[options]]])

Arguments


TddRx()

Synopsis

Enable TDD transmit/receive processing on a channel.

Description

The TddRx application is used to begin listening for TDD tones from the channel. If TDD tones are detected, the received message will be posted via manager/stasis events for this channel.

This application will exit immediately after setting up an audiohook.

See Also


TddTx()

Synopsis

Send message using TDD tones on the current channel.

Description

Sends TDD tones to the channel in the same way as the TddTx manager action.

If TDD processing is not enabled via TddRx, will return an error.

Syntax

TddTx(message)

Arguments

See Also


Assert()

Synopsis

Asserts that an expression is true.

Description

Evaluates expression and continues dialplan execution if the expression is true and ends the call with a warning if it is false (unless the d option is provided).

This application can be used to verify functional correctness of dialplans (e.g. dialplan test cases), similar to the assert function in C. For instance, if a certain property is expected to always hold at some point in your dialplan, this application can be used to enforce that.

Syntax

Assert([expression,[options]])

Arguments

See Also


TestServer()

Synopsis

Execute Interface Test Server.

Description

Perform test server function and write call report. Results stored in /var/log/asterisk/testreports/<testid>-server.txt

See Also


TestClient()

Synopsis

Execute Interface Test Client.

Description

Executes test client with given testid. Results stored in /var/log/asterisk/testreports/<testid>-client.txt

Syntax

TestClient(testid)

Arguments

See Also


Zapateller()

Synopsis

Block telemarketers with SIT.

Description

Generates special information tone to block telemarketers from calling you.

This application will set the following channel variable upon completion:

Syntax

Zapateller(options)

Arguments


AMD()

Synopsis

Attempt to detect answering machines.

Description

This application attempts to detect answering machines at the beginning of outbound calls. Simply call this application after the call has been answered (outbound only, of course).

When loaded, AMD reads amd.conf and uses the parameters specified as default values. Those default values get overwritten when the calling AMD with parameters.

This application sets the following channel variables:

Syntax

AMD([initialSilence,[greeting,[afterGreetingSilence,[totalAnalysis Time,[miniumWordLength,[betweenWordSilence,[maximumNumberOfWords,[silenceThreshold,[maximumWordLength]]]]]]]]])

Arguments

See Also


ICES()

Synopsis

Encode and stream using 'ices'.

Description

Streams to an icecast server using ices (available separately). A configuration file must be supplied for ices (see contrib/asterisk-ices.xml).

ICES version 2 client and server required.

Syntax

ICES(config)

Arguments


VoiceMail()

Synopsis

Leave a Voicemail message.

Description

This application allows the calling party to leave a message for the specified list of mailboxes. When multiple mailboxes are specified, the greeting will be taken from the first mailbox specified. Dialplan execution will stop if the specified mailbox does not exist.

The Voicemail application will exit if any of the following DTMF digits are received:

This application will set the following channel variable upon completion:

Syntax

VoiceMail(mailbox1&[mailbox2[&...]],[options]])

Arguments

See Also


VoiceMailMain()

Synopsis

Check Voicemail messages.

Description

This application allows the calling party to check voicemail messages. A specific mailbox, and optional corresponding context, may be specified. If a mailbox is not provided, the calling party will be prompted to enter one. If a context is not specified, the default context will be used.

The VoiceMailMain application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VoiceMailMain([mailbox@[context,[options]]])

Arguments

See Also


VMAuthenticate()

Synopsis

Authenticate with Voicemail passwords.

Description

This application behaves the same way as the Authenticate application, but the passwords are taken from voicemail.conf. If the mailbox is specified, only that mailbox's password will be considered valid. If the mailbox is not specified, the channel variable AUTH_MAILBOX will be set with the authenticated mailbox.

The VMAuthenticate application will exit if the following DTMF digit is entered as Mailbox or Password, and the extension exists:

Syntax

VMAuthenticate([mailbox@[context,[options]]])

Arguments


VoiceMailPlayMsg()

Synopsis

Play a single voice mail msg from a mailbox by msg id.

Description

This application sets the following channel variable upon completion:

Syntax

VoiceMailPlayMsg([mailbox@[context,]]msg_id)

Arguments


VMSayName()

Synopsis

Play the name of a voicemail user

Description

This application will say the recorded name of the voicemail user specified as the argument to this application. If no context is provided, default is assumed.

Similar to the Background() application, playback of the recorded name can be interrupted by entering an extension, which will be searched for in the current context.

Syntax

VMSayName([mailbox@[context]])

Arguments


SendURL()

Synopsis

Send a URL.

Description

Requests client go to URL (IAX2) or sends the URL to the client (other channels).

Result is returned in the SENDURLSTATUS channel variable:

SendURL continues normally if the URL was sent correctly or if the channel does not support HTML transport. Otherwise, the channel is hung up.

Syntax

SendURL(URL,[option])

Arguments

See Also


Queue()

Synopsis

Queue a call for a call queue.

Description

In addition to transferring the call, a call may be parked and then picked up by another user.

This application will return to the dialplan if the queue does not exist, or any of the join options cause the caller to not enter the queue.

This application does not automatically answer and should be preceeded by an application such as Answer(), Progress(), or Ringing().

This application sets the following channel variables upon completion:

Syntax

Queue(queuename,[options,[URL&]]filename&[filename2[&...]],[timeout,[AGI,[macro,[gosub,[rule,[position]]]]]]])

Arguments

See Also


AddQueueMember()

Synopsis

Dynamically adds queue members.

Description

Dynamically adds interface to an existing queue. If the interface is already in the queue it will return an error.

This application sets the following channel variable upon completion:

Syntax

AddQueueMember(queuename,[interface,[penalty,[options,[membername,[stateinterface,[wrapuptime]]]]]])

Arguments

See Also


RemoveQueueMember()

Synopsis

Dynamically removes queue members.

Description

If the interface is NOT in the queue it will return an error.

This application sets the following channel variable upon completion:

Example: RemoveQueueMember(techsupport,SIP/3000)

Syntax

RemoveQueueMember(queuename,[interface])

Arguments

See Also


PauseQueueMember()

Synopsis

Pauses a queue member.

Description

Pauses (blocks calls for) a queue member. The given interface will be paused in the given queue. This prevents any calls from being sent from the queue to the interface until it is unpaused with UnpauseQueueMember or the manager interface. If no queuename is given, the interface is paused in every queue it is a member of. The application will fail if the interface is not found.

This application sets the following channel variable upon completion:

Example: PauseQueueMember(,SIP/3000)

Syntax

PauseQueueMember([queuename,]interface,[options,[reason]])

Arguments

See Also


UnpauseQueueMember()

Synopsis

Unpauses a queue member.

Description

Unpauses (resumes calls to) a queue member. This is the counterpart to PauseQueueMember() and operates exactly the same way, except it unpauses instead of pausing the given interface.

This application sets the following channel variable upon completion:

Example: UnpauseQueueMember(,SIP/3000)

Syntax

UnpauseQueueMember([queuename,]interface,[options,[reason]])

Arguments

See Also


QueueLog()

Synopsis

Writes to the queue_log file.

Description

Allows you to write your own events into the queue log.

Example: QueueLog(101,${UNIQUEID},${AGENT},WENTONBREAK,600)

Syntax

QueueLog(queuename,uniqueid,agent,event,[additionalinfo])

Arguments

See Also


QueueUpdate()

Synopsis

Writes to the queue_log file for OutBound calls and updates Realtime Data. Is used at h extension to be able to have all the parameters.

Description

Allows you to write Outbound events into the queue log.

Example: exten => h,1,QueueUpdate(${QUEUE}, ${UNIQUEID}, ${AGENT}, ${DIALSTATUS}, ${ANSWEREDTIME}, ${DIALEDTIME} | ${DIALEDNUMBER})

Syntax

QueueUpdate(queuename,uniqueid,agent,status,talktime,[params])

Arguments


Originate()

Synopsis

Originate a call.

Description

This application originates an outbound call and connects it to a specified extension or application. This application will block until the outgoing call fails or gets answered, unless the async option is used. At that point, this application will exit with the status variable set and dialplan processing will continue.

This application sets the following channel variable before exiting:

Syntax

Originate(tech_data,type,arg1,[arg2,[arg3,[timeout,[options]]]])

Arguments


Authenticate()

Synopsis

Authenticate a user

Description

This application asks the caller to enter a given password in order to continue dialplan execution.

If the password begins with the / character, it is interpreted as a file which contains a list of valid passwords, listed 1 password per line in the file.

When using a database key, the value associated with the key can be anything.

Users have three attempts to authenticate before the channel is hung up.

Syntax

Authenticate(password,[options,[maxdigits,[prompt]]])

Arguments

See Also


SendMF()

Synopsis

Sends arbitrary MF digits

Description

It will send all digits or terminate if it encounters an error.

Syntax

SendMF(digits,[timeout_ms,[duration_ms,[duration_ms_kp,[duration_ms_st,[channel]]]]])

Arguments

See Also


If()

Synopsis

Start an if branch.

Description

Start an If branch. Execution will continue inside the branch if expr is true.

Syntax

If(expr)

Arguments

See Also


EndIf()

Synopsis

End an if branch.

Description

Ends the branch begun by the preceding If() application.

See Also


ExitIf()

Synopsis

End an If branch.

Description

Exits an If() branch, whether or not it has completed.

See Also


MeetMe()

Synopsis

MeetMe conference bridge.

Description

Enters the user into a specified MeetMe conference. If the confno is omitted, the user will be prompted to enter one. User can exit the conference by hangup, or if the p option is specified, by pressing #.

The DAHDI kernel modules and a functional DAHDI timing source (see dahdi_test) must be present for conferencing to operate properly. In addition, the chan_dahdi channel driver must be loaded for the i and r options to operate at all.

Syntax

MeetMe([confno,[options,[pin]]])

Arguments

See Also


MeetMeCount()

Synopsis

MeetMe participant count.

Description

Plays back the number of users in the specified MeetMe conference. If var is specified, playback will be skipped and the value will be returned in the variable. Upon application completion, MeetMeCount will hangup the channel, unless priority n+1 exists, in which case priority progress will continue.

Syntax

MeetMeCount(confno,[var])

Arguments

See Also


MeetMeAdmin()

Synopsis

MeetMe conference administration.

Description

Run admin command for conference confno.

Will additionally set the variable MEETMEADMINSTATUS with one of the following values:

Syntax

MeetMeAdmin(confno,command,[user])

Arguments

See Also


MeetMeChannelAdmin()

Synopsis

MeetMe conference Administration (channel specific).

Description

Run admin command for a specific channel in any conference.

Syntax

MeetMeChannelAdmin(channel,command)

Arguments


SLAStation()

Synopsis

Shared Line Appearance Station.

Description

This application should be executed by an SLA station. The argument depends on how the call was initiated. If the phone was just taken off hook, then the argument station should be just the station name. If the call was initiated by pressing a line key, then the station name should be preceded by an underscore and the trunk name associated with that line button.

For example: station1_line1

On exit, this application will set the variable SLASTATION_STATUS to one of the following values:

Syntax

SLAStation(station)

Arguments


SLATrunk()

Synopsis

Shared Line Appearance Trunk.

Description

This application should be executed by an SLA trunk on an inbound call. The channel calling this application should correspond to the SLA trunk with the name trunk that is being passed as an argument.

On exit, this application will set the variable SLATRUNK_STATUS to one of the following values:

Syntax

SLATrunk(trunk,[options])

Arguments


While()

Synopsis

Start a while loop.

Description

Start a While Loop. Execution will return to this point when EndWhile() is called until expr is no longer true.

Syntax

While(expr)

Arguments

See Also


EndWhile()

Synopsis

End a while loop.

Description

Return to the previous called While().

See Also


ExitWhile()

Synopsis

End a While loop.

Description

Exits a While() loop, whether or not the conditional has been satisfied.

See Also


ContinueWhile()

Synopsis

Restart a While loop.

Description

Returns to the top of the while loop and re-evaluates the conditional.

See Also


Dictate()

Synopsis

Virtual Dictation Machine.

Description

Start dictation machine using optional base_dir for files.

Syntax

Dictate([base_dir,[filename]])

Arguments


Softmodem()

Synopsis

A Softmodem that connects the caller to a Telnet server.

Description

Softmodem(hostname,port,options): Simulates a FSK(V.23) or V.22bis modem. The modem on the other end is connected to the specified server using a simple TCP connection (like Telnet).


ChannelRedirect()

Synopsis

Redirects given channel to a dialplan target

Description

Sends the specified channel to the specified extension priority

This application sets the following channel variables upon completion

Syntax

ChannelRedirect(channel,[context,[extension,]]priority)

Arguments


NoCDR()

Synopsis

Tell Asterisk to not maintain a CDR for this channel.

Description

This application will tell Asterisk not to maintain a CDR for the current channel. This does NOT mean that information is not tracked; rather, if the channel is hung up no CDRs will be created for that channel.

If a subsequent call to ResetCDR occurs, all non-finalized CDRs created for the channel will be enabled.

This application is deprecated. Please use the CDR_PROP function to disable CDRs on a channel.

See Also


ResetCDR()

Synopsis

Resets the Call Data Record.

Description

This application causes the Call Data Record to be reset. Depending on the flags passed in, this can have several effects. With no options, a reset does the following:

1. The start time is set to the current time.

2. If the channel is answered, the answer time is set to the current time.

3. All variables are wiped from the CDR. Note that this step can be prevented with the v option.

On the other hand, if the e option is specified, the effects of the NoCDR application will be lifted. CDRs will be re-enabled for this channel.

The e option is deprecated. Please use the CDR_PROP function instead.

Syntax

ResetCDR([options])

Arguments

See Also


SMS()

Synopsis

Communicates with SMS service centres and SMS capable analogue phones.

Description

SMS handles exchange of SMS data with a call to/from SMS capable phone or SMS PSTN service center. Can send and/or receive SMS messages. Works to ETSI ES 201 912; compatible with BT SMS PSTN service in UK and Telecom Italia in Italy.

Typical usage is to use to handle calls from the SMS service centre CLI, or to set up a call using outgoing or manager interface to connect service centre to SMS().

"Messages are processed as per text file message queues. smsq (a separate software) is a command to generate message queues and send messages.

The protocol has tight delay bounds. Please use short frames and disable/keep short the jitter buffer on the ATA to make sure that respones (ACK etc.) are received in time.

Syntax

SMS(name,[options,[addr,[body]]])

Arguments


Gosub()

Synopsis

Jump to label, saving return address.

Description

Jumps to the label specified, saving the return address.

Syntax

Gosub([context,[exten,]]arg1[,...]],[argN])

Arguments

See Also


GosubIf()

Synopsis

Conditionally jump to label, saving return address.

Description

If the condition is true, then jump to labeliftrue. If false, jumps to labeliffalse, if specified. In either case, a jump saves the return point in the dialplan, to be returned to with a Return.

Syntax

GosubIf(condition:[labeliftrue:[labeliffalse]])

Arguments

See Also


Return()

Synopsis

Return from gosub routine.

Description

Jumps to the last label on the stack, removing it. The return value, if any, is saved in the channel variable GOSUB_RETVAL.

Syntax

Return([value])

Arguments

See Also


ReturnIf()

Synopsis

Conditionally return from gosub routine.

Description

If expression is true, jumps to the last label on the stack, removing it. The return valueiftrue, if any, is saved in the channel variable GOSUB_RETVAL. If expression is false, and valueiffalse is specified, jumps to the last label on the stack, removing it, and saving valueiffalse in the the channel variable GOSUB_RETVAL.

Syntax

ReturnIf(expression:valueiftrue:[valueiffalse])

Arguments

See Also


StackPop()

Synopsis

Remove one address from gosub stack.

Description

Removes last label on the stack, discarding it.

See Also


Morsecode()

Synopsis

Plays morse code.

Description

Plays the Morse code equivalent of the passed string.

This application does not automatically answer and should be preceeded by an application such as Answer() or Progress().

This application uses the following variables:

Syntax

Morsecode(string)

Arguments

See Also


SendFAX()

Synopsis

Send a Fax

Description

Send a given TIFF file to the channel as a FAX.

This application sets the following channel variables:

Syntax

SendFAX(filename,[a])

Arguments


ReceiveFAX()

Synopsis

Receive a Fax

Description

Receives a FAX from the channel into the given filename overwriting the file if it already exists.

File created will be in TIFF format.

This application sets the following channel variables:

Syntax

ReceiveFAX(filename,[c])

Arguments


BackgroundDetect()

Synopsis

Background a file with talk detect.

Description

Plays back filename, waiting for interruption from a given digit (the digit must start the beginning of a valid extension, or it will be ignored). During the playback of the file, audio is monitored in the receive direction, and if a period of non-silence which is greater than min ms yet less than max ms is followed by silence for at least sil ms, which occurs during the first analysistime ms, then the audio playback is aborted and processing jumps to the talk extension, if available.

Syntax

BackgroundDetect(filename,[sil,[min,[max,[analysistime]]]])

Arguments


ReadExten()

Synopsis

Read an extension into a variable.

Description

Reads a # terminated string of digits from the user into the given variable.

Will set READEXTENSTATUS on exit with one of the following statuses:

Syntax

ReadExten(variable,[filename,[context,[option,[timeout]]]])

Arguments


StoreDTMF()

Synopsis

Stores DTMF digits transmitted or received on a channel.

Description

The StoreDTMF function can be used to obtain digits sent in the TX or RX direction of any channel.

The arguments are:

var_name: Name of variable to which to append digits.

max_digits: The maximum number of digits to store in the variable. Defaults to 0 (no maximum). After reading maximum digits, no more digits will be stored.

For example:

StoreDTMF(TX,CDR(digits))

StoreDTMF(RX,testvar,24)

StoreDTMF(remove)

Syntax

StoreDTMF(direction)

Arguments


Record()

Synopsis

Record to a file.

Description

If filename contains %d, these characters will be replaced with a number incremented by one each time the file is recorded. Use to see the available formats on your system User can press # to terminate the recording and continue to the next priority. If the user hangs up during a recording, all data will be lost and the application will terminate.

Syntax

Record(filename.format,[silence,[maxduration,[options]]])

Arguments


Playback()

Synopsis

Play a file.

Description

Plays back given filenames (do not put extension of wav/alaw etc). The playback command answer the channel if no options are specified. If the file is non-existant it will fail

This application sets the following channel variable upon completion:

See Also: Background (application) -- for playing sound files that are interruptible

WaitExten (application) -- wait for digits from caller, optionally play music on hold

Syntax

Playback(filename&[filename2[&...]],[options]])

Arguments

See Also


AttendedTransfer()

Synopsis

Attended transfer to the extension provided and TRANSFER_CONTEXT

Description

Queue up attended transfer to the specified extension in the TRANSFER_CONTEXT.

Note that the attended transfer only work when two channels have answered and are bridged together.

Make sure to set Attended Transfer DTMF feature atxfer and attended transfer is permitted.

The result of the application will be reported in the ATTENDEDTRANSFERSTATUS channel variable:

Syntax

AttendedTransfer(exten)

Arguments


MixMonitor()

Synopsis

Record a call and mix the audio during the recording. Use of StopMixMonitor is required to guarantee the audio file is available for processing during dialplan execution.

Description

Records the audio on the current channel to the specified file.

This application does not automatically answer and should be preceeded by an application such as Answer or Progress().

MixMonitor runs as an audiohook.

If a filename passed to MixMonitor ends with .wav49, Asterisk will silently convert the extension to .WAV for legacy reasons. MIXMONITOR_FILENAME will contain the actual filename that Asterisk is writing to, not necessarily the value that was passed in.

Syntax

MixMonitor(filename.extension,[options,[command]])

Arguments

See Also


StopMixMonitor()

Synopsis

Stop recording a call through MixMonitor, and free the recording's file handle.

Description

Stops the audio recording that was started with a call to MixMonitor() on the current channel.

Syntax

StopMixMonitor([MixMonitorID])

Arguments

See Also


AlarmReceiver()

Synopsis

Provide support for receiving alarm reports from a burglar or fire alarm panel.

Description

This application should be called whenever there is an alarm panel calling in to dump its events. The application will handshake with the alarm panel, and receive events, validate them, handshake them, and store them until the panel hangs up. Once the panel hangs up, the application will run the system command specified by the eventcmd setting in alarmreceiver.conf and pipe the events to the standard input of the application. The configuration file also contains settings for DTMF timing, and for the loudness of the acknowledgement tones.

The application is affected by the following variables:

Few Ademco DTMF signalling formats are detected automaticaly: Contact ID, Express 4+1, Express 4+2, High Speed and Super Fast.

See Also


DialTone()

Synopsis

Reads a telephone number from a user, terminating dialing against a digit map.

Description

Reads a telephone number from a user into the given variable. Dialing concludes once an extension match is found in context that returns a non-zero number.

This application does not automatically answer the channel and should be preceded by Progress or Answer.

Syntax

DialTone(variable,context&filename&[filename2[&...]]&]filename&[filename2[&...]],[maxdigits,[timeout,[leading,[options]]]]])

Arguments

See Also


WaitForFrame()

Synopsis

Waits for a given frame type to be received on a channel.

Description

Waits for a specified frame type to be received before dialplan execution continues, with a configurable timeout. This is useful if the channel needs to wait for a certain type of control frame to be received in order for call setup or progression to continue.

Example: Inpulsing to a switch using EM signaling
	exten => _X!,1,Progress()
	same => n,WaitForFrame(WINK,10) ; wait up to 10s for a wink on the channel
	same => n,GotoIf($["${WAITFORFRAMESTATUS}" != "SUCCESS"]?fail,s,1)
	same => n,SendMF(*${EXTEN}#)

Syntax

WaitForFrame(frame,[timeout,[times]])

Arguments

See Also


SendFrame()

Synopsis

Sends an arbitrary control frame on a channel.

Description

Sends an arbitrary control frame on a channel.

Example: Send Wink
	same => n,SendFrame(WINK)

Syntax

SendFrame(frame)

Arguments

See Also


Page()

Synopsis

Page series of phones

Description

Places outbound calls to the given technology/resource and dumps them into a conference bridge as muted participants. The original caller is dumped into the conference as a speaker and the room is destroyed when the original caller leaves.

Syntax

Page(Technology/Resource&[Technology2/Resource2[&...]],[options,[timeout]]])

Arguments

See Also


ConfBridge()

Synopsis

Conference bridge application.

Description

Enters the user into a specified conference bridge. The user can exit the conference by hangup or DTMF menu option.

This application sets the following channel variable upon completion:

Syntax

ConfBridge(conference,[bridge_profile,[user_profile,[menu]]])

Arguments

See Also


ConfKick()

Synopsis

Kicks channel(s) from the requested ConfBridge.

Description

Kicks the requested channel(s) from a conference bridge.

Syntax

ConfKick(conference,[channel])

Arguments

See Also


ForkCDR()

Synopsis

Forks the current Call Data Record for this channel.

Description

Causes the Call Data Record engine to fork a new CDR starting from the time the application is executed. The forked CDR will be linked to the end of the CDRs associated with the channel.

Syntax

ForkCDR([options])

Arguments

See Also


WaitUntil()

Synopsis

Wait (sleep) until the current time is the given epoch.

Description

Waits until the given epoch.

Sets WAITUNTILSTATUS to one of the following values:

Syntax

WaitUntil(epoch)

Arguments


ToneSweep()

Synopsis

Tone sweep test

Description

Generates an ascending or descending tone sweep (chirp) between two frequencies.

Syntax

ToneSweep([start,[end,[duration,[vol]]]])

Arguments

See Also


ChanIsAvail()

Synopsis

Check channel availability

Description

This application will check to see if any of the specified channels are available.

This application sets the following channel variables:

Syntax

ChanIsAvail(Technology/Resource&[Technology2/Resource2[&...]],[options]])

Arguments


System()

Synopsis

Execute a system command.

Description

Executes a command by using system(). If the command fails, the console should report a fallthrough.

Result of execution is returned in the SYSTEMSTATUS channel variable:

Syntax

System(command)

Arguments


TrySystem()

Synopsis

Try executing a system command.

Description

Executes a command by using system().

Result of execution is returned in the SYSTEMSTATUS channel variable:

Syntax

TrySystem(command)

Arguments


DISA()

Synopsis

Direct Inward System Access.

Description

The DISA, Direct Inward System Access, application allows someone from outside the telephone switch (PBX) to obtain an internal system dialtone and to place calls from it as if they were placing a call from within the switch. DISA plays a dialtone. The user enters their numeric passcode, followed by the pound sign #. If the passcode is correct, the user is then given system dialtone within context on which a call may be placed. If the user enters an invalid extension and extension i exists in the specified context, it will be used.

Be aware that using this may compromise the security of your PBX.

The arguments to this application (in extensions.conf) allow either specification of a single global passcode (that everyone uses), or individual passcodes contained in a file (filename).

The file that contains the passcodes (if used) allows a complete specification of all of the same arguments available on the command line, with the sole exception of the options. The file may contain blank lines, or comments starting with # or ;.

Syntax

DISA(passcode|filename,[context,[cid@]]mailbox@[context,[options]])

Arguments

See Also


PlayTones()

Synopsis

Play a tone list.

Description

Plays a tone list. Execution will continue with the next step in the dialplan immediately while the tones continue to play.

See the sample indications.conf for a description of the specification of a tonelist.

Syntax

PlayTones(arg)

Arguments

See Also


StopPlayTones()

Synopsis

Stop playing a tone list.

Description

Stop playing a tone list, initiated by PlayTones().

See Also


Reload()

Synopsis

Reloads an Asterisk module, blocking the channel until the reload has completed.

Description

Reloads the specified (or all) Asterisk modules and reports success or failure. Success is determined by each individual module, and if all reloads are successful, that is considered an aggregate success. If multiple modules are specified and any module fails, then FAILURE will be returned. It is still possible that other modules did successfully reload, however.

Sets RELOADSTATUS to one of the following values:

Syntax

Reload([module])

Arguments


ChanSpy()

Synopsis

Listen to a channel, and optionally whisper into it.

Description

This application is used to listen to the audio from an Asterisk channel. This includes the audio coming in and out of the channel being spied on. If the chanprefix parameter is specified, only channels beginning with this string will be spied upon.

While spying, the following actions may be performed:

- Dialing # cycles the volume level.

- Dialing * will stop spying and look for another channel to spy on.

- Dialing a series of digits followed by # builds a channel name to append to chanprefix. For example, executing ChanSpy(Agent) and then dialing the digits '1234#' while spying will begin spying on the channel 'Agent/1234'. Note that this feature will be overridden if the 'd' or 'u' options are used.

The X option supersedes the three features above in that if a valid single digit extension exists in the correct context ChanSpy will exit to it. This also disables choosing a channel based on chanprefix and a digit sequence.

Syntax

ChanSpy([chanprefix,[options]])

Arguments

See Also


ExtenSpy()

Synopsis

Listen to a channel, and optionally whisper into it.

Description

This application is used to listen to the audio from an Asterisk channel. This includes the audio coming in and out of the channel being spied on. Only channels created by outgoing calls for the specified extension will be selected for spying. If the optional context is not supplied, the current channel's context will be used.

While spying, the following actions may be performed:

- Dialing # cycles the volume level.

- Dialing * will stop spying and look for another channel to spy on.

The X option supersedes the three features above in that if a valid single digit extension exists in the correct context ChanSpy will exit to it. This also disables choosing a channel based on chanprefix and a digit sequence.

Syntax

ExtenSpy(exten@[context,[options]])

Arguments

See Also


DAHDIScan()

Synopsis

Scan DAHDI channels to monitor calls.

Description

Allows a call center manager to monitor DAHDI channels in a convenient way. Use # to select the next channel and use * to exit.

Syntax

DAHDIScan([group])

Arguments

See Also


DAHDIRAS()

Synopsis

Executes DAHDI ISDN RAS application.

Description

Executes a RAS server using pppd on the given channel. The channel must be a clear channel (i.e. PRI source) and a DAHDI channel to be able to use this function (No modem emulation is included).

Your pppd must be patched to be DAHDI aware.

Syntax

DAHDIRAS(args)

Arguments


OSPAuth()

Synopsis

OSP Authentication.

Description

Authenticate a call by OSP.

Input variables:

Output variables:

This application sets the following channel variable upon completion:

Syntax

OSPAuth([provider,[options]])

Arguments

See Also


OSPLookup()

Synopsis

Lookup destination by OSP.

Description

Looks up destination via OSP.

Input variables:

Output variables:

This application sets the following channel variable upon completion:

Syntax

OSPLookup(exten,[provider,[options]])

Arguments

See Also


OSPNext()

Synopsis

Lookup next destination by OSP.

Description

Looks up the next destination via OSP.

Input variables:

Output variables:

This application sets the following channel variable upon completion:

See Also


OSPFinish()

Synopsis

Report OSP entry.

Description

Report call state.

Input variables:

This application sets the following channel variable upon completion:

Syntax

OSPFinish([cause,[options]])

Arguments

See Also


StreamSilence()

Synopsis

Streams silence to a channel.

Description

Streams silent audio to a channel, for up to a provided number of seconds.

This application will send silent audio to a channel, as opposed to applications like Wait which do not. This guarantees that audiohooks will function properly, even if the channel is not bridged to something that is continously sending frames.

Syntax

StreamSilence([timeout])

Arguments

See Also


Festival()

Synopsis

Say text to the user.

Description

Connect to Festival, send the argument, get back the waveform, play it to the user, allowing any given interrupt keys to immediately terminate and return the value, or any to allow any number back (useful in dialplan).

Syntax

Festival(text,[intkeys])

Arguments


WaitForCondition()

Synopsis

Wait (sleep) until the given condition is true.

Description

Waits until expression evaluates to true, checking every interval seconds for up to timeout. Default is evaluate expression every 50 milliseconds with no timeout.

Sets WAITFORCONDITIONSTATUS to one of the following values:

Example: Wait for condition dialplan variable/function to become 1 for up to 40 seconds, checking every 500ms
	same => n,WaitForCondition(#,#["#{condition}"="1"],40,0.5)

Syntax

WaitForCondition(replacementchar,expression,[timeout,[interval]])

Arguments


ExternalIVR()

Synopsis

Interfaces with an external IVR application.

Description

Either forks a process to run given command or makes a socket to connect to given host and starts a generator on the channel. The generator's play list is controlled by the external application, which can add and clear entries via simple commands issued over its stdout. The external application will receive all DTMF events received on the channel, and notification if the channel is hung up. The received on the channel, and notification if the channel is hung up. The application will not be forcibly terminated when the channel is hung up. For more information see doc/AST.pdf.

Syntax

ExternalIVR([arg1,[arg2,[options]]])

Arguments


BlindTransfer()

Synopsis

Blind transfer channel(s) to the extension and context provided

Description

Redirect all channels currently bridged to the caller channel to the specified destination.

The result of the application will be reported in the BLINDTRANSFERSTATUS channel variable:

Syntax

BlindTransfer(exten,[context])

Arguments


ClearHash()

Synopsis

Clear the keys from a specified hashname.

Description

Clears all keys out of the specified hashname.

Syntax

ClearHash(hashname)

Arguments


ODBCFinish()

Synopsis

Clear the resultset of a sucessful multirow query.

Description

For queries which are marked as mode=multirow, this will clear any remaining rows of the specified resultset.

Syntax

ODBCFinish(result-id)

Arguments


HangupCauseClear()

Synopsis

Clears hangup cause information from the channel that is available through HANGUPCAUSE.

Description

Clears all channel-specific hangup cause information from the channel. This is never done automatically (i.e. for new Dial()s).

See Also


CallCompletionRequest()

Synopsis

Request call completion service for previous call

Description

Request call completion service for a previously failed call attempt.

This application sets the following channel variables:


CallCompletionCancel()

Synopsis

Cancel call completion service

Description

Cancel a Call Completion Request.

This application sets the following channel variables:


Bridge()

Synopsis

Bridge two channels.

Description

Allows the ability to bridge two channels via the dialplan.

This application sets the following channel variable upon completion:

Syntax

Bridge(channel,[options])

Arguments

See Also


Set()

Synopsis

Set channel variable or function value.

Description

This function can be used to set the value of channel variables or dialplan functions. When setting variables, if the variable name is prefixed with _, the variable will be inherited into channels created from the current channel. If the variable name is prefixed with __, the variable will be inherited into channels created from the current channel and all children channels.

If (and only if), in /etc/asterisk/asterisk.conf, you have a [compat] category, and you have app_set = 1.4 under that, then the behavior of this app changes, and strips surrounding quotes from the right hand side as it did previously in 1.4. The advantages of not stripping out quoting, and not caring about the separator characters (comma and vertical bar) were sufficient to make these changes in 1.6. Confusion about how many backslashes would be needed to properly protect separators and quotes in various database access strings has been greatly reduced by these changes.

Syntax

Set(name,value)

Arguments

See Also


MSet()

Synopsis

Set channel variable(s) or function value(s).

Description

This function can be used to set the value of channel variables or dialplan functions. When setting variables, if the variable name is prefixed with _, the variable will be inherited into channels created from the current channel If the variable name is prefixed with __, the variable will be inherited into channels created from the current channel and all children channels. MSet behaves in a similar fashion to the way Set worked in 1.2/1.4 and is thus prone to doing things that you may not expect. For example, it strips surrounding double-quotes from the right-hand side (value). If you need to put a separator character (comma or vert-bar), you will need to escape them by inserting a backslash before them. Avoid its use if possible.

Syntax

MSet(name1=value1=name2=value2)

Arguments

See Also


MessageSend()

Synopsis

Send a text message.

Description

Send a text message. The body of the message that will be sent is what is currently set to MESSAGE(body). This may he come from an incoming message. The technology chosen for sending the message is determined based on a prefix to the destination parameter.

This application sets the following channel variables:

Syntax

MessageSend(destination,[from,[to]])

Arguments


Answer()

Synopsis

Answer a channel if ringing.

Description

If the call has not been answered, this application will answer it. Otherwise, it has no effect on the call.

Syntax

Answer([delay])

Arguments

See Also


BackGround()

Synopsis

Play an audio file while waiting for digits of an extension to go to.

Description

This application will play the given list of files (do not put extension) while waiting for an extension to be dialed by the calling channel. To continue waiting for digits after this application has finished playing files, the WaitExten application should be used.

If one of the requested sound files does not exist, call processing will be terminated.

This application sets the following channel variable upon completion:

Syntax

BackGround(filename1&[filename2[&...]],[options,[langoverride,[context]]]])

Arguments

See Also


Busy()

Synopsis

Indicate the Busy condition.

Description

This application will indicate the busy condition to the calling channel.

Syntax

Busy([timeout])

Arguments

See Also


Congestion()

Synopsis

Indicate the Congestion condition.

Description

This application will indicate the congestion condition to the calling channel.

Syntax

Congestion([timeout])

Arguments

See Also


ExecIfTime()

Synopsis

Conditional application execution based on the current time.

Description

This application will execute the specified dialplan application, with optional arguments, if the current time matches the given time specification.

Syntax

ExecIfTime(times,weekdays,mdays,months,[timezone,]appargs)

Arguments

See Also


Goto()

Synopsis

Jump to a particular priority, extension, or context.

Description

This application will set the current context, extension, and priority in the channel structure. After it completes, the pbx engine will continue dialplan execution at the specified location. If no specific extension, or extension and context, are specified, then this application will just set the specified priority of the current extension.

At least a priority is required as an argument, or the goto will return a -1, and the channel and call will be terminated.

If the location that is put into the channel information is bogus, and asterisk cannot find that location in the dialplan, then the execution engine will try to find and execute the code in the i (invalid) extension in the current context. If that does not exist, it will try to execute the h extension. If neither the h nor i extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated. What this means is that, for example, you specify a context that does not exist, then it will not be possible to find the h or i extensions, and the call will terminate!

Syntax

Goto([context,[extensions,]]priority)

Arguments

See Also


GotoIf()

Synopsis

Conditional goto.

Description

This application will set the current context, extension, and priority in the channel structure based on the evaluation of the given condition. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. The labels are specified with the same syntax as used within the Goto application. If the label chosen by the condition is omitted, no jump is performed, and the execution passes to the next instruction. If the target location is bogus, and does not exist, the execution engine will try to find and execute the code in the i (invalid) extension in the current context. If that does not exist, it will try to execute the h extension. If neither the h nor i extensions have been defined, the channel is hung up, and the execution of instructions on the channel is terminated. Remember that this command can set the current context, and if the context specified does not exist, then it will not be able to find any 'h' or 'i' extensions there, and the channel and call will both be terminated!.

Syntax

GotoIf(condition:[labeliftrue:[labeliffalse]])

Arguments

See Also


GotoIfTime()

Synopsis

Conditional Goto based on the current time.

Description

This application will set the context, extension, and priority in the channel structure based on the evaluation of the given time specification. After this application completes, the pbx engine will continue dialplan execution at the specified location in the dialplan. If the current time is within the given time specification, the channel will continue at labeliftrue. Otherwise the channel will continue at labeliffalse. If the label chosen by the condition is omitted, no jump is performed, and execution passes to the next instruction. If the target jump location is bogus, the same actions would be taken as for Goto. Further information on the time specification can be found in examples illustrating how to do time-based context includes in the dialplan.

Syntax

GotoIfTime(times,weekdays,mdays,months,[timezone:[labeliftrue:[labeliffalse]]])

Arguments

See Also


ImportVar()

Synopsis

Import a variable from a channel into a new variable.

Description

This application imports a variable from the specified channel (as opposed to the current one) and stores it as a variable (newvar) in the current channel (the channel that is calling this application). Variables created by this application have the same inheritance properties as those created with the Set application.

Syntax

ImportVar(newvar,channelname,variable)

Arguments

See Also


Hangup()

Synopsis

Hang up the calling channel.

Description

This application will hang up the calling channel.

Syntax

Hangup([causecode])

Arguments

See Also


Incomplete()

Synopsis

Returns AST_PBX_INCOMPLETE value.

Description

Signals the PBX routines that the previous matched extension is incomplete and that further input should be allowed before matching can be considered to be complete. Can be used within a pattern match when certain criteria warrants a longer match.

Syntax

Incomplete([n])

Arguments


NoOp()

Synopsis

Do Nothing (No Operation).

Description

This application does nothing. However, it is useful for debugging purposes.

This method can be used to see the evaluations of variables or functions without having any effect.

Syntax

NoOp([text])

Arguments

See Also


Proceeding()

Synopsis

Indicate proceeding.

Description

This application will request that a proceeding message be provided to the calling channel.


Progress()

Synopsis

Indicate progress.

Description

This application will request that in-band progress information be provided to the calling channel.

See Also


RaiseException()

Synopsis

Handle an exceptional condition.

Description

This application will jump to the e extension in the current context, setting the dialplan function EXCEPTION(). If the e extension does not exist, the call will hangup.

Syntax

RaiseException(reason)

Arguments

See Also


Ringing()

Synopsis

Indicate ringing tone.

Description

This application will request that the channel indicate a ringing tone to the user.

See Also


SayAlpha()

Synopsis

Say Alpha.

Description

This application will play the sounds that correspond to the letters of the given string. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayAlpha(string)

Arguments

See Also


SayAlphaCase()

Synopsis

Say Alpha.

Description

This application will play the sounds that correspond to the letters of the given string. Optionally, a casetype may be specified. This will be used for case-insensitive or case-sensitive pronunciations. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayAlphaCase(casetype,string)

Arguments

See Also


SayDigits()

Synopsis

Say Digits.

Description

This application will play the sounds that correspond to the digits of the given number. This will use the language that is currently set for the channel. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayDigits(digits)

Arguments

See Also


SayMoney()

Synopsis

Say Money.

Description

This application will play the currency sounds for the given floating point number in the current language. Currently only English and US Dollars is supported. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayMoney(dollars)

Arguments

See Also


SayNumber()

Synopsis

Say Number.

Description

This application will play the sounds that correspond to the given digits. Optionally, a gender may be specified. This will use the language that is currently set for the channel. See the CHANNEL() function for more information on setting the language for the channel. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayNumber(digits,[gender])

Arguments

See Also


SayOrdinal()

Synopsis

Say Ordinal Number.

Description

This application will play the ordinal sounds that correspond to the given digits (e.g. 1st, 42nd). Currently only English is supported.

Optionally, a gender may be specified. This will use the language that is currently set for the channel. See the CHANNEL() function for more information on setting the language for the channel. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayOrdinal(digits,[gender])

Arguments

See Also


SayPhonetic()

Synopsis

Say Phonetic.

Description

This application will play the sounds from the phonetic alphabet that correspond to the letters in the given string. If the channel variable SAY_DTMF_INTERRUPT is set to 'true' (case insensitive), then this application will react to DTMF in the same way as Background.

Syntax

SayPhonetic(string)

Arguments

See Also


SetAMAFlags()

Synopsis

Set the AMA Flags.

Description

This application will set the channel's AMA Flags for billing purposes.

Syntax

SetAMAFlags([flag])

Arguments

See Also


Wait()

Synopsis

Waits for some time.

Description

This application waits for a specified number of seconds.

Syntax

Wait(seconds)

Arguments


WaitDigit()

Synopsis

Waits for a digit to be entered.

Description

This application waits for the user to press one of the accepted digits for a specified number of seconds.

Syntax

WaitDigit([seconds,[digits]])

Arguments

See Also


WaitExten()

Synopsis

Waits for an extension to be entered.

Description

This application waits for the user to enter a new extension for a specified number of seconds.

Syntax

WaitExten([seconds,[options]])

Arguments

See Also


Park()

Synopsis

Park yourself.

Description

Used to park yourself (typically in combination with an attended transfer to know the parking space).

If you set the PARKINGEXTEN variable to a parking space extension in the parking lot, Park() will attempt to park the call on that extension. If the extension is already in use then execution will continue at the next priority.

If the parkeddynamic option is enabled in res_parking.conf the following variables can be used to dynamically create new parking lots. When using dynamic parking lots, be aware of the conditions as explained in the notes section below.

The PARKINGDYNAMIC variable specifies the parking lot to use as a template to create a dynamic parking lot. It is an error to specify a non-existent parking lot for the template. If not set then the default parking lot is used as the template.

The PARKINGDYNCONTEXT variable specifies the dialplan context to use for the newly created dynamic parking lot. If not set then the context from the parking lot template is used. The context is created if it does not already exist and the new parking lot needs to create extensions.

The PARKINGDYNEXTEN variable specifies the parkext to use for the newly created dynamic parking lot. If not set then the parkext is used from the parking lot template. If the template does not specify a parkext then no extensions are created for the newly created parking lot. The dynamic parking lot cannot be created if it needs to create extensions that overlap existing parking lot extensions. The only exception to this is for the parkext extension and only if neither of the overlaping parking lot's parkext is exclusive.

The PARKINGDYNPOS variable specifies the parking positions to use for the newly created dynamic parking lot. If not set then the parkpos from the parking lot template is used.

This application must be used as the first extension priority to be recognized as a parking access extension for blind transfers. Blind transfers and the DTMF one-touch parking feature need this distinction to operate properly. The parking access extension in this case is treated like a dialplan hint.

Syntax

Park([parking_lot_name,[options]])

Arguments

See Also


ParkedCall()

Synopsis

Retrieve a parked call.

Description

Used to retrieve a parked call from a parking lot.

If a parking lot's parkext option is set, then Parking lots will automatically create and manage dialplan extensions in the parking lot context. If that is the case then you will not need to manage parking extensions yourself, just include the parking context of the parking lot.

Syntax

ParkedCall([parking_lot_name,[parking_space]])

Arguments

See Also


ParkAndAnnounce()

Synopsis

Park and Announce.

Description

Park a call into the parkinglot and announce the call to another channel.

The variable PARKEDAT will contain the parking extension into which the call was placed. Use with the Local channel to allow the dialplan to make use of this information.

Syntax

ParkAndAnnounce([parking_lot_name,[options:]]announce:[announce1[:...]],]dial)

Arguments

See Also


ODBC_Commit()

Synopsis

Commits a currently open database transaction.

Description

Commits the database transaction specified by transaction ID or the current active transaction, if not specified.

Syntax

ODBC_Commit([transaction ID])

Arguments


ODBC_Rollback()

Synopsis

Rollback a currently open database transaction.

Description

Rolls back the database transaction specified by transaction ID or the current active transaction, if not specified.

Syntax

ODBC_Rollback([transaction ID])

Arguments


Monitor()

Synopsis

Monitor a channel.

Description

Used to start monitoring a channel. The channel's input and output voice packets are logged to files until the channel hangs up or monitoring is stopped by the StopMonitor application.

By default, files are stored to /var/spool/asterisk/monitor/. Returns -1 if monitor files can't be opened or if the channel is already monitored, otherwise 0.

Syntax

Monitor(file_format:[urlbase,[fname_base,[options]]])

Arguments

See Also


StopMonitor()

Synopsis

Stop monitoring a channel.

Description

Stops monitoring a channel. Has no effect if the channel is not monitored.


ChangeMonitor()

Synopsis

Change monitoring filename of a channel.

Description

Changes monitoring filename of a channel. Has no effect if the channel is not monitored.

Syntax

ChangeMonitor(filename_base)

Arguments


PauseMonitor()

Synopsis

Pause monitoring of a channel.

Description

Pauses monitoring of a channel until it is re-enabled by a call to UnpauseMonitor.

See Also


UnpauseMonitor()

Synopsis

Unpause monitoring of a channel.

Description

Unpauses monitoring of a channel on which monitoring had previously been paused with PauseMonitor.

See Also


MusicOnHold()

Synopsis

Play Music On Hold indefinitely.

Description

Plays hold music specified by class. If omitted, the default music source for the channel will be used. Change the default class with Set(CHANNEL(musicclass)=...). If duration is given, hold music will be played specified number of seconds. If duration is ommited, music plays indefinitely. Returns 0 when done, -1 on hangup.

This application does not automatically answer and should be preceeded by an application such as Answer() or Progress().

Syntax

MusicOnHold(class,[duration])

Arguments


StartMusicOnHold()

Synopsis

Play Music On Hold.

Description

Starts playing music on hold, uses default music class for channel. Starts playing music specified by class. If omitted, the default music source for the channel will be used. Always returns 0.

Syntax

StartMusicOnHold(class)

Arguments


StopMusicOnHold()

Synopsis

Stop playing Music On Hold.

Description

Stops playing music on hold.


AGI()

Synopsis

Executes an AGI compliant application.

Description

Executes an Asterisk Gateway Interface compliant program on a channel. AGI allows Asterisk to launch external programs written in any language to control a telephony channel, play audio, read DTMF digits, etc. by communicating with the AGI protocol.

The following variants of AGI exist, and are chosen based on the value passed to command:

This application sets the following channel variable upon completion:

As of 1.6.0, this channel will not stop dialplan execution on hangup inside of this application. Dialplan execution will continue normally, even upon hangup until the AGI application signals a desire to stop (either by exiting or, in the case of a net script, by closing the connection).

A locally executed AGI script will receive SIGHUP on hangup from the channel except when using DeadAGI (or when the channel is already hungup). A fast AGI server will correspondingly receive a HANGUP inline with the command dialog. Both of these signals may be disabled by setting the AGISIGHUP channel variable to no before executing the AGI application. Alternatively, if you would like the AGI application to exit immediately after a channel hangup is detected, set the AGIEXITONHANGUP variable to yes.

Example: AGI invocation examples
	; Start the AGI script /tmp/my-cool-script.sh, passing it the contents
	; of the channel variable FOO
	same => n,AGI(/tmp/my-cool-script.sh,${FOO})
	
	; Start the AGI script my-cool-script.sh located in the astagidir
	; directory, specified in asterisk.conf
	same => n,AGI(my-cool-script.sh)
	
	; Connect to the FastAGI server located at 127.0.0.1 and start the script
	; awesome-script
	same => n,AGI(agi://127.0.0.1/awesome-script)
	
	; Start AsyncAGI
	same => n,AGI(agi:async)

Syntax

AGI(command,arg1,[arg2])

Arguments

See Also


EAGI()

Synopsis

Executes an EAGI compliant application.

Description

Using 'EAGI' provides enhanced AGI, with incoming audio available out of band on file descriptor 3. In all other respects, it behaves in the same fashion as AGI. See the documentation for the AGI dialplan application for more information on invoking AGI on a channel.

This application sets the following channel variable upon completion:

See Also


DeadAGI()

Synopsis

Executes AGI on a hungup channel.

Description

Execute AGI on a 'dead' or hungup channel. See the documentation for the AGI dialplan application for more information on invoking AGI on a channel.

This application sets the following channel variable upon completion:

See Also


WaitForTone()

Synopsis

Wait for tone

Description

Waits for a single-frequency tone to be detected before dialplan execution continues.

Syntax

WaitForTone(freq,[duration_ms,[timeout,[times,[options]]]])

Arguments

See Also


ReceiveFAX()

Synopsis

Receive a FAX and save as a TIFF/F file.

Description

This application is provided by res_fax, which is a FAX technology agnostic module that utilizes FAX technology resource modules to complete a FAX transmission.

Session arguments can be set by the FAXOPT function and to check results of the ReceiveFax() application.

Syntax

ReceiveFAX(filename,[options])

Arguments

See Also


SendFAX()

Synopsis

Sends a specified TIFF/F file as a FAX.

Description

This application is provided by res_fax, which is a FAX technology agnostic module that utilizes FAX technology resource modules to complete a FAX transmission.

Session arguments can be set by the FAXOPT function and to check results of the SendFax() application.

Syntax

SendFAX([filename2[&...]],[options]])

Arguments

See Also


JabberSend()

Synopsis

Sends an XMPP message to a buddy.

Description

Sends the content of message as text message from the given account to the buddy identified by jid

Example: JabberSend(asterisk,bob@domain.com,Hello world) sends "Hello world" to bob@domain.com as an XMPP message from the account asterisk, configured in xmpp.conf.

Syntax

JabberSend(account,jid,message)

Arguments

See Also


JabberSendGroup()

Synopsis

Send a Jabber Message to a specified chat room

Description

Allows user to send a message to a chat room via XMPP.

To be able to send messages to a chat room, a user must have previously joined it. Use the JabberJoin function to do so.

Syntax

JabberSendGroup(Jabber,RoomJID,Message,[Nickname])

Arguments


JabberJoin()

Synopsis

Join a chat room

Description

Allows Asterisk to join a chat room.

Syntax

JabberJoin(Jabber,RoomJID,[Nickname])

Arguments


JabberLeave()

Synopsis

Leave a chat room

Description

Allows Asterisk to leave a chat room.

Syntax

JabberLeave(Jabber,RoomJID,[Nickname])

Arguments


IAXPEER()

Synopsis

Gets IAX peer information.

Description

Gets information associated with the specified IAX2 peer.

Syntax

IAXPEER(peername,[item])

Arguments

See Also


IAXVAR()

Synopsis

Sets or retrieves a remote variable.

Description

Gets or sets a variable that is sent to a remote IAX2 peer during call setup.

Syntax

IAXVAR(varname)

Arguments


SIP_PARAMETER()

Synopsis

Gets the specified SIP parameter from the specified SIP header from an incoming INVITE message.

Description

This function returns the value of a SIP parameter in a specified header.

Since there are several headers (such as Via) which can occur multiple times, SIP_HEADER takes an optional second argument to specify which header with that name to retrieve. Headers start at offset 1.

This function does not access headers from the REFER message if the call was transferred. To obtain the REFER headers, set the dialplan variable GET_TRANSFERRER_DATA to the prefix of the headers of the REFER message that you need to access; for example, X- to get all headers starting with X-. The variable must be set before a call to the application that starts the channel that may eventually transfer back into the dialplan, and must be inherited by that channel, so prefix it with the _ or __ when setting (or set it in the pre-dial handler executed on the new channel). To get all headers of the REFER message, set the value to *. Headers are returned in the form of a dialplan hash TRANSFER_DATA, and can be accessed with the functions and, e. g., .

Please also note that contents of the SDP (an attachment to the SIP request) can't be accessed with this function.

Syntax

SIP_PARAMETER(parameter,name,[number])

Arguments

See Also


SIP_HEADER()

Synopsis

Gets the specified SIP header from an incoming INVITE message.

Description

Since there are several headers (such as Via) which can occur multiple times, SIP_HEADER takes an optional second argument to specify which header with that name to retrieve. Headers start at offset 1.

This function does not access headers from the REFER message if the call was transferred. To obtain the REFER headers, set the dialplan variable GET_TRANSFERRER_DATA to the prefix of the headers of the REFER message that you need to access; for example, X- to get all headers starting with X-. The variable must be set before a call to the application that starts the channel that may eventually transfer back into the dialplan, and must be inherited by that channel, so prefix it with the _ or __ when setting (or set it in the pre-dial handler executed on the new channel). To get all headers of the REFER message, set the value to *. Headers are returned in the form of a dialplan hash TRANSFER_DATA, and can be accessed with the functions and, e. g., .

Please also note that contents of the SDP (an attachment to the SIP request) can't be accessed with this function.

Syntax

SIP_HEADER(name,[number])

Arguments

See Also


SIP_HEADERS()

Synopsis

Gets the list of SIP header names from an incoming INVITE message.

Description

Returns a comma-separated list of header names (without values) from the INVITE message that originated the current channel. Multiple headers with the same name are included in the list only once. The returned list can be iterated over using the functions POP() and SIP_HEADER().

For example, ${SIP_HEADERS(Co)} might return Contact,Content-Length,Content-Type. As a practical example, you may use ${SIP_HEADERS(X-)} to enumerate optional extended headers.

This function does not access headers from the incoming SIP REFER message; see the documentation of the function SIP_HEADER for how to access them.

Please observe that contents of the SDP (an attachment to the SIP request) can't be accessed with this function.

Syntax

SIP_HEADERS([prefix])

Arguments

See Also


SIPPEER()

Synopsis

Gets SIP peer information.

Description

Syntax

SIPPEER(peername,[item])

Arguments


CHECKSIPDOMAIN()

Synopsis

Checks if domain is a local domain.

Description

This function checks if the domain in the argument is configured as a local SIP domain that this Asterisk server is configured to handle. Returns the domain name if it is locally handled, otherwise an empty string. Check the domain= configuration in sip.conf.

Syntax

CHECKSIPDOMAIN(domain)

Arguments


PJSIP_DIAL_CONTACTS()

Synopsis

Return a dial string for dialing all contacts on an AOR.

Description

Returns a properly formatted dial string for dialing all contacts on an AOR.

Syntax

PJSIP_DIAL_CONTACTS(endpoint,[aor,[request_user]])

Arguments


PJSIP_MEDIA_OFFER()

Synopsis

Media and codec offerings to be set on an outbound SIP channel prior to dialing.

Description

When read, returns the codecs offered based upon the media choice.

When written, sets the codecs to offer when an outbound dial attempt is made, or when a session refresh is sent using PJSIP_SEND_SESSION_REFRESH.

Syntax

PJSIP_MEDIA_OFFER(media)

Arguments

See Also


PJSIP_DTMF_MODE()

Synopsis

Get or change the DTMF mode for a SIP call.

Description

When read, returns the current DTMF mode

When written, sets the current DTMF mode

This function uses the same DTMF mode naming as the dtmf_mode configuration option


PJSIP_MOH_PASSTHROUGH()

Synopsis

Get or change the on-hold behavior for a SIP call.

Description

When read, returns the current moh passthrough mode

When written, sets the current moh passthrough mode

If yes, on-hold re-INVITEs are sent. If no, music on hold is generated.

This function can be used to override the moh_passthrough configuration option


PJSIP_SEND_SESSION_REFRESH()

Synopsis

W/O: Initiate a session refresh via an UPDATE or re-INVITE on an established media session

Description

This function will cause the PJSIP stack to immediately refresh the media session for the channel. This will be done using either a re-INVITE (default) or an UPDATE request.

This is most useful when combined with the PJSIP_MEDIA_OFFER dialplan function, as it allows the formats in use on a channel to be re-negotiated after call setup.

Example: Re-negotiate format to g722
	; Within some existing extension on an answered channel
	same => n,Set(PJSIP_MEDIA_OFFER(audio)=!all,g722)
	same => n,Set(PJSIP_SEND_SESSION_REFRESH()=invite)

Syntax

PJSIP_SEND_SESSION_REFRESH([update_type])

Arguments

See Also


PJSIP_PARSE_URI()

Synopsis

Parse an uri and return a type part of the URI.

Description

Parse an URI and return a specified part of the URI.

Syntax

PJSIP_PARSE_URI(uri,type)

Arguments


DUNDILOOKUP()

Synopsis

Do a DUNDi lookup of a phone number.

Description

This will do a DUNDi lookup of the given phone number.

This function will return the Technology/Resource found in the first result in the DUNDi lookup. If no results were found, the result will be blank.

Syntax

DUNDILOOKUP(number,[context,[options]])

Arguments


DUNDIQUERY()

Synopsis

Initiate a DUNDi query.

Description

This will do a DUNDi lookup of the given phone number.

The result of this function will be a numeric ID that can be used to retrieve the results with the DUNDIRESULT function.

Syntax

DUNDIQUERY(number,[context,[options]])

Arguments


DUNDIRESULT()

Synopsis

Retrieve results from a DUNDIQUERY.

Description

This function will retrieve results from a previous use\n" of the DUNDIQUERY function.

Syntax

DUNDIRESULT(id,[resultnum])

Arguments


SPEECH_SCORE()

Synopsis

Gets the confidence score of a result.

Description

Gets the confidence score of a result.

Syntax

SPEECH_SCORE([nbest_number,]result_number)

Arguments


SPEECH_TEXT()

Synopsis

Gets the recognized text of a result.

Description

Gets the recognized text of a result.

Syntax

SPEECH_TEXT([nbest_number,]result_number)

Arguments


SPEECH_GRAMMAR()

Synopsis

Gets the matched grammar of a result if available.

Description

Gets the matched grammar of a result if available.

Syntax

SPEECH_GRAMMAR([nbest_number,]result_number)

Arguments


SPEECH_ENGINE()

Synopsis

Get or change a speech engine specific attribute.

Description

Changes a speech engine specific attribute.

Syntax

SPEECH_ENGINE(name)

Arguments


SPEECH_RESULTS_TYPE()

Synopsis

Sets the type of results that will be returned.

Description

Sets the type of results that will be returned. Valid options are normal or nbest.


SPEECH()

Synopsis

Gets information about speech recognition results.

Description

Gets information about speech recognition results.

Syntax

SPEECH(argument)

Arguments


VM_INFO()

Synopsis

Returns the selected attribute from a mailbox.

Description

Returns the selected attribute from the specified mailbox. If context is not specified, defaults to the default context. Where the folder can be specified, common folders include INBOX, Old, Work, Family and Friends.

Syntax

VM_INFO(mailbox@[context,]attribute,[folder])

Arguments


MINIVMCOUNTER()

Synopsis

Reads or sets counters for MiniVoicemail message.

Description

The operation is atomic and the counter is locked while changing the value. The counters are stored as text files in the minivm account directories. It might be better to use realtime functions if you are using a database to operate your Asterisk.

Syntax

MINIVMCOUNTER(account,name,[operand])

Arguments

See Also


MINIVMACCOUNT()

Synopsis

Gets MiniVoicemail account information.

Description

Syntax

MINIVMACCOUNT(account,item)

Arguments

See Also


AGENT()

Synopsis

Gets information about an Agent

Description

Syntax

AGENT(AgentId,[item])

Arguments


VM_INFO()

Synopsis

Returns the selected attribute from a mailbox.

Description

Returns the selected attribute from the specified mailbox. If context is not specified, defaults to the default context. Where the folder can be specified, common folders include INBOX, Old, Work, Family and Friends.

Syntax

VM_INFO(mailbox@[context,]attribute,[folder])

Arguments


DB_CHANNEL()

Synopsis

Return the name of the oldest alive channel in an AstDB family.

Description

Returns the key corresponding to the first channel that is still alive in a DB family or comma-separated list of DB families of keys corresponding to sequentially ordered IDs and values corresponding to channel names or unique IDs. Channels that no longer exist will be automatically purged if they are older than the first match. If no match is found or the DB family does not exist, an empty string is returned.

This function is designed to facilitate easy search operations when channels are stored in AstDB and the oldest existing channel needs to be found.

Syntax

DB_CHANNEL(families)

Arguments

See Also


DB_CHANNEL_PRUNE()

Synopsis

Deletes all channels that no longer exist in specified AstDB families.

Description

Iterates through a DB family or comma-separated list of DB families and deletes any key-value pairs where the value is no longer a valid channel name or unique ID. Returns the number of key/value pairs that were deleted from the database.

Syntax

DB_CHANNEL_PRUNE(families)

Arguments

See Also


VM_INFO()

Synopsis

Returns the selected attribute from a mailbox.

Description

Returns the selected attribute from the specified mailbox. If context is not specified, defaults to the default context. Where the folder can be specified, common folders include INBOX, Old, Work, Family and Friends.

Syntax

VM_INFO(mailbox@[context,]attribute,[folder])

Arguments


QUEUE_VARIABLES()

Synopsis

Return Queue information in variables.

Description

Makes the following queue variables available.

Returns 0 if queue is found and setqueuevar is defined, -1 otherwise.

Syntax

QUEUE_VARIABLES(queuename)

Arguments

See Also


QUEUE_MEMBER()

Synopsis

Provides a count of queue members based on the provided criteria, or updates a queue member's settings.

Description

Allows access to queue counts [R] and member information [R/W].

queuename is required for all read operations.

interface is required for all member operations.

Syntax

QUEUE_MEMBER([queuename,]option,[interface])

Arguments

See Also


QUEUE_MEMBER_COUNT()

Synopsis

Count number of members answering a queue.

Description

Returns the number of members currently associated with the specified queuename.

Syntax

QUEUE_MEMBER_COUNT(queuename)

Arguments

See Also


QUEUE_EXISTS()

Synopsis

Check if a named queue exists on this server

Description

Returns 1 if the specified queue exists, 0 if it does not

Syntax

QUEUE_EXISTS([queuename])

Arguments

See Also


QUEUE_GET_CHANNEL()

Synopsis

Return caller at the specified position in a queue.

Description

Returns the caller channel at position in the specified queuename.

If position is unspecified the first channel is returned.

Syntax

QUEUE_GET_CHANNEL(queuename,[position])

Arguments

See Also


QUEUE_WAITING_COUNT()

Synopsis

Count number of calls currently waiting in a queue.

Description

Returns the number of callers currently waiting in the specified queuename.

Syntax

QUEUE_WAITING_COUNT([queuename])

Arguments

See Also


QUEUE_MEMBER_LIST()

Synopsis

Returns a list of interfaces on a queue.

Description

Returns a comma-separated list of members associated with the specified queuename.

Syntax

QUEUE_MEMBER_LIST(queuename)

Arguments

See Also


QUEUE_MEMBER_PENALTY()

Synopsis

Gets or sets queue members penalty.

Description

Gets or sets queue members penalty.

Syntax

QUEUE_MEMBER_PENALTY(queuename,interface)

Arguments

See Also


MEETME_INFO()

Synopsis

Query a given conference of various properties.

Description

Syntax

MEETME_INFO(keyword,confno)

Arguments

See Also


LOCAL()

Synopsis

Manage variables local to the gosub stack frame.

Description

Read and write a variable local to the gosub stack frame, once we Return() it will be lost (or it will go back to whatever value it had before the Gosub()).

Syntax

LOCAL(varname)

Arguments

See Also


LOCAL_PEEK()

Synopsis

Retrieve variables hidden by the local gosub stack frame.

Description

Read a variable varname hidden by n levels of gosub stack frames. Note that ${LOCAL_PEEK(0,foo)} is the same as , since the value of n peeks under 0 levels of stack frames; in other words, 0 is the current level. If n exceeds the available number of stack frames, then an empty string is returned.

Syntax

LOCAL_PEEK(n,varname)

Arguments

See Also


STACK_PEEK()

Synopsis

View info about the location which called Gosub

Description

Read the calling context, extension, priority, or label, as specified by which, by going up n frames in the Gosub stack. If suppress is true, then if the number of available stack frames is exceeded, then no error message will be printed.

Syntax

STACK_PEEK(n,which,[suppress])

Arguments


MIXMONITOR()

Synopsis

Retrieve data pertaining to specific instances of MixMonitor on a channel.

Description

Syntax

MIXMONITOR(id,key)

Arguments


CONFBRIDGE()

Synopsis

Set a custom dynamic bridge, user, or menu profile on a channel for the ConfBridge application using the same options available in confbridge.conf.

Description

A custom profile uses the default profile type settings defined in confbridge.conf as defaults if the profile template is not explicitly specified first.

For bridge profiles the default template is default_bridge.

For menu profiles the default template is default_menu.

For user profiles the default template is default_user.

---- Example 1 ----

In this example the custom user profile set on the channel will automatically be used by the ConfBridge application.

exten => 1,1,Answer()

; In this example the effect of the following line is

; implied:

; same => n,Set(CONFBRIDGE(user,template)=default_user)

same => n,Set(CONFBRIDGE(user,announce_join_leave)=yes)

same => n,Set(CONFBRIDGE(user,startmuted)=yes)

same => n,ConfBridge(1)

---- Example 2 ----

This example shows how to use a predefined user profile in confbridge.conf as a template for a dynamic profile. Here we make an admin/marked user out of the my_user profile that you define in confbridge.conf.

exten => 1,1,Answer()

same => n,Set(CONFBRIDGE(user,template)=my_user)

same => n,Set(CONFBRIDGE(user,admin)=yes)

same => n,Set(CONFBRIDGE(user,marked)=yes)

same => n,ConfBridge(1)

Syntax

CONFBRIDGE(type,option)

Arguments


CONFBRIDGE_INFO()

Synopsis

Get information about a ConfBridge conference.

Description

This function returns a non-negative integer for valid conference names and an empty string for invalid conference names.

Syntax

CONFBRIDGE_INFO(type,conf)

Arguments


STREAM_SILENCE()

Synopsis

Stream silent audio on a channel.

Description

Streams silent audio on a channel until disabled. This ensures that audiohooks can be processed constantly even if the channel receives no other frames.

Syntax

STREAM_SILENCE([active])

Arguments

See Also


FRAME_TRACE()

Synopsis

View internal ast_frames as they are read and written on a channel.

Description

Examples:

exten => 1,1,Set(FRAME_TRACE(white)=DTMF_BEGIN,DTMF_END); view only DTMF frames.

exten => 1,1,Set(FRAME_TRACE()=DTMF_BEGIN,DTMF_END); view only DTMF frames.

exten => 1,1,Set(FRAME_TRACE(black)=DTMF_BEGIN,DTMF_END); view everything except DTMF frames.

Syntax

FRAME_TRACE(filter list type)

Arguments


FIELDQTY()

Synopsis

Count the fields with an arbitrary delimiter

Description

The delimiter may be specified as a special or extended ASCII character, by encoding it. The characters \n, \r, and \t are all recognized as the newline, carriage return, and tab characters, respectively. Also, octal and hexadecimal specifications are recognized by the patterns \0nnn and \xHH, respectively. For example, if you wanted to encode a comma as the delimiter, you could use either \054 or \x2C.

Example: If ${example} contains ex-amp-le, then ${FIELDQTY(example,-)} returns 3.

Syntax

FIELDQTY(varname,delim)

Arguments


FIELDNUM()

Synopsis

Return the 1-based offset of a field in a list

Description

Search the variable named varname for the string value delimited by delim and return a 1-based offset as to its location. If not found or an error occured, return 0.

The delimiter may be specified as a special or extended ASCII character, by encoding it. The characters \n, \r, and \t are all recognized as the newline, carriage return, and tab characters, respectively. Also, octal and hexadecimal specifications are recognized by the patterns \0nnn and \xHH, respectively. For example, if you wanted to encode a comma as the delimiter, you could use either \054 or \x2C.

Example: If ${example} contains ex-amp-le, then ${FIELDNUM(example,-,amp)} returns 2.

Syntax

FIELDNUM(varname,delim,value)

Arguments


LISTFILTER()

Synopsis

Remove an item from a list, by name.

Description

Remove value from the list contained in the varname variable, where the list delimiter is specified by the delim parameter. This is very useful for removing a single channel name from a list of channels, for example.

Syntax

LISTFILTER(varname,delim,value)

Arguments


FILTER()

Synopsis

Filter the string to include only the allowed characters

Description

Permits all characters listed in allowed-chars, filtering all others outs. In addition to literally listing the characters, you may also use ranges of characters (delimited by a -

Hexadecimal characters started with a \x(i.e. \x20)

Octal characters started with a \0 (i.e. \040)

Also \t,\n and \r are recognized.

If you want the - character it needs to be prefixed with a \

Syntax

FILTER(allowed-chars,string)

Arguments


REPLACE()

Synopsis

Replace a set of characters in a given string with another character.

Description

Iterates through a string replacing all the find-chars with replace-char. replace-char may be either empty or contain one character. If empty, all find-chars will be deleted from the output.

The replacement only occurs in the output. The original variable is not altered.

Syntax

REPLACE(varname,find-chars,[replace-char])

Arguments


STRREPLACE()

Synopsis

Replace instances of a substring within a string with another string.

Description

Searches for all instances of the find-string in provided variable and replaces them with replace-string. If replace-string is an empty string, this will effecively delete that substring. If max-replacements is specified, this function will stop after performing replacements max-replacements times.

The replacement only occurs in the output. The original variable is not altered.

Syntax

STRREPLACE(varname,find-string,[replace-string,[max-replacements]])

Arguments


STRBETWEEN()

Synopsis

Inserts a substring between each character in a string.

Description

Inserts a substring find-string between each character in varname.

The replacement only occurs in the output. The original variable is not altered.

Example: Add half-second pause between dialed digits
	same => n,Set(digits=5551212)
	same => n,SendDTMF(${STRBETWEEN(digits,w)) ; this will send 5w5w5w1w2w1w2

Syntax

STRBETWEEN(varname,insert-string)

Arguments


PASSTHRU()

Synopsis

Pass the given argument back as a value.

Description

Literally returns the given string. The intent is to permit other dialplan functions which take a variable name as an argument to be able to take a literal string, instead.

Example: ${CHANNEL} contains SIP/321-1

${CUT(PASSTHRU(${CUT(CHANNEL,-,1)}),/,2)}) will return 321

The functions which take a variable name need to be passed var and not ${var}. Similarly, use PASSTHRU() and not ${PASSTHRU()}.

Syntax

PASSTHRU([string])

Arguments


REGEX()

Synopsis

Check string against a regular expression.

Description

Return 1 on regular expression match or 0 otherwise

Please note that the space following the double quotes separating the regex from the data is optional and if present, is skipped. If a space is desired at the beginning of the data, then put two spaces there; the second will not be skipped.

Syntax

REGEX("regular expression",string)

Arguments


HASH()

Synopsis

Implementation of a dialplan associative array

Description

In two arguments mode, gets and sets values to corresponding keys within a named associative array. The single-argument mode will only work when assigned to from a function defined by func_odbc

Syntax

HASH(hashname,[hashkey])

Arguments


HASHKEYS()

Synopsis

Retrieve the keys of the HASH() function.

Description

Returns a comma-delimited list of the current keys of the associative array defined by the HASH() function. Note that if you iterate over the keys of the result, adding keys during iteration will cause the result of the HASHKEYS() function to change.

Syntax

HASHKEYS(hashname)

Arguments


KEYPADHASH()

Synopsis

Hash the letters in string into equivalent keypad numbers.

Description

Example: ${KEYPADHASH(Les)} returns "537"

Syntax

KEYPADHASH(string)

Arguments


ARRAY()

Synopsis

Allows setting multiple variables at once.

Description

The comma-delimited list passed as a value to which the function is set will be interpreted as a set of values to which the comma-delimited list of variable names in the argument should be set.

Example: Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2

Syntax

ARRAY(var1,[var2,[varN]])

Arguments


STRPTIME()

Synopsis

Returns the epoch of the arbitrary date/time string structured as described by the format.

Description

This is useful for converting a date into EPOCH time, possibly to pass to an application like SayUnixTime or to calculate the difference between the two date strings

Example: ${STRPTIME(2006-03-01 07:30:35,America/Chicago,%Y-%m-%d %H:%M:%S)} returns 1141219835

Syntax

STRPTIME(datetime,timezone,format)

Arguments


STRFTIME()

Synopsis

Returns the current date/time in the specified format.

Description

STRFTIME supports all of the same formats as the underlying C function strftime(3). It also supports the following format: %[n]q - fractions of a second, with leading zeros.

Example: %3q will give milliseconds and %1q will give tenths of a second. The default is set at milliseconds (n=3). The common case is to use it in combination with %S, as in %S.%3q.

Syntax

STRFTIME([epoch,[timezone,[format]]])

Arguments

See Also


EVAL()

Synopsis

Evaluate stored variables

Description

Using EVAL basically causes a string to be evaluated twice. When a variable or expression is in the dialplan, it will be evaluated at runtime. However, if the results of the evaluation is in fact another variable or expression, using EVAL will have it evaluated a second time.

Example: If the MYVAR contains OTHERVAR, then the result of ${EVAL( MYVAR)} in the dialplan will be the contents of OTHERVAR. Normally just putting MYVAR in the dialplan the result would be OTHERVAR.

Syntax

EVAL(variable)

Arguments


TOUPPER()

Synopsis

Convert string to all uppercase letters.

Description

Example: ${TOUPPER(Example)} returns "EXAMPLE"

Syntax

TOUPPER(string)

Arguments


TOLOWER()

Synopsis

Convert string to all lowercase letters.

Description

Example: ${TOLOWER(Example)} returns "example"

Syntax

TOLOWER(string)

Arguments


LEN()

Synopsis

Return the length of the string given.

Description

Example: ${LEN(example)} returns 7

Syntax

LEN(string)

Arguments


QUOTE()

Synopsis

Quotes a given string, escaping embedded quotes as necessary

Description

Example: ${QUOTE(ab"c"de)} will return ""ab\"c\"de""

Syntax

QUOTE(string)

Arguments


CSV_QUOTE()

Synopsis

Quotes a given string for use in a CSV file, escaping embedded quotes as necessary

Description

Example: ${CSV_QUOTE("a,b" 123)} will return """a,b"" 123"

Syntax

CSV_QUOTE(string)

Arguments


SHIFT()

Synopsis

Removes and returns the first item off of a variable containing delimited text

Description

Example:

exten => s,1,Set(array=one,two,three)

exten => s,n,While($["${SET(var=${SHIFT(array)})}" != ""])

exten => s,n,NoOp(var is ${var})

exten => s,n,EndWhile

This would iterate over each value in array, left to right, and would result in NoOp(var is one), NoOp(var is two), and NoOp(var is three) being executed.

Syntax

SHIFT(varname,[delimiter])

Arguments


POP()

Synopsis

Removes and returns the last item off of a variable containing delimited text

Description

Example:

exten => s,1,Set(array=one,two,three)

exten => s,n,While($["${SET(var=${POP(array)})}" != ""])

exten => s,n,NoOp(var is ${var})

exten => s,n,EndWhile

This would iterate over each value in array, right to left, and would result in NoOp(var is three), NoOp(var is two), and NoOp(var is one) being executed.

Syntax

POP(varname,[delimiter])

Arguments


PUSH()

Synopsis

Appends one or more values to the end of a variable containing delimited text

Description

Example: Set(PUSH(array)=one,two,three) would append one, two, and three to the end of the values stored in the variable "array".

Syntax

PUSH(varname,[delimiter])

Arguments


UNSHIFT()

Synopsis

Inserts one or more values to the beginning of a variable containing delimited text

Description

Example: Set(UNSHIFT(array)=one,two,three) would insert one, two, and three before the values stored in the variable "array".

Syntax

UNSHIFT(varname,[delimiter])

Arguments


FRAME_DROP()

Synopsis

Drops specific frame types in the TX or RX direction on a channel.

Description

Examples:

exten => 1,1,Set(FRAME_DROP(TX)=DTMF_BEGIN,DTMF_END); drop only DTMF frames towards this channel.

exten => 1,1,Set(FRAME_DROP(TX)=ANSWER); drop only ANSWER CONTROL frames towards this channel.

exten => 1,1,Set(FRAME_DROP(RX)=DTMF_BEGIN,DTMF_END); drop only DTMF frames received on this channel.

Syntax

FRAME_DROP(direction)

Arguments


EVAL_EXTEN()

Synopsis

Evaluates the contents of a dialplan extension and returns it as a string.

Description

The EVAL_EXTEN function looks up a dialplan entry by context,extension,priority, evaluates the contents of a Return statement to resolve any variable or function references, and returns the result as a string.

You can use this function to create simple user-defined lookup tables or user-defined functions.

Any variables in the evaluated data will be resolved in the context of that extension. For example, ${EXTEN} would refer to the EVAL_EXTEN extension, not the extension in the context invoking the function. This behavior is similar to other applications, e.g. Gosub.

Extensions on which EVAL_EXTEN is invoked are not different from other extensions. However, the application at that extension is not executed. Only the application data is parsed and evaluated.

A limitation of this function is that the application at the specified extension isn't actually executed, and thus unlike a Gosub, you can't pass arguments in the EVAL_EXTEN function.

Example: Custom dialplan functions
	[call-types]

	exten => _1NNN,1,Return(internal)

	exten => _NXXNXXXXXX,1,Return(external)
	
	[udf]

	exten => calleridlen,1,Return(${LEN(${CALLERID(num)})})
	
	[default]

	exten => _X!,1,Verbose(Call type ${EVAL_EXTEN(call-types,${EXTEN},1)} - ${EVAL_EXTEN(udf,calleridlen,1)})
Example: Choosing which prompt to use
	same => n,Read(input,${EVAL_EXTEN(prompts,${CALLERID(num)},1)})
	
	[prompts]

	exten => _X!,1,Return(default)

	exten => _20X,1,Return(welcome)

	exten => _2XX,1,Return(${DB(promptsettings/${EXTEN})})

	exten => _3XX,1,Return(${ODBC_MYFUNC(${EXTEN})})

Syntax

EVAL_EXTEN([context,[extensions,]]priority)

Arguments

See Also


EXTENSION_STATE()

Synopsis

Get an extension's state.

Description

The EXTENSION_STATE function can be used to retrieve the state from any hinted extension. For example:

NoOp(1234@default has state ${EXTENSION_STATE(1234)})

NoOp(4567@home has state ${EXTENSION_STATE(4567@home)})

The possible values returned by this function are:

UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | RINGINUSE | HOLDINUSE | ONHOLD

Syntax

EXTENSION_STATE(extension,[context])

Arguments


ODBC_FETCH()

Synopsis

Fetch a row from a multirow query.

Description

For queries which are marked as mode=multirow, the original query returns a result-id from which results may be fetched. This function implements the actual fetch of the results.

This also sets ODBC_FETCH_STATUS.

Syntax

ODBC_FETCH(result-id)

Arguments


SQL_ESC()

Synopsis

Escapes single ticks for use in SQL statements.

Description

Used in SQL templates to escape data which may contain single ticks ' which are otherwise used to delimit data.

Example: SELECT foo FROM bar WHERE baz='${SQL_ESC(${ARG1})}'

Syntax

SQL_ESC(string)

Arguments


BASE64_ENCODE()

Synopsis

Encode a string in base64.

Description

Returns the base64 string.

Syntax

BASE64_ENCODE(string)

Arguments

See Also


BASE64_DECODE()

Synopsis

Decode a base64 string.

Description

Returns the plain text string.

Syntax

BASE64_DECODE(string)

Arguments

See Also


TALK_DETECT()

Synopsis

Raises notifications when Asterisk detects silence or talking on a channel.

Description

The TALK_DETECT function enables events on the channel it is applied to. These events can be emited over AMI, ARI, and potentially other Asterisk modules that listen for the internal notification.

The function has two parameters that can optionally be passed when set on a channel: dsp_talking_threshold and dsp_silence_threshold.

dsp_talking_threshold is the time in milliseconds of sound above what the dsp has established as base line silence for a user before a user is considered to be talking. By default, the value of silencethreshold from dsp.conf is used. If this value is set too tight events may be falsely triggered by variants in room noise.

Valid values are 1 through 2^31.

dsp_silence_threshold is the time in milliseconds of sound falling within what the dsp has established as baseline silence before a user is considered be silent. If this value is set too low events indicating the user has stopped talking may get falsely sent out when the user briefly pauses during mid sentence.

The best way to approach this option is to set it slightly above the maximum amount of ms of silence a user may generate during natural speech.

By default this value is 2500ms. Valid values are 1 through 2^31.

Example:

same => n,Set(TALK_DETECT(set)=) ; Enable talk detection

same => n,Set(TALK_DETECT(set)=1200) ; Update existing talk detection's silence threshold to 1200 ms

same => n,Set(TALK_DETECT(remove)=) ; Remove talk detection

same => n,Set(TALK_DETECT(set)=,128) ; Enable and set talk threshold to 128

This function will set the following variables:

The TALK_DETECT function uses an audiohook to inspect the voice media frames on a channel. Other functions, such as JITTERBUFFER, DENOISE, and AGC use a similar mechanism. Audiohooks are processed in the order in which they are placed on the channel. As such, it typically makes sense to place functions that modify the voice media data prior to placing the TALK_DETECT function, as this will yield better results.

Example:

same => n,Set(DENOISE(rx)=on) ; Denoise received audio

same => n,Set(TALK_DETECT(set)=) ; Perform talk detection on the denoised received audio

Syntax

TALK_DETECT(action)

Arguments


PJSIP_CONTACT()

Synopsis

Get information about a PJSIP contact

Description

Syntax

PJSIP_CONTACT(name,field)

Arguments


ISNULL()

Synopsis

Check if a value is NULL.

Description

Returns 1 if NULL or 0 otherwise.

Syntax

ISNULL(data)

Arguments


SET()

Synopsis

SET assigns a value to a channel variable.

Description

Syntax

SET(varname,[value])

Arguments


EXISTS()

Synopsis

Test the existence of a value.

Description

Returns 1 if exists, 0 otherwise.

Syntax

EXISTS(data)

Arguments


IF()

Synopsis

Check for an expresion.

Description

Returns the data following ? if true, else the data following :

Syntax

IF(expresion:[true:[false]])

Arguments


IFTIME()

Synopsis

Temporal Conditional.

Description

Returns the data following ? if true, else the data following :

Syntax

IFTIME(timespec:[true:[false]])

Arguments


IMPORT()

Synopsis

Retrieve the value of a variable from another channel.

Description

Syntax

IMPORT(channel,variable)

Arguments


SCRAMBLE()

Synopsis

Scrambles audio on a channel.

Description

Scrambles audio on a channel using whole spectrum inversion. This is not intended to be used for securely scrambling audio. It merely renders obfuscates audio on a channel to render it unintelligible, as a privacy enhancement.

Syntax

SCRAMBLE([direction])

Arguments

See Also


RAND()

Synopsis

Choose a random number in a range.

Description

Choose a random number between min and max. min defaults to 0, if not specified, while max defaults to RAND_MAX (2147483647 on many systems).

Example: Set(junky=${RAND(1,8)}); Sets junky to a random number between 1 and 8, inclusive.

Syntax

RAND([min,[max]])

Arguments


HOLD_INTERCEPT()

Synopsis

Intercepts hold frames on a channel and raises an event instead of passing the frame on

Description

Syntax

HOLD_INTERCEPT(action)

Arguments


AST_CONFIG()

Synopsis

Retrieve a variable from a configuration file.

Description

This function reads a variable from an Asterisk configuration file.

Syntax

AST_CONFIG(config_file,category,variable_name,[index])

Arguments


DIALGROUP()

Synopsis

Manages a group of users for dialing.

Description

Presents an interface meant to be used in concert with the Dial application, by presenting a list of channels which should be dialled when referenced.

When DIALGROUP is read from, the argument is interpreted as the particular group for which a dial should be attempted. When DIALGROUP is written to with no arguments, the entire list is replaced with the argument specified.

Functionality is similar to a queue, except that when no interfaces are available, execution may continue in the dialplan. This is useful when you want certain people to be the first to answer any calls, with immediate fallback to a queue when the front line people are busy or unavailable, but you still want front line people to log in and out of that group, just like a queue.

Example:

exten => 1,1,Set(DIALGROUP(mygroup,add)=SIP/10)

exten => 1,n,Set(DIALGROUP(mygroup,add)=SIP/20)

exten => 1,n,Dial(${DIALGROUP(mygroup)})

Syntax

DIALGROUP(group,[op])

Arguments


BLACKLIST()

Synopsis

Check if the callerid is on the blacklist.

Description

Uses astdb to check if the Caller*ID is in family blacklist. Returns 1 or 0.

See Also


PJSIP_AOR()

Synopsis

Get information about a PJSIP AOR

Description

Syntax

PJSIP_AOR(name,field)

Arguments


PRESENCE_STATE()

Synopsis

Get or Set a presence state.

Description

The PRESENCE_STATE function can be used to retrieve the presence from any presence provider. For example:

NoOp(SIP/mypeer has presence ${PRESENCE_STATE(SIP/mypeer,value)})

NoOp(Conference number 1234 has presence message ${PRESENCE_STATE(MeetMe:1234,message)})

The PRESENCE_STATE function can also be used to set custom presence state from the dialplan. The CustomPresence: prefix must be used. For example:

Set(PRESENCE_STATE(CustomPresence:lamp1)=away,temporary,Out to lunch)

Set(PRESENCE_STATE(CustomPresence:lamp2)=dnd,,Trying to get work done)

Set(PRESENCE_STATE(CustomPresence:lamp3)=xa,T24gdmFjYXRpb24=,,e)

Set(BASE64_LAMP3_PRESENCE=${PRESENCE_STATE(CustomPresence:lamp3,subtype,e)})

You can subscribe to the status of a custom presence state using a hint in the dialplan:

exten => 1234,hint,,CustomPresence:lamp1

The possible values for both uses of this function are:

not_set | unavailable | available | away | xa | chat | dnd

Syntax

PRESENCE_STATE(provider,field,[options])

Arguments


TIMEOUT()

Synopsis

Gets or sets timeouts on the channel. Timeout values are in seconds.

Description

The timeouts that can be manipulated are:

absolute: The absolute maximum amount of time permitted for a call. Setting of 0 disables the timeout.

digit: The maximum amount of time permitted between digits when the user is typing in an extension. When this timeout expires, after the user has started to type in an extension, the extension will be considered complete, and will be interpreted. Note that if an extension typed in is valid, it will not have to timeout to be tested, so typically at the expiry of this timeout, the extension will be considered invalid (and thus control would be passed to the i extension, or if it doesn't exist the call would be terminated). The default timeout is 5 seconds.

response: The maximum amount of time permitted after falling through a series of priorities for a channel in which the user may begin typing an extension. If the user does not type an extension in this amount of time, control will pass to the t extension if it exists, and if not the call would be terminated. The default timeout is 10 seconds.

Syntax

TIMEOUT(timeouttype)

Arguments


MATH()

Synopsis

Performs Mathematical Functions.

Description

Performs mathematical functions based on two parameters and an operator. The returned value type is type

Example: Set(i=${MATH(123%16,int)}) - sets var i=11

Syntax

MATH(expression,[type])

Arguments


INC()

Synopsis

Increments the value of a variable, while returning the updated value to the dialplan

Description

Increments the value of a variable, while returning the updated value to the dialplan

Example: INC(MyVAR) - Increments MyVar

Note: INC(${MyVAR}) - Is wrong, as INC expects the variable name, not its value

Syntax

INC(variable)

Arguments


DEC()

Synopsis

Decrements the value of a variable, while returning the updated value to the dialplan

Description

Decrements the value of a variable, while returning the updated value to the dialplan

Example: DEC(MyVAR) - Decrements MyVar

Note: DEC(${MyVAR}) - Is wrong, as DEC expects the variable name, not its value

Syntax

DEC(variable)

Arguments


MIN()

Synopsis

Returns the minimum of two numbers.

Description

Returns the minimum of two numbers num1 and num2.

Example: Set(min=${MIN(7,4)}); Sets the min variable equal to 4.

Syntax

MIN([num1,[num2]])

Arguments


MAX()

Synopsis

Returns the maximum of two numbers.

Description

Returns the maximum of two numbers num1 and num2.

Example: Set(max=${MAX(4,7)}); Sets the max variable equal to 7.

Syntax

MAX([num1,[num2]])

Arguments


ABS()

Synopsis

Returns absolute value of a number.

Description

Returns the absolute value of a number num.

Example: Set(absval=${ABS(-13)}); Sets the absval variable equal to 13.

Syntax

ABS([num])

Arguments


OTHER_CHANNEL()

Synopsis

Gets or sets variables on any arbitrary channel that exists.

Description

Allows access to any existing channel if it exists. This is a potentially dangerous function if not used carefully, and the MASTER_CHANNEL and SHARED functions should be used instead if possible.

Syntax

OTHER_CHANNEL(var,channel)

Arguments


AST_SORCERY()

Synopsis

Get a field from a sorcery object

Description

Syntax

AST_SORCERY(module_name,object_type,object_id,field_name,[retrieval_method,[retrieval_details]])

Arguments


SPRINTF()

Synopsis

Format a variable according to a format string.

Description

Parses the format string specified and returns a string matching that format. Supports most options found in sprintf(3). Returns a shortened string if a format specifier is not recognized.

Syntax

SPRINTF(format,arg1,[arg2,[argN]])

Arguments

See Also


DB()

Synopsis

Read from or write to the Asterisk database.

Description

This function will read from or write a value to the Asterisk database. On a read, this function returns the corresponding value from the database, or blank if it does not exist. Reading a database value will also set the variable DB_RESULT. If you wish to find out if an entry exists, use the DB_EXISTS function.

Syntax

DB(family,key)

Arguments

See Also


DB_EXISTS()

Synopsis

Check to see if a key exists in the Asterisk database.

Description

This function will check to see if a key exists in the Asterisk database. If it exists, the function will return 1. If not, it will return 0. Checking for existence of a database key will also set the variable DB_RESULT to the key's value if it exists.

Syntax

DB_EXISTS(family,key)

Arguments

See Also


DB_KEYS()

Synopsis

Obtain a list of keys within the Asterisk database.

Description

This function will return a comma-separated list of keys existing at the prefix specified within the Asterisk database. If no argument is provided, then a list of key families will be returned.

Syntax

DB_KEYS([prefix])

Arguments


DB_DELETE()

Synopsis

Return a value from the database and delete it.

Description

This function will retrieve a value from the Asterisk database and then remove that key from the database. DB_RESULT will be set to the key's value if it exists.

If live_dangerously in asterisk.conf is set to no, this function can only be read from the dialplan, and not directly from external protocols. It can, however, be executed as a write operation (DB_DELETE(family, key)=ignored)

Syntax

DB_DELETE(family,key)

Arguments

See Also


GLOBAL()

Synopsis

Gets or sets the global variable specified.

Description

Set or get the value of a global variable specified in varname

Syntax

GLOBAL(varname)

Arguments


SHARED()

Synopsis

Gets or sets the shared variable specified.

Description

Implements a shared variable area, in which you may share variables between channels.

The variables used in this space are separate from the general namespace of the channel and thus and represent two completely different variables, despite sharing the same name.

Finally, realize that there is an inherent race between channels operating at the same time, fiddling with each others' internal variables, which is why this special variable namespace exists; it is to remind you that variables in the SHARED namespace may change at any time, without warning. You should therefore take special care to ensure that when using the SHARED namespace, you retrieve the variable and store it in a regular channel variable before using it in a set of calculations (or you might be surprised by the result).

Syntax

SHARED(varname,[channel])

Arguments


JSON_DECODE()

Synopsis

Returns the contents of a JSON array at a specified key.

Description

The JSON_DECODE function parses a JSON string and returns a value by key. If the key cannot be found, an empty string is returned.

Syntax

JSON_DECODE(varname,item)

Arguments

See Also


SAYFILES()

Synopsis

Returns the ampersand-delimited file names that would be played by the Say applications (e.g. SayAlpha, SayDigits).

Description

Returns the files that would be played by a Say application. These filenames could then be passed directly into Playback, BackGround, Read, Queue, or any application which supports playback of multiple ampersand-delimited files.

Example: Read using the number 123
	same => n,Read(response,${SAYFILES(123,number)})

Syntax

SAYFILES(value,[type])

Arguments

See Also


CHANNELS()

Synopsis

Gets the list of channels, optionally filtering by a regular expression.

Description

Gets the list of channels, optionally filtering by a regular_expression. If no argument is provided, all known channels are returned. The regular_expression must correspond to the POSIX.2 specification, as shown in regex(7). The list returned will be space-delimited.

Syntax

CHANNELS([regular_expression])

Arguments


CHANNEL_EXISTS()

Synopsis

Checks if the specified channel exists.

Description

Returns 1 if the channel name_or_uid exists, 0 if not.

Syntax

CHANNEL_EXISTS(name_or_uid)

Arguments


MASTER_CHANNEL()

Synopsis

Gets or sets variables on the master channel

Description

Allows access to the oldest channel associated with the current channel if it still exists. If the channel is the master channel or the master channel no longer exists then access local channel variables instead. In other words, the master channel is the channel identified by the channel's linkedid.


CHANNEL()

Synopsis

Gets/sets various pieces of information about the channel.

Description

Gets/sets various pieces of information about the channel, additional item may be available from the channel driver; see its documentation for details. Any item requested that is not available on the current channel will return an empty string.

Example: Standard CHANNEL item examples
	; Push a hangup handler subroutine existing at dialplan
	; location default,s,1 onto the current channel
	same => n,Set(CHANNEL(hangup_handler_push)=default,s,1)
	
	; Set the current tonezone to Germany (de)
	same => n,Set(CHANNEL(tonezone)=de)
	
	; Set the allowed maximum number of forwarding attempts
	same => n,Set(CHANNEL(max_forwards)=10)
	
	; If this channel is ejected from its next bridge, and if
	; the channel is not hung up, begin executing dialplan at
	; location default,after-bridge,1
	same => n,Set(CHANNEL(after_bridge_goto)=default,after-bridge,1)
	
	; Log the current state of the channel
	same => n,Log(NOTICE, This channel is: ${CHANNEL(state)})

Syntax

CHANNEL(item)

Arguments


PERIODIC_HOOK()

Synopsis

Execute a periodic dialplan hook into the audio of a call.

Description

For example, you could use this function to enable playing a periodic beep sound in a call.

To turn on:

Set(BEEPID=${PERIODIC_HOOK(hooks,beep,180)})

To turn off:

Set(PERIODIC_HOOK(${BEEPID})=off)

To turn back on again later:

Set(PERIODIC_HOOK(${BEEPID})=on)

It is important to note that the hook does not actually run on the channel itself. It runs asynchronously on a new channel. Any audio generated by the hook gets injected into the call for the channel PERIODIC_HOOK() was set on.

The hook dialplan will have two variables available. HOOK_CHANNEL is the channel the hook is enabled on. HOOK_ID is the hook ID for enabling or disabling the hook.

Syntax

PERIODIC_HOOK(context,extension,interval,hook_id)

Arguments


CALLERID()

Synopsis

Gets or sets Caller*ID data on the channel.

Description

Gets or sets Caller*ID data on the channel. Uses channel callerid by default or optional callerid, if specified.

The pres field gets/sets a combined value for name-pres and num-pres.

The allowable values for the name-charset field are the following:

The allowable values for the num-pres, name-pres, and pres fields are the following:

Syntax

CALLERID(datatype,[CID])

Arguments


CONNECTEDLINE()

Synopsis

Gets or sets Connected Line data on the channel.

Description

Gets or sets Connected Line data on the channel.

The pres field gets/sets a combined value for name-pres and num-pres.

The allowable values for the name-charset field are the following:

The allowable values for the num-pres, name-pres, and pres fields are the following:

Syntax

CONNECTEDLINE(datatype,[i])

Arguments


REDIRECTING()

Synopsis

Gets or sets Redirecting data on the channel.

Description

Gets or sets Redirecting data on the channel.

The orig-pres, from-pres and to-pres fields get/set a combined value for the corresponding ...-name-pres and ...-num-pres fields.

The recognized values for the reason and orig-reason fields are the following:

The allowable values for the xxx-name-charset field are the following:

You can set a user defined reason string that SIP can send/receive instead. The user defined reason string my need to be quoted depending upon SIP or the peer's requirements. These strings are treated as unknown by the non-SIP channel drivers.

Syntax

REDIRECTING(datatype,[i])

Arguments


JITTERBUFFER()

Synopsis

Add a Jitterbuffer to the Read side of the channel. This dejitters the audio stream before it reaches the Asterisk core. This is a write only function.

Description

Jitterbuffers are constructed in two different ways. The first always take four arguments: max_size, resync_threshold, target_extra, and sync_video. Alternatively, a single argument of default can be provided, which will construct the default jitterbuffer for the given jitterbuffer type.

The arguments are:

max_size: Length in milliseconds of the buffer. Defaults to 200 ms.

resync_threshold: The length in milliseconds over which a timestamp difference will result in resyncing the jitterbuffer. Defaults to 1000ms.

target_extra: This option only affects the adaptive jitterbuffer. It represents the amount time in milliseconds by which the new jitter buffer will pad its size. Defaults to 40ms.

sync_video: This option enables video synchronization with the audio stream. It can be turned on and off. Defaults to off.

If a channel specifies a jitterbuffer due to channel driver configuration and the JITTERBUFFER function has set a jitterbuffer for that channel, the jitterbuffer set by the JITTERBUFFER function will take priority and the jitterbuffer set by the channel configuration will not be applied.

Example: Fixed with defaults
	exten => 1,1,Set(JITTERBUFFER(fixed)=default)
Example: Fixed with 200ms max size
	exten => 1,1,Set(JITTERBUFFER(fixed)=200)
Example: Fixed with 200ms max size and video sync support
	exten => 1,1,Set(JITTERBUFFER(fixed)=200,,,yes)
Example: Fixed with 200ms max size, resync threshold 1500
	exten => 1,1,Set(JITTERBUFFER(fixed)=200,1500)
Example: Adaptive with defaults
	exten => 1,1,Set(JITTERBUFFER(adaptive)=default)
Example: Adaptive with 200ms max size, 60ms target extra
	exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,60)
Example: Adaptive with 200ms max size and video sync support
	exten => 1,1,Set(JITTERBUFFER(adaptive)=200,,,yes)
Example: Set a fixed jitterbuffer with defaults; then remove it
	exten => 1,1,Set(JITTERBUFFER(fixed)=default)

	exten => 1,n,Set(JITTERBUFFER(disabled)=)

Syntax

JITTERBUFFER(jitterbuffer type)

Arguments


SORT()

Synopsis

Sorts a list of key/vals into a list of keys, based upon the vals.

Description

Takes a comma-separated list of keys and values, each separated by a colon, and returns a comma-separated list of the keys, sorted by their values. Values will be evaluated as floating-point numbers.

Syntax

SORT(key1:val1:key2:val2)

Arguments


CUT()

Synopsis

Slices and dices strings, based upon a named delimiter.

Description

Cut out information from a string (varname), based upon a named delimiter.

Syntax

CUT(varname,char-delim,range-spec)

Arguments


NOTCH_FILTER()

Synopsis

Apply a notch filter to a channel.

Description

The NOTCH_FILTER function attenuates a specified frequency using the provided bandwidth.

For example:

Set(NOTCH_FILTER(2600,t)=10.0)

Set(NOTCH_FILTER(1004)=5.0)

Set(NOTCH_FILTER(2400,r)=15.0)

Set(NOTCH_FILTER(1004,r)=10.0)

Set(NOTCH_FILTER(1004,d)=)

Syntax

NOTCH_FILTER(frequency,[options])

Arguments


ENV()

Synopsis

Gets or sets the environment variable specified.

Description

Variables starting with AST_ are reserved to the system and may not be set.

Syntax

ENV(varname)

Arguments


STAT()

Synopsis

Does a check on the specified file.

Description

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

STAT(flag,filename)

Arguments


FILE()

Synopsis

Read or write text file.

Description

Read and write text file in character and line mode.

Examples:

Read mode (byte):

;reads the entire content of the file.

Set(foo=${FILE(/tmp/test.txt)})

;reads from the 11th byte to the end of the file (i.e. skips the first 10).

Set(foo=${FILE(/tmp/test.txt,10)})

;reads from the 11th to 20th byte in the file (i.e. skip the first 10, then read 10 bytes).

Set(foo=${FILE(/tmp/test.txt,10,10)})

Read mode (line):

; reads the 3rd line of the file.

Set(foo=${FILE(/tmp/test.txt,3,1,l)})

; reads the 3rd and 4th lines of the file.

Set(foo=${FILE(/tmp/test.txt,3,2,l)})

; reads from the third line to the end of the file.

Set(foo=${FILE(/tmp/test.txt,3,,l)})

; reads the last three lines of the file.

Set(foo=${FILE(/tmp/test.txt,-3,,l)})

; reads the 3rd line of a DOS-formatted file.

Set(foo=${FILE(/tmp/test.txt,3,1,l,d)})

Write mode (byte):

; truncate the file and write "bar"

Set(FILE(/tmp/test.txt)=bar)

; Append "bar"

Set(FILE(/tmp/test.txt,,,a)=bar)

; Replace the first byte with "bar" (replaces 1 character with 3)

Set(FILE(/tmp/test.txt,0,1)=bar)

; Replace 10 bytes beginning at the 21st byte of the file with "bar"

Set(FILE(/tmp/test.txt,20,10)=bar)

; Replace all bytes from the 21st with "bar"

Set(FILE(/tmp/test.txt,20)=bar)

; Insert "bar" after the 4th character

Set(FILE(/tmp/test.txt,4,0)=bar)

Write mode (line):

; Replace the first line of the file with "bar"

Set(FILE(/tmp/foo.txt,0,1,l)=bar)

; Replace the last line of the file with "bar"

Set(FILE(/tmp/foo.txt,-1,,l)=bar)

; Append "bar" to the file with a newline

Set(FILE(/tmp/foo.txt,,,al)=bar)

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

FILE(filename,[offset,[length,[options,[format]]]])

Arguments

See Also


FILE_COUNT_LINE()

Synopsis

Obtains the number of lines of a text file.

Description

Returns the number of lines, or -1 on error.

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

FILE_COUNT_LINE(filename,[format])

Arguments

See Also


FILE_FORMAT()

Synopsis

Return the newline format of a text file.

Description

Return the line terminator type:

'u' - Unix "\n" format

'd' - DOS "\r\n" format

'm' - Macintosh "\r" format

'x' - Cannot be determined

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

FILE_FORMAT(filename)

Arguments

See Also


BASENAME()

Synopsis

Return the name of a file.

Description

Return the base file name, given a full file path.

Example: Directory name
	same => n,Set(basename=${BASENAME(/etc/asterisk/extensions.conf)})
	same => n,NoOp(${basename}) ; outputs extensions.conf

Syntax

BASENAME(filename)

Arguments

See Also


DIRNAME()

Synopsis

Return the directory of a file.

Description

Return the directory of a file, given a full file path.

Example: Directory name
	same => n,Set(dirname=${DIRNAME(/etc/asterisk/extensions.conf)})
	same => n,NoOp(${dirname}) ; outputs /etc/asterisk

Syntax

DIRNAME(filename)

Arguments

See Also


DIALPLAN_EXISTS()

Synopsis

Checks the existence of a dialplan target.

Description

This function returns 1 if the target exits. Otherwise, it returns 0.

Syntax

DIALPLAN_EXISTS(context,[extension,[priority]])

Arguments


VALID_EXTEN()

Synopsis

Determine whether an extension exists or not.

Description

Returns a true value if the indicated context, extension, and priority exist.

Syntax

VALID_EXTEN([context,]extension,[priority])

Arguments


IFMODULE()

Synopsis

Checks if an Asterisk module is loaded in memory.

Description

Checks if a module is loaded. Use the full module name as shown by the list in module list. Returns 1 if module exists in memory, otherwise 0

Syntax

IFMODULE(modulename.so)

Arguments


AGC()

Synopsis

Apply automatic gain control to audio on a channel.

Description

The AGC function will apply automatic gain control to the audio on the channel that it is executed on. Using rx for audio received and tx for audio transmitted to the channel. When using this function you set a target audio level. It is primarily intended for use with analog lines, but could be useful for other channels as well. The target volume is set with a number between 1-32768. The larger the number the louder (more gain) the channel will receive.

Examples:

exten => 1,1,Set(AGC(rx)=8000)

exten => 1,2,Set(AGC(tx)=off)

Syntax

AGC(channeldirection)

Arguments


DENOISE()

Synopsis

Apply noise reduction to audio on a channel.

Description

The DENOISE function will apply noise reduction to audio on the channel that it is executed on. It is very useful for noisy analog lines, especially when adjusting gains or using AGC. Use rx for audio received from the channel and tx to apply the filter to the audio being sent to the channel.

Examples:

exten => 1,1,Set(DENOISE(rx)=on)

exten => 1,2,Set(DENOISE(tx)=off)

Syntax

DENOISE(channeldirection)

Arguments


URIENCODE()

Synopsis

Encodes a string to URI-safe encoding according to RFC 2396.

Description

Returns the encoded string defined in data.

Syntax

URIENCODE(data)

Arguments


URIDECODE()

Synopsis

Decodes a URI-encoded string according to RFC 2396.

Description

Returns the decoded URI-encoded data string.

Syntax

URIDECODE(data)

Arguments


DEVICE_STATE()

Synopsis

Get or Set a device state.

Description

The DEVICE_STATE function can be used to retrieve the device state from any device state provider. For example:

NoOp(SIP/mypeer has state ${DEVICE_STATE(SIP/mypeer)})

NoOp(Conference number 1234 has state ${DEVICE_STATE(MeetMe:1234)})

The DEVICE_STATE function can also be used to set custom device state from the dialplan. The Custom: prefix must be used. For example:

Set(DEVICE_STATE(Custom:lamp1)=BUSY)

Set(DEVICE_STATE(Custom:lamp2)=NOT_INUSE)

You can subscribe to the status of a custom device state using a hint in the dialplan:

exten => 1234,hint,Custom:lamp1

The possible values for both uses of this function are:

UNKNOWN | NOT_INUSE | INUSE | BUSY | INVALID | UNAVAILABLE | RINGING | RINGINUSE | ONHOLD

Syntax

DEVICE_STATE(device)

Arguments


HINT()

Synopsis

Get the devices set for a dialplan hint.

Description

The HINT function can be used to retrieve the list of devices that are mapped to a dialplan hint. For example:

NoOp(Hint for Extension 1234 is ${HINT(1234)})

Syntax

HINT(extension@[context,[options]])

Arguments


VOLUME()

Synopsis

Set or get the TX or RX volume of a channel.

Description

The VOLUME function can be used to increase or decrease the tx or rx gain of any channel.

For example:

Set(VOLUME(TX)=3)

Set(VOLUME(RX)=2)

Set(VOLUME(TX,p)=3)

Set(VOLUME(RX,p)=3)

Syntax

VOLUME(direction,[options])

Arguments


SYSINFO()

Synopsis

Returns system information specified by parameter.

Description

Returns information from a given parameter.

Syntax

SYSINFO(parameter)

Arguments


HANGUPCAUSE()

Synopsis

Gets per-channel hangupcause information from the channel.

Description

Gets technology-specific or translated Asterisk cause code information from the channel for the specified channel that resulted from a dial.

Syntax

HANGUPCAUSE(channel,type)

Arguments

See Also


HANGUPCAUSE_KEYS()

Synopsis

Gets the list of channels for which hangup causes are available.

Description

Returns a comma-separated list of channel names to be used with the HANGUPCAUSE function.

See Also


ENUMQUERY()

Synopsis

Initiate an ENUM query.

Description

This will do a ENUM lookup of the given phone number.

Syntax

ENUMQUERY(number,[method-type,[zone-suffix]])

Arguments


ENUMRESULT()

Synopsis

Retrieve results from a ENUMQUERY.

Description

This function will retrieve results from a previous use of the ENUMQUERY function.

Syntax

ENUMRESULT(id,resultnum)

Arguments


ENUMLOOKUP()

Synopsis

General or specific querying of NAPTR records for ENUM or ENUM-like DNS pointers.

Description

For more information see doc/AST.pdf.

Syntax

ENUMLOOKUP(number,[method-type,[options,[record#,[zone-suffix]]]])

Arguments


TXTCIDNAME()

Synopsis

TXTCIDNAME looks up a caller name via DNS.

Description

This function looks up the given phone number in DNS to retrieve the caller id name. The result will either be blank or be the value found in the TXT record in DNS.

Syntax

TXTCIDNAME(number,[zone-suffix])

Arguments


SHELL()

Synopsis

Executes a command using the system shell and captures its output.

Description

Collects the output generated by a command executed by the system shell

Example: Set(foo=${SHELL(echo bar)})

The command supplied to this function will be executed by the system's shell, typically specified in the SHELL environment variable. There are many different system shells available with somewhat different behaviors, so the output generated by this function may vary between platforms.

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

SHELL(command)

Arguments


MD5()

Synopsis

Computes an MD5 digest.

Description

Computes an MD5 digest.

Syntax

MD5(data)

Arguments


CDR()

Synopsis

Gets or sets a CDR variable.

Description

All of the CDR field names are read-only, except for accountcode, userfield, and amaflags. You may, however, supply a name not on the above list, and create your own variable, whose value can be changed with this function, and this variable will be stored on the CDR.

Example: exten => 1,1,Set(CDR(userfield)=test)

CDRs can only be modified before the bridge between two channels is torn down. For example, CDRs may not be modified after the Dial application has returned.

Syntax

CDR(name,[options])

Arguments


CDR_PROP()

Synopsis

Set a property on a channel's CDR.

Description

This function sets a property on a channel's CDR. Properties alter the behavior of how the CDR operates for that channel.

Syntax

CDR_PROP(name)

Arguments


AES_ENCRYPT()

Synopsis

Encrypt a string with AES given a 16 character key.

Description

Returns an AES encrypted string encoded in base64.

Syntax

AES_ENCRYPT(key,string)

Arguments

See Also


AES_DECRYPT()

Synopsis

Decrypt a string encoded in base64 with AES given a 16 character key.

Description

Returns the plain text string.

Syntax

AES_DECRYPT(key,string)

Arguments

See Also


VMCOUNT()

Synopsis

Count the voicemails in a specified mailbox or mailboxes.

Description

Count the number of voicemails in a specified mailbox, you could also specify the mailbox folder.

Example: exten => s,1,Set(foo=${VMCOUNT(125@default)})

An ampersand-separated list of mailboxes may be specified to count voicemails in multiple mailboxes. If a folder is specified, this will apply to all mailboxes specified.

Example: Multiple mailbox inbox count
	same => n,NoOp(${VMCOUNT(1234@default&1235@default&1236@default,INBOX)})

Syntax

VMCOUNT(vmbox,[folder])

Arguments


CURL()

Synopsis

Retrieve content from a remote web or ftp server

Description

When this function is read, a HTTP GET (by default) will be used to retrieve the contents of the provided url. The contents are returned as the result of the function.

When this function is written to, a HTTP GET will be used to retrieve the contents of the provided url. The value written to the function specifies the destination file of the cURL'd resource.

If live_dangerously in asterisk.conf is set to no, this function can only be written to from the dialplan, and not directly from external protocols. Read operations are unaffected.

Example: Displaying contents of a page
	exten => s,1,Verbose(0, ${CURL(http://localhost:8088/static/astman.css)})
Example: Retrieving a file
	exten => s,1,Set(CURL(http://localhost:8088/static/astman.css)=/var/spool/asterisk/tmp/astman.css))

Syntax

CURL(url,[post-data])

Arguments

See Also


CURLOPT()

Synopsis

Sets various options for future invocations of CURL.

Description

Options may be set globally or per channel. Per-channel settings will override global settings. Only HTTP headers are added instead of overriding

Syntax

CURLOPT([key])

Arguments

See Also


CALLCOMPLETION()

Synopsis

Get or set a call completion configuration parameter for a channel.

Description

The CALLCOMPLETION function can be used to get or set a call completion configuration parameter for a channel. Note that setting a configuration parameter will only change the parameter for the duration of the call. For more information see doc/AST.pdf. For more information on call completion parameters, see configs/ccss.conf.sample.

Syntax

CALLCOMPLETION(option)

Arguments


GROUP_COUNT()

Synopsis

Counts the number of channels in the specified group.

Description

Calculates the group count for the specified group, or uses the channel's current group if not specified (and non-empty).

Syntax

GROUP_COUNT([groupname,[category]])

Arguments


GROUP_MATCH_COUNT()

Synopsis

Counts the number of channels in the groups matching the specified pattern.

Description

Calculates the group count for all groups that match the specified pattern. Note: category matching is applied after matching based on group. Uses standard regular expression matching on both (see regex(7)).

Syntax

GROUP_MATCH_COUNT(groupmatch,[category])

Arguments


GROUP()

Synopsis

Gets or sets the channel group.

Description

category can be employed for more fine grained group management. Each channel can only be member of exactly one group per category.

Syntax

GROUP([category])

Arguments


GROUP_LIST()

Synopsis

Gets a list of the groups set on a channel.

Description

Gets a list of the groups set on a channel.


SHA1()

Synopsis

Computes a SHA1 digest.

Description

Generate a SHA1 digest via the SHA1 algorythm.

Example: Set(sha1hash=${SHA1(junky)})

Sets the asterisk variable sha1hash to the string 60fa5675b9303eb62f99a9cd47f9f5837d18f9a0 which is known as his hash

Syntax

SHA1(data)

Arguments


REALTIME()

Synopsis

RealTime Read/Write Functions.

Description

This function will read or write values from/to a RealTime repository. REALTIME(....) will read names/values from the repository, and REALTIME(....)= will write a new value/field to the repository. On a read, this function returns a delimited text string. The name/value pairs are delimited by delim1, and the name and value are delimited between each other with delim2. If there is no match, NULL will be returned by the function. On a write, this function will always return NULL.

Syntax

REALTIME(family,fieldmatch,[matchvalue,[delim1|field,[delim2]]])

Arguments

See Also


REALTIME_STORE()

Synopsis

RealTime Store Function.

Description

This function will insert a new set of values into the RealTime repository. If RT engine provides an unique ID of the stored record, REALTIME_STORE(...)=.. creates channel variable named RTSTOREID, which contains value of unique ID. Currently, a maximum of 30 field/value pairs is supported.

Syntax

REALTIME_STORE(family,field1,fieldN,field30)

Arguments

See Also


REALTIME_DESTROY()

Synopsis

RealTime Destroy Function.

Description

This function acts in the same way as REALTIME(....) does, except that it destroys the matched record in the RT engine.

If live_dangerously in asterisk.conf is set to no, this function can only be read from the dialplan, and not directly from external protocols. It can, however, be executed as a write operation (REALTIME_DESTROY(family, fieldmatch)=ignored)

Syntax

REALTIME_DESTROY(family,fieldmatch,[matchvalue,[delim1,[delim2]]])

Arguments

See Also


REALTIME_FIELD()

Synopsis

RealTime query function.

Description

This function retrieves a single item, fieldname from the RT engine, where fieldmatch contains the value matchvalue. When written to, the REALTIME_FIELD() function performs identically to the REALTIME() function.

Syntax

REALTIME_FIELD(family,fieldmatch,matchvalue,fieldname)

Arguments

See Also


REALTIME_HASH()

Synopsis

RealTime query function.

Description

This function retrieves a single record from the RT engine, where fieldmatch contains the value matchvalue and formats the output suitably, such that it can be assigned to the HASH() function. The HASH() function then provides a suitable method for retrieving each field value of the record.

Syntax

REALTIME_HASH(family,fieldmatch,matchvalue)

Arguments

See Also


PITCH_SHIFT()

Synopsis

Pitch shift both tx and rx audio streams on a channel.

Description

Examples:

exten => 1,1,Set(PITCH_SHIFT(tx)=highest); raises pitch an octave

exten => 1,1,Set(PITCH_SHIFT(rx)=higher) ; raises pitch more

exten => 1,1,Set(PITCH_SHIFT(both)=high) ; raises pitch

exten => 1,1,Set(PITCH_SHIFT(rx)=low) ; lowers pitch

exten => 1,1,Set(PITCH_SHIFT(tx)=lower) ; lowers pitch more

exten => 1,1,Set(PITCH_SHIFT(both)=lowest) ; lowers pitch an octave

exten => 1,1,Set(PITCH_SHIFT(rx)=0.8) ; lowers pitch

exten => 1,1,Set(PITCH_SHIFT(tx)=1.5) ; raises pitch

Syntax

PITCH_SHIFT(channel direction)

Arguments


PJSIP_ENDPOINT()

Synopsis

Get information about a PJSIP endpoint

Description

Syntax

PJSIP_ENDPOINT(name,field)

Arguments


LOCK()

Synopsis

Attempt to obtain a named mutex.

Description

Attempts to grab a named lock exclusively, and prevents other channels from obtaining the same lock. LOCK will wait for the lock to become available. Returns 1 if the lock was obtained or 0 on error.

To avoid the possibility of a deadlock, LOCK will only attempt to obtain the lock for 3 seconds if the channel already has another lock.

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

LOCK(lockname)

Arguments


TRYLOCK()

Synopsis

Attempt to obtain a named mutex.

Description

Attempts to grab a named lock exclusively, and prevents other channels from obtaining the same lock. Returns 1 if the lock was available or 0 otherwise.

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

TRYLOCK(lockname)

Arguments


UNLOCK()

Synopsis

Unlocks a named mutex.

Description

Unlocks a previously locked mutex. Returns 1 if the channel had a lock or 0 otherwise.

It is generally unnecessary to unlock in a hangup routine, as any locks held are automatically freed when the channel is destroyed.

If live_dangerously in asterisk.conf is set to no, this function can only be executed from the dialplan, and not directly from external protocols.

Syntax

UNLOCK(lockname)

Arguments


ICONV()

Synopsis

Converts charsets of strings.

Description

Converts string from in-charset into out-charset. For available charsets, use iconv -l on your shell command line.

Due to limitations within the API, ICONV will not currently work with charsets with embedded NULLs. If found, the string will terminate.

Syntax

ICONV(in-charset,out-charset,string)

Arguments


SRVQUERY()

Synopsis

Initiate an SRV query.

Description

This will do an SRV lookup of the given service.

Syntax

SRVQUERY(service)

Arguments


SRVRESULT()

Synopsis

Retrieve results from an SRVQUERY.

Description

This function will retrieve results from a previous use of the SRVQUERY function.

Syntax

SRVRESULT(id,resultnum)

Arguments


VERSION()

Synopsis

Return the Version info for this Asterisk.

Description

If there are no arguments, return the version of Asterisk in this format: SVN-branch-1.4-r44830M

Example: Set(junky=${VERSION()};

Sets junky to the string SVN-branch-1.6-r74830M, or possibly, SVN-trunk-r45126M.

Syntax

VERSION([info])

Arguments


EXCEPTION()

Synopsis

Retrieve the details of the current dialplan exception.

Description

Retrieve the details (specified field) of the current dialplan exception.

Syntax

EXCEPTION(field)

Arguments

See Also


TESTTIME()

Synopsis

Sets a time to be used with the channel to test logical conditions.

Description

To test dialplan timing conditions at times other than the current time, use this function to set an alternate date and time. For example, you may wish to evaluate whether a location will correctly identify to callers that the area is closed on Christmas Day, when Christmas would otherwise fall on a day when the office is normally open.

Syntax

TESTTIME(date,time,[zone])

Arguments

See Also


FEATURE()

Synopsis

Get or set a feature option on a channel.

Description

When this function is used as a read, it will get the current value of the specified feature option for this channel. It will be the value of this option configured in features.conf if a channel specific value has not been set. This function can also be used to set a channel specific value for the supported feature options.

Syntax

FEATURE(option_name)

Arguments

See Also


FEATUREMAP()

Synopsis

Get or set a feature map to a given value on a specific channel.

Description

When this function is used as a read, it will get the current digit sequence mapped to the specified feature for this channel. This value will be the one configured in features.conf if a channel specific value has not been set. This function can also be used to set a channel specific value for a feature mapping.

Syntax

FEATUREMAP(feature_name)

Arguments

See Also


MESSAGE()

Synopsis

Create a message or read fields from a message.

Description

This function will read from or write a value to a text message. It is used both to read the data out of an incoming message, as well as modify or create a message that will be sent outbound.

Syntax

MESSAGE(argument)

Arguments

See Also


MESSAGE_DATA()

Synopsis

Read or write custom data attached to a message.

Description

This function will read from or write a value to a text message. It is used both to read the data out of an incoming message, as well as modify a message that will be sent outbound.

If you want to set an outbound message to carry data in the current message, do Set(MESSAGE_DATA(key)=${MESSAGE_DATA(key)}).

Syntax

MESSAGE_DATA(argument)

Arguments

See Also


AMI_CLIENT()

Synopsis

Checks attributes of manager accounts

Description

Currently, the only supported parameter is "sessions" which will return the current number of active sessions for this AMI account.

Syntax

AMI_CLIENT(loginname,field)

Arguments


CALENDAR_BUSY()

Synopsis

Determine if the calendar is marked busy at this time.

Description

Check the specified calendar's current busy status.

Syntax

CALENDAR_BUSY(calendar)

Arguments

See Also


CALENDAR_EVENT()

Synopsis

Get calendar event notification data from a notification call.

Description

Whenever a calendar event notification call is made, the event data may be accessed with this function.

Syntax

CALENDAR_EVENT(field)

Arguments

See Also


CALENDAR_QUERY()

Synopsis

Query a calendar server and store the data on a channel

Description

Get a list of events in the currently accessible timeframe of the calendar The function returns the id for accessing the result with CALENDAR_QUERY_RESULT()

Syntax

CALENDAR_QUERY(calendar,[start,[end]])

Arguments

See Also


CALENDAR_QUERY_RESULT()

Synopsis

Retrieve data from a previously run CALENDAR_QUERY() call

Description

After running CALENDAR_QUERY and getting a result id, calling CALENDAR_QUERY with that id and a field will return the data for that field. If multiple events matched the query, and entry is provided, information from that event will be returned.

Syntax

CALENDAR_QUERY_RESULT(id,field,[entry])

Arguments

See Also


CALENDAR_WRITE()

Synopsis

Write an event to a calendar

Description

Example: CALENDAR_WRITE(calendar,field1,field2,field3)=val1,val2,val3

The field and value arguments can easily be set/passed using the HASHKEYS() and HASH() functions

Syntax

CALENDAR_WRITE(calendar,field)

Arguments

See Also


MUTEAUDIO()

Synopsis

Muting audio streams in the channel

Description

The MUTEAUDIO function can be used to mute inbound (to the PBX) or outbound audio in a call.

Examples:

MUTEAUDIO(in)=on

MUTEAUDIO(in)=off

Syntax

MUTEAUDIO(direction)

Arguments


PP_EACH_EXTENSION()

Synopsis

Execute specified template for each extension.

Description

Output the specified template for each extension associated with the specified MAC address.

Syntax

PP_EACH_EXTENSION(mac,template_file)

Arguments


PP_EACH_USER()

Synopsis

Generate a string for each phoneprov user.

Description

Pass in a string, with phoneprov variables you want substituted in the format of %{VARNAME}, and you will get the string rendered for each user in phoneprov excluding ones with MAC address exclude_mac. Probably not useful outside of res_phoneprov.

Example: ${PP_EACH_USER(%{DISPLAY_NAME}|${MAC})

Syntax

PP_EACH_USER(string,exclude_mac)

Arguments


PJSIP_HEADER()

Synopsis

Gets headers from an inbound PJSIP channel. Adds, updates or removes the specified SIP header from an outbound PJSIP channel.

Description

PJSIP_HEADER allows you to read specific SIP headers from the inbound PJSIP channel as well as write(add, update, remove) headers on the outbound channel. One exception is that you can read headers that you have already added on the outbound channel.

Examples:

;

; Set 'somevar' to the value of the 'From' header.

exten => 1,1,Set(somevar=${PJSIP_HEADER(read,From)})

;

; Set 'via2' to the value of the 2nd 'Via' header.

exten => 1,1,Set(via2=${PJSIP_HEADER(read,Via,2)})

;

; Set 'xhdr' to the value of the 1sx X-header.

exten => 1,1,Set(xhdr=${PJSIP_HEADER(read,X-*,1)})

;

; Add an 'X-Myheader' header with the value of 'myvalue'.

exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)

;

; Add an 'X-Myheader' header with an empty value.

exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=)

;

; Update the value of the header named 'X-Myheader' to 'newvalue'.

; 'X-Myheader' must already exist or the call will fail.

exten => 1,1,Set(PJSIP_HEADER(update,X-MyHeader)=newvalue)

;

; Remove all headers whose names exactly match 'X-MyHeader'.

exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)

;

; Remove all headers that begin with 'X-My'.

exten => 1,1,Set(PJSIP_HEADER(remove,X-My*)=)

;

; Remove all previously added headers.

exten => 1,1,Set(PJSIP_HEADER(remove,*)=)

;

The remove action can be called by reading or writing PJSIP_HEADER.

;

; Display the number of headers removed

exten => 1,1,Verbose( Removed ${PJSIP_HEADER(remove,X-MyHeader)} headers)

;

; Set a variable to the number of headers removed

exten => 1,1,Set(count=${PJSIP_HEADER(remove,X-MyHeader)})

;

; Just remove them ignoring any count

exten => 1,1,Set(=${PJSIP_HEADER(remove,X-MyHeader)})

exten => 1,1,Set(PJSIP_HEADER(remove,X-MyHeader)=)

;

If you call PJSIP_HEADER in a normal dialplan context you'll be operating on the caller's (incoming) channel which may not be what you want. To operate on the callee's (outgoing) channel call PJSIP_HEADER in a pre-dial handler.

Example:

;

[handler]

exten => addheader,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)

exten => addheader,2,Set(PJSIP_HEADER(add,X-MyHeader2)=myvalue2)

;

[somecontext]

exten => 1,1,Dial(PJSIP/${EXTEN},,b(handler^addheader^1))

;

Syntax

PJSIP_HEADER(action,name,[number])

Arguments


PJSIP_HEADERS()

Synopsis

Gets the list of SIP header names from an INVITE message.

Description

Returns a comma-separated list of header names (without values) from the INVITE message. Multiple headers with the same name are included in the list only once.

For example, ${PJSIP_HEADERS(Co)} might return Contact,Content-Length,Content-Type. As a practical example, you may use ${PJSIP_HEADERS(X-)} to enumerate optional extended headers.

Syntax

PJSIP_HEADERS([prefix])

Arguments

See Also


PARK_GET_CHANNEL()

Synopsis

Get the channel name of an occupied parking space in a parking lot.

Description

This function returns the channel of the specified parking space if the parking lot space is occupied.

Syntax

PARK_GET_CHANNEL(parking_space,parking_lot)

Arguments


ODBC()

Synopsis

Controls ODBC transaction properties.

Description

The ODBC() function allows setting several properties to influence how a connected database processes transactions.

Syntax

ODBC(property,[argument])

Arguments


SMDI_MSG_RETRIEVE()

Synopsis

Retrieve an SMDI message.

Description

This function is used to retrieve an incoming SMDI message. It returns an ID which can be used with the SMDI_MSG() function to access details of the message. Note that this is a destructive function in the sense that once an SMDI message is retrieved using this function, it is no longer in the global SMDI message queue, and can not be accessed by any other Asterisk channels. The timeout for this function is optional, and the default is 3 seconds. When providing a timeout, it should be in milliseconds.

The default search is done on the forwarding station ID. However, if you set one of the search key options in the options field, you can change this behavior.

Syntax

SMDI_MSG_RETRIEVE(smdi port,search key,[timeout,[options]])

Arguments

See Also


SMDI_MSG()

Synopsis

Retrieve details about an SMDI message.

Description

This function is used to access details of an SMDI message that was pulled from the incoming SMDI message queue using the SMDI_MSG_RETRIEVE() function.

Syntax

SMDI_MSG(message_id,component)

Arguments

See Also


TONE_DETECT()

Synopsis

Asynchronously detects a tone

Description

The TONE_DETECT function detects a single-frequency tone and keeps track of how many times the tone has been detected.

When reading this function (instead of writing), supply tx to get the number of times a tone has been detected in the TX direction and rx to get the number of times a tone has been detected in the RX direction.

Example: intercept2600
	same => n,Set(TONE_DETECT(2600,1000,g(got-2600,s,1))=)
	same => n,Wait(15)
	same => n,NoOp(${TONE_DETECT(rx)})

Syntax

TONE_DETECT(freq,[duration_ms,[options]])

Arguments


STIR_SHAKEN()

Synopsis

Gets the number of STIR/SHAKEN results or a specific STIR/SHAKEN value from a result on the channel.

Description

This function will either return the number of STIR/SHAKEN identities, or return information on the specified identity. To get the number of identities, just pass 'count' as the only parameter to the function. If you want to get information on a specific STIR/SHAKEN identity, you can get the number of identities and then pass an index as the first parameter and one of the values you would like to retrieve as the second parameter.

Example: Get count and retrieve value
	same => n,NoOp(Number of STIR/SHAKEN identities: ${STIR_SHAKEN(count)})
	same => n,NoOp(Identity ${STIR_SHAKEN(0, identity)} has attestation level ${STIR_SHAKEN(0, attestation)})

Syntax

STIR_SHAKEN(index,[value])

Arguments


FAXOPT()

Synopsis

Gets/sets various pieces of information about a fax session.

Description

FAXOPT can be used to override the settings for a FAX session listed in res_fax.conf, it can also be used to retrieve information about a FAX session that has finished eg. pages/status.

Syntax

FAXOPT(item)

Arguments

See Also


JABBER_RECEIVE()

Synopsis

Reads XMPP messages.

Description

Receives a text message on the given account from the buddy identified by jid and returns the contents.

Example: ${JABBER_RECEIVE(asterisk,bob@domain.com)} returns an XMPP message sent from bob@domain.com (or nothing in case of a time out), to the asterisk XMPP account configured in xmpp.conf.

Syntax

JABBER_RECEIVE(account,jid,[timeout])

Arguments

See Also


JABBER_STATUS()

Synopsis

Retrieves a buddy's status.

Description

Retrieves the numeric status associated with the buddy identified by jid. The return value will be one of the following.

Syntax

JABBER_STATUS(account,jid)

Arguments

See Also


IAXpeers

Synopsis

List IAX peers.

Description


IAXpeerlist

Synopsis

List IAX Peers.

Description

List all the IAX peers.


IAXnetstats

Synopsis

Show IAX Netstats.

Description

Show IAX channels network statistics.


IAXregistry

Synopsis

Show IAX registrations.

Description

Show IAX registrations.


DAHDITransfer

Synopsis

Transfer DAHDI Channel.

Description

Simulate a flash hook event by the user connected to the channel.

Valid only for analog channels.

Syntax

DAHDITransfer(DAHDIChannel)

Arguments


DAHDIHangup

Synopsis

Hangup DAHDI Channel.

Description

Simulate an on-hook event by the user connected to the channel.

Valid only for analog channels.

Syntax

DAHDIHangup(DAHDIChannel)

Arguments


DAHDIDialOffhook

Synopsis

Dial over DAHDI channel while offhook.

Description

Generate DTMF control frames to the bridged peer.

Syntax

DAHDIDialOffhook(DAHDIChannel,Number)

Arguments


DAHDIDNDon

Synopsis

Toggle DAHDI channel Do Not Disturb status ON.

Description

Equivalent to the CLI command "dahdi set dnd on".

Feature only supported by analog channels.

Syntax

DAHDIDNDon(DAHDIChannel)

Arguments


DAHDIDNDoff

Synopsis

Toggle DAHDI channel Do Not Disturb status OFF.

Description

Equivalent to the CLI command "dahdi set dnd off".

Feature only supported by analog channels.

Syntax

DAHDIDNDoff(DAHDIChannel)

Arguments


DAHDIShowChannels

Synopsis

Show status of DAHDI channels.

Description

Similar to the CLI command "dahdi show channels".

Syntax

DAHDIShowChannels([DAHDIChannel])

Arguments


DAHDIRestart

Synopsis

Fully Restart DAHDI channels (terminates calls).

Description

Equivalent to the CLI command "dahdi restart".


PRIShowSpans

Synopsis

Show status of PRI spans.

Description

Similar to the CLI command "pri show spans".

Syntax

PRIShowSpans([Span])

Arguments


PRIDebugSet

Synopsis

Set PRI debug levels for a span

Description

Equivalent to the CLI command "pri set debug span ".

Syntax

PRIDebugSet(Span,Level)

Arguments


PRIDebugFileSet

Synopsis

Set the file used for PRI debug message output

Description

Equivalent to the CLI command "pri set debug file "

Syntax

PRIDebugFileSet(File)

Arguments


PRIDebugFileUnset

Synopsis

Disables file output for PRI debug messages

Description


SIPpeers

Synopsis

List SIP peers (text format).

Description

Lists SIP peers in text format with details on current status. Peerlist will follow as separate events, followed by a final event called PeerlistComplete.


SIPshowpeer

Synopsis

show SIP peer (text format).

Description

Show one SIP peer with details on current status.

Syntax

SIPshowpeer(Peer)

Arguments


SIPqualifypeer

Synopsis

Qualify SIP peers.

Description

Qualify a SIP peer.

Syntax

SIPqualifypeer(Peer)

Arguments

See Also


SIPshowregistry

Synopsis

Show SIP registrations (text format).

Description

Lists all registration requests and status. Registrations will follow as separate events followed by a final event called RegistrationsComplete.


SIPnotify

Synopsis

Send a SIP notify.

Description

Sends a SIP Notify event.

All parameters for this event must be specified in the body of this request via multiple Variable: name=value sequences.

Syntax

SIPnotify(Channel,Variable,[Call-ID])

Arguments


SIPpeerstatus

Synopsis

Show the status of one or all of the sip peers.

Description

Retrieves the status of one or all of the sip peers. If no peer name is specified, status for all of the sip peers will be retrieved.

Syntax

SIPpeerstatus([Peer])

Arguments


SKINNYdevices

Synopsis

List SKINNY devices (text format).

Description

Lists Skinny devices in text format with details on current status. Devicelist will follow as separate events, followed by a final event called DevicelistComplete.


SKINNYshowdevice

Synopsis

Show SKINNY device (text format).

Description

Show one SKINNY device with details on current status.

Syntax

SKINNYshowdevice(Device)

Arguments


SKINNYlines

Synopsis

List SKINNY lines (text format).

Description

Lists Skinny lines in text format with details on current status. Linelist will follow as separate events, followed by a final event called LinelistComplete.


SKINNYshowline

Synopsis

Show SKINNY line (text format).

Description

Show one SKINNY line with details on current status.

Syntax

SKINNYshowline(Line)

Arguments


DialplanExtensionAdd

Synopsis

Add an extension to the dialplan

Description

Syntax

DialplanExtensionAdd(Context,Extension,Priority,Application,[ApplicationData,[Replace]])

Arguments


DialplanExtensionRemove

Synopsis

Remove an extension from the dialplan

Description

Syntax

DialplanExtensionRemove(Context,Extension,[Priority])

Arguments


VoicemailUsersList

Synopsis

List All Voicemail User Information.

Description


VoicemailUserStatus

Synopsis

Show the status of given voicemail user's info.

Description

Retrieves the status of the given voicemail user.

Syntax

VoicemailUserStatus(Context,Mailbox)

Arguments


VoicemailRefresh

Synopsis

Tell Asterisk to poll mailboxes for a change

Description

Normally, MWI indicators are only sent when Asterisk itself changes a mailbox. With external programs that modify the content of a mailbox from outside the application, an option exists called pollmailboxes that will cause voicemail to continually scan all mailboxes on a system for changes. This can cause a large amount of load on a system. This command allows external applications to signal when a particular mailbox has changed, thus permitting external applications to modify mailboxes and MWI to work without introducing considerable CPU load.

If Context is not specified, all mailboxes on the system will be polled for changes. If Context is specified, but Mailbox is omitted, then all mailboxes within Context will be polled. Otherwise, only a single mailbox will be polled for changes.

Syntax

VoicemailRefresh([Context,[Mailbox]])

Arguments


PlayDTMF

Synopsis

Play DTMF signal on a specific channel.

Description

Plays a dtmf digit on the specified channel.

Syntax

PlayDTMF(Channel,Digit,[Duration,[Receive]])

Arguments


Agents

Synopsis

Lists agents and their status.

Description

Will list info about all defined agents.

See Also


AgentLogoff

Synopsis

Sets an agent as no longer logged in.

Description

Sets an agent as no longer logged in.

Syntax

AgentLogoff(Agent,[Soft])

Arguments


VoicemailUsersList

Synopsis

List All Voicemail User Information.

Description


VoicemailUserStatus

Synopsis

Show the status of given voicemail user's info.

Description

Retrieves the status of the given voicemail user.

Syntax

VoicemailUserStatus(Context,Mailbox)

Arguments


VoicemailRefresh

Synopsis

Tell Asterisk to poll mailboxes for a change

Description

Normally, MWI indicators are only sent when Asterisk itself changes a mailbox. With external programs that modify the content of a mailbox from outside the application, an option exists called pollmailboxes that will cause voicemail to continually scan all mailboxes on a system for changes. This can cause a large amount of load on a system. This command allows external applications to signal when a particular mailbox has changed, thus permitting external applications to modify mailboxes and MWI to work without introducing considerable CPU load.

If Context is not specified, all mailboxes on the system will be polled for changes. If Context is specified, but Mailbox is omitted, then all mailboxes within Context will be polled. Otherwise, only a single mailbox will be polled for changes.

Syntax

VoicemailRefresh([Context,[Mailbox]])

Arguments


ControlPlayback

Synopsis

Control the playback of a file being played to a channel.

Description

Control the operation of a media file being played back to a channel. Note that this AMI action does not initiate playback of media to channel, but rather controls the operation of a media operation that was already initiated on the channel.

The pause and restart Control options will stop a playback operation if that operation was not initiated from the ControlPlayback application or the control stream file AGI command.

Syntax

ControlPlayback(Channel,Control)

Arguments

See Also


TddTx

Synopsis

Send a TDD message on a channel.

Description

This action sends a message via TDD/TTY tones on the current channel. If TDD processing is not enabled on the channel an error will be returned.

Syntax

TddTx(Channel,Message)

Arguments

See Also


VoicemailUsersList

Synopsis

List All Voicemail User Information.

Description


VoicemailUserStatus

Synopsis

Show the status of given voicemail user's info.

Description

Retrieves the status of the given voicemail user.

Syntax

VoicemailUserStatus(Context,Mailbox)

Arguments


VoicemailRefresh

Synopsis

Tell Asterisk to poll mailboxes for a change

Description

Normally, MWI indicators are only sent when Asterisk itself changes a mailbox. With external programs that modify the content of a mailbox from outside the application, an option exists called pollmailboxes that will cause voicemail to continually scan all mailboxes on a system for changes. This can cause a large amount of load on a system. This command allows external applications to signal when a particular mailbox has changed, thus permitting external applications to modify mailboxes and MWI to work without introducing considerable CPU load.

If Context is not specified, all mailboxes on the system will be polled for changes. If Context is specified, but Mailbox is omitted, then all mailboxes within Context will be polled. Otherwise, only a single mailbox will be polled for changes.

Syntax

VoicemailRefresh([Context,[Mailbox]])

Arguments


QueueStatus

Synopsis

Show queue status.

Description

Check the status of one or more queues.

Syntax

QueueStatus([Queue,[Member]])

Arguments


QueueSummary

Synopsis

Show queue summary.

Description

Request the manager to send a QueueSummary event.

Syntax

QueueSummary([Queue])

Arguments


QueueAdd

Synopsis

Add interface to queue.

Description

Syntax

QueueAdd(Queue,Interface,[Penalty,[Paused,[MemberName,[StateInterface]]]])

Arguments


QueueRemove

Synopsis

Remove interface from queue.

Description

Syntax

QueueRemove(Queue,Interface)

Arguments


QueuePause

Synopsis

Makes a queue member temporarily unavailable.

Description

Pause or unpause a member in a queue.

Syntax

QueuePause(Interface,Paused,[Queue,[Reason]])

Arguments


QueueLog

Synopsis

Adds custom entry in queue_log.

Description

Syntax

QueueLog(Queue,Event,[Uniqueid,[Interface,[Message]]])

Arguments


QueuePenalty

Synopsis

Set the penalty for a queue member.

Description

Change the penalty of a queue member

Syntax

QueuePenalty(Interface,Penalty,[Queue])

Arguments


QueueMemberRingInUse

Synopsis

Set the ringinuse value for a queue member.

Description

Syntax

QueueMemberRingInUse(Interface,RingInUse,[Queue])

Arguments


QueueRule

Synopsis

Queue Rules.

Description

List queue rules defined in queuerules.conf

Syntax

QueueRule([Rule])

Arguments


QueueReload

Synopsis

Reload a queue, queues, or any sub-section of a queue or queues.

Description

Syntax

QueueReload([Queue,[Members,[Rules,[Parameters]]]])

Arguments


QueueReset

Synopsis

Reset queue statistics.

Description

Reset the statistics for a queue.

Syntax

QueueReset([Queue])

Arguments


QueueChangePriorityCaller

Synopsis

Change priority of a caller on queue.

Description

Syntax

QueueChangePriorityCaller(Queue,Caller,Priority)

Arguments


PlayMF

Synopsis

Play MF signal on a specific channel.

Description

Plays an MF digit on the specified channel.

Syntax

PlayMF(Channel,Digit,[Duration])

Arguments


MeetmeMute

Synopsis

Mute a Meetme user.

Description

Syntax

MeetmeMute(Meetme,Usernum)

Arguments


MeetmeUnmute

Synopsis

Unmute a Meetme user.

Description

Syntax

MeetmeUnmute(Meetme,Usernum)

Arguments


MeetmeList

Synopsis

List participants in a conference.

Description

Lists all users in a particular MeetMe conference. MeetmeList will follow as separate events, followed by a final event called MeetmeListComplete.

Syntax

MeetmeList([Conference])

Arguments


MeetmeListRooms

Synopsis

List active conferences.

Description

Lists data about all active conferences. MeetmeListRooms will follow as separate events, followed by a final event called MeetmeListRoomsComplete.


MixMonitorMute

Synopsis

Mute / unMute a Mixmonitor recording.

Description

This action may be used to mute a MixMonitor recording.

Syntax

MixMonitorMute(Channel,[Direction,[State]])

Arguments


MixMonitor

Synopsis

Record a call and mix the audio during the recording. Use of StopMixMonitor is required to guarantee the audio file is available for processing during dialplan execution.

Description

This action records the audio on the current channel to the specified file.

Syntax

MixMonitor(Channel,[File,[options,[Command]]])

Arguments


StopMixMonitor

Synopsis

Stop recording a call through MixMonitor, and free the recording's file handle.

Description

This action stops the audio recording that was started with the MixMonitor action on the current channel.

Syntax

StopMixMonitor(Channel,[MixMonitorID])

Arguments


ConfbridgeList

Synopsis

List participants in a conference.

Description

Lists all users in a particular ConfBridge conference. ConfbridgeList will follow as separate events, followed by a final event called ConfbridgeListComplete.

Syntax

ConfbridgeList(Conference)

Arguments


ConfbridgeListRooms

Synopsis

List active conferences.

Description

Lists data about all active conferences. ConfbridgeListRooms will follow as separate events, followed by a final event called ConfbridgeListRoomsComplete.


ConfbridgeMute

Synopsis

Mute a Confbridge user.

Description

Syntax

ConfbridgeMute(Conference,Channel)

Arguments


ConfbridgeUnmute

Synopsis

Unmute a Confbridge user.

Description

Syntax

ConfbridgeUnmute(Conference,Channel)

Arguments


ConfbridgeKick

Synopsis

Kick a Confbridge user.

Description

Syntax

ConfbridgeKick(Conference,Channel)

Arguments


ConfbridgeLock

Synopsis

Lock a Confbridge conference.

Description

Syntax

ConfbridgeLock(Conference)

Arguments


ConfbridgeUnlock

Synopsis

Unlock a Confbridge conference.

Description

Syntax

ConfbridgeUnlock(Conference)

Arguments


ConfbridgeStartRecord

Synopsis

Start recording a Confbridge conference.

Description

Start recording a conference. If recording is already present an error will be returned. If RecordFile is not provided, the default record file specified in the conference's bridge profile will be used, if that is not present either a file will automatically be generated in the monitor directory.

Syntax

ConfbridgeStartRecord(Conference,[RecordFile])

Arguments


ConfbridgeStopRecord

Synopsis

Stop recording a Confbridge conference.

Description

Syntax

ConfbridgeStopRecord(Conference)

Arguments


ConfbridgeSetSingleVideoSrc

Synopsis

Set a conference user as the single video source distributed to all other participants.

Description

Syntax

ConfbridgeSetSingleVideoSrc(Conference,Channel)

Arguments


ShowDialPlan

Synopsis

Show dialplan contexts and extensions

Description

Show dialplan contexts and extensions. Be aware that showing the full dialplan may take a lot of capacity.

Syntax

ShowDialPlan([Extension,[Context]])

Arguments


ExtensionStateList

Synopsis

List the current known extension states.

Description

This will list out all known extension states in a sequence of ExtensionStatus events. When finished, a ExtensionStateListComplete event will be emitted.

See Also


DBGet

Synopsis

Get DB Entry.

Description

Syntax

DBGet(Family,Key)

Arguments


DBPut

Synopsis

Put DB entry.

Description

Syntax

DBPut(Family,Key,[Val])

Arguments


DBDel

Synopsis

Delete DB entry.

Description

Syntax

DBDel(Family,Key)

Arguments


DBDelTree

Synopsis

Delete DB Tree.

Description

Syntax

DBDelTree(Family,[Key])

Arguments


BridgeList

Synopsis

Get a list of bridges in the system.

Description

Returns a list of bridges, optionally filtering on a bridge type.

Syntax

BridgeList([BridgeType])

Arguments

See Also


BridgeInfo

Synopsis

Get information about a bridge.

Description

Returns detailed information about a bridge and the channels in it.

Syntax

BridgeInfo(BridgeUniqueid)

Arguments

See Also


BridgeDestroy

Synopsis

Destroy a bridge.

Description

Deletes the bridge, causing channels to continue or hang up.

Syntax

BridgeDestroy(BridgeUniqueid)

Arguments

See Also


BridgeKick

Synopsis

Kick a channel from a bridge.

Description

The channel is removed from the bridge.

Syntax

BridgeKick([BridgeUniqueid,]Channel)

Arguments

See Also


Bridge

Synopsis

Bridge two channels already in the PBX.

Description

Bridge together two channels already in the PBX.

Syntax

Bridge(Channel1,Channel2,[Tone])

Arguments

See Also


BridgeTechnologyList

Synopsis

List available bridging technologies and their statuses.

Description

Returns detailed information about the available bridging technologies.

See Also


BridgeTechnologySuspend

Synopsis

Suspend a bridging technology.

Description

Marks a bridging technology as suspended, which prevents subsequently created bridges from using it.

Syntax

BridgeTechnologySuspend(BridgeTechnology)

Arguments

See Also


BridgeTechnologyUnsuspend

Synopsis

Unsuspend a bridging technology.

Description

Clears a previously suspended bridging technology, which allows subsequently created bridges to use it.

Syntax

BridgeTechnologyUnsuspend(BridgeTechnology)

Arguments

See Also


MessageSend

Synopsis

Send an out of call message to an endpoint.

Description

Syntax

MessageSend([Destination,[To,[From,[Body,[Base64Body,[Variable]]]]]])

Arguments


LocalOptimizeAway

Synopsis

Optimize away a local channel when possible.

Description

A local channel created with "/n" will not automatically optimize away. Calling this command on the local channel will clear that flag and allow it to optimize away if it's bridged or when it becomes bridged.

Syntax

LocalOptimizeAway(Channel)

Arguments


Ping

Synopsis

Keepalive command.

Description

A 'Ping' action will ellicit a 'Pong' response. Used to keep the manager connection open.


Events

Synopsis

Control Event Flow.

Description

Enable/Disable sending of events to this manager client.

Syntax

Events(EventMask)

Arguments


Logoff

Synopsis

Logoff Manager.

Description

Logoff the current manager session.

See Also


Login

Synopsis

Login Manager.

Description

Login Manager.

Syntax

Login([ActionID,]Username,[Secret])

Arguments

See Also


Challenge

Synopsis

Generate Challenge for MD5 Auth.

Description

Generate a challenge for MD5 authentication.

Syntax

Challenge(AuthType)

Arguments


Hangup

Synopsis

Hangup channel.

Description

Hangup a channel.

Syntax

Hangup(Channel,[Cause])

Arguments


Status

Synopsis

List channel status.

Description

Will return the status information of each channel along with the value for the specified channel variables.

Syntax

Status([Channel,[Variables,[AllVariables]]])

Arguments


Setvar

Synopsis

Sets a channel variable or function value.

Description

This command can be used to set the value of channel variables or dialplan functions.

If a channel name is not provided then the variable is considered global.

Syntax

Setvar([Channel,]Variable,Value)

Arguments

See Also


Getvar

Synopsis

Gets a channel variable or function value.

Description

Get the value of a channel variable or function return.

If a channel name is not provided then the variable is considered global.

Syntax

Getvar([Channel,]Variable)

Arguments

See Also


GetConfig

Synopsis

Retrieve configuration.

Description

This action will dump the contents of a configuration file by category and contents or optionally by specified category only. In the case where a category name is non-unique, a filter may be specified to match only categories with matching variable values.

Syntax

GetConfig(Filename,[Category,[Filter]])

Arguments

See Also


GetConfigJSON

Synopsis

Retrieve configuration (JSON format).

Description

This action will dump the contents of a configuration file by category and contents in JSON format or optionally by specified category only. This only makes sense to be used using rawman over the HTTP interface. In the case where a category name is non-unique, a filter may be specified to match only categories with matching variable values.

Syntax

GetConfigJSON(Filename,[Category,[Filter]])

Arguments

See Also


UpdateConfig

Synopsis

Update basic configuration.

Description

This action will modify, create, or delete configuration elements in Asterisk configuration files.

Syntax

UpdateConfig(SrcFilename,DstFilename,[Reload,[PreserveEffectiveContext,[Action-000000,[Cat-000000,[Var-000000,[Value-000000,[Match-000000,[Line-000000,[Options-000000]]]]]]]]])

Arguments

See Also


CreateConfig

Synopsis

Creates an empty file in the configuration directory.

Description

This action will create an empty file in the configuration directory. This action is intended to be used before an UpdateConfig action.

Syntax

CreateConfig(Filename)

Arguments

See Also


ListCategories

Synopsis

List categories in configuration file.

Description

This action will dump the categories in a given file.

Syntax

ListCategories(Filename)

Arguments

See Also


Redirect

Synopsis

Redirect (transfer) a call.

Description

Redirect (transfer) a call.

Syntax

Redirect(Channel,[ExtraChannel,]Exten,[ExtraExten,]Context,[ExtraContext,]Priority,[ExtraPriority])

Arguments

See Also


Atxfer

Synopsis

Attended transfer.

Description

Attended transfer.

Syntax

Atxfer(Channel,Exten,[Context])

Arguments

See Also


CancelAtxfer

Synopsis

Cancel an attended transfer.

Description

Cancel an attended transfer. Note, this uses the configured cancel attended transfer feature option (atxferabort) to cancel the transfer. If not available this action will fail.

Syntax

CancelAtxfer(Channel)

Arguments

See Also


Originate

Synopsis

Originate a call.

Description

Generates an outgoing call to a Extension/Context/Priority or Application/Data

Syntax

Originate(Channel,[Exten,[Context,[Priority,[Application,[Data,[Timeout,[CallerID,[Variable,[Account,[EarlyMedia,[Async,[Codecs,[ChannelId,[OtherChannelId]]]]]]]]]]]]]])

Arguments

See Also


Command

Synopsis

Execute Asterisk CLI Command.

Description

Run a CLI command.

Syntax

Command(Command)

Arguments


ExtensionState

Synopsis

Check Extension Status.

Description

Report the extension state for given extension. If the extension has a hint, will use devicestate to check the status of the device connected to the extension.

Will return an Extension Status message. The response will include the hint for the extension and the status.

Syntax

ExtensionState(Exten,Context)

Arguments

See Also


PresenceState

Synopsis

Check Presence State

Description

Report the presence state for the given presence provider.

Will return a Presence State message. The response will include the presence state and, if set, a presence subtype and custom message.

Syntax

PresenceState(Provider)

Arguments

See Also


AbsoluteTimeout

Synopsis

Set absolute timeout.

Description

Hangup a channel after a certain time. Acknowledges set time with Timeout Set message.

Syntax

AbsoluteTimeout(Channel,Timeout)

Arguments


MailboxStatus

Synopsis

Check mailbox.

Description

Checks a voicemail account for status.

Returns whether there are messages waiting.

Message: Mailbox Status.

Mailbox: mailboxid.

Waiting: 0 if messages waiting, 1 if no messages waiting.

Syntax

MailboxStatus(Mailbox)

Arguments

See Also


MailboxCount

Synopsis

Check Mailbox Message Count.

Description

Checks a voicemail account for new messages.

Returns number of urgent, new and old messages.

Message: Mailbox Message Count

Mailbox: mailboxid

UrgentMessages: count

NewMessages: count

OldMessages: count

Syntax

MailboxCount(Mailbox)

Arguments

See Also


ListCommands

Synopsis

List available manager commands.

Description

Returns the action name and synopsis for every action that is available to the user.


SendText

Synopsis

Sends a text message to channel. A content type can be optionally specified. If not set it is set to an empty string allowing a custom handler to default it as it sees fit.

Description

Sends A Text Message to a channel while in a call.

Syntax

SendText(Channel,Message,[Content-Type])

Arguments

See Also


UserEvent

Synopsis

Send an arbitrary event.

Description

Send an event to manager sessions.

Syntax

UserEvent(UserEvent,[Header1,[HeaderN]])

Arguments

See Also


WaitEvent

Synopsis

Wait for an event to occur.

Description

This action will ellicit a Success response. Whenever a manager event is queued. Once WaitEvent has been called on an HTTP manager session, events will be generated and queued.

Syntax

WaitEvent(Timeout)

Arguments


CoreSettings

Synopsis

Show PBX core settings (version etc).

Description

Query for Core PBX settings.


CoreStatus

Synopsis

Show PBX core status variables.

Description

Query for Core PBX status.


Reload

Synopsis

Send a reload event.

Description

Send a reload event.

Syntax

Reload([Module])

Arguments

See Also


CoreShowChannels

Synopsis

List currently active channels.

Description

List currently defined channels and some information about them.


LoggerRotate

Synopsis

Reload and rotate the Asterisk logger.

Description

Reload and rotate the logger. Analogous to the CLI command 'logger rotate'.


ModuleLoad

Synopsis

Module management.

Description

Loads, unloads or reloads an Asterisk module in a running system.

Syntax

ModuleLoad([Module,]LoadType)

Arguments

See Also


ModuleCheck

Synopsis

Check if module is loaded.

Description

Checks if Asterisk module is loaded. Will return Success/Failure. For success returns, the module revision number is included.

Syntax

ModuleCheck(Module)

Arguments

See Also


AOCMessage

Synopsis

Generate an Advice of Charge message on a channel.

Description

Generates an AOC-D or AOC-E message on a channel.

Syntax

AOCMessage(Channel,[ChannelPrefix,]MsgType,ChargeType,[UnitAmount(0),[UnitType(0),[CurrencyName,[CurrencyAmount,[CurrencyMultiplier,[TotalType,[AOCBillingId,[ChargingAssociationId,[ChargingAssociationNumber,[ChargingAssociationPlan]]]]]]]]]])

Arguments

See Also


Filter

Synopsis

Dynamically add filters for the current manager session.

Description

The filters added are only used for the current session. Once the connection is closed the filters are removed.

This comand requires the system permission because this command can be used to create filters that may bypass filters defined in manager.conf

Syntax

Filter([Operation,[Filter]])

Arguments

See Also


FilterList

Synopsis

Show current event filters for this session

Description

The filters displayed are for the current session. Only those filters defined in manager.conf will be present upon starting a new session.

See Also


BlindTransfer

Synopsis

Blind transfer channel(s) to the given destination

Description

Redirect all channels currently bridged to the specified channel to the specified destination.

Syntax

BlindTransfer(Channel,[Context,[Exten]])

Arguments

See Also


SorceryMemoryCacheExpireObject

Synopsis

Expire (remove) an object from a sorcery memory cache.

Description

Expires (removes) an object from a sorcery memory cache. If full backend caching is enabled this action is not available and will fail. In this case the SorceryMemoryCachePopulate or SorceryMemoryCacheExpire AMI actions must be used instead.

Syntax

SorceryMemoryCacheExpireObject(Cache,Object)

Arguments


SorceryMemoryCacheExpire

Synopsis

Expire (remove) ALL objects from a sorcery memory cache.

Description

Expires (removes) ALL objects from a sorcery memory cache.

Syntax

SorceryMemoryCacheExpire(Cache)

Arguments


SorceryMemoryCacheStaleObject

Synopsis

Mark an object in a sorcery memory cache as stale.

Description

Marks an object as stale within a sorcery memory cache.

Syntax

SorceryMemoryCacheStaleObject(Cache,Object,[Reload])

Arguments


SorceryMemoryCacheStale

Synopsis

Marks ALL objects in a sorcery memory cache as stale.

Description

Marks ALL objects in a sorcery memory cache as stale.

Syntax

SorceryMemoryCacheStale(Cache)

Arguments


SorceryMemoryCachePopulate

Synopsis

Expire all objects from a memory cache and populate it with all objects from the backend.

Description

Expires all objects from a memory cache and populate it with all objects from the backend.

Syntax

SorceryMemoryCachePopulate(Cache)

Arguments


PresenceStateList

Synopsis

List the current known presence states.

Description

This will list out all known presence states in a sequence of PresenceStateChange events. When finished, a PresenceStateListComplete event will be emitted.

See Also


MuteAudio

Synopsis

Mute an audio stream.

Description

Mute an incoming or outgoing audio stream on a channel.

Syntax

MuteAudio(Channel,Direction,State)

Arguments


PJSIPShowSubscriptionsInbound

Synopsis

Lists subscriptions.

Description

Provides a listing of all inbound subscriptions. An event InboundSubscriptionDetail is issued for each subscription object. Once all detail events are completed an InboundSubscriptionDetailComplete event is issued.


PJSIPShowSubscriptionsOutbound

Synopsis

Lists subscriptions.

Description

Provides a listing of all outbound subscriptions. An event OutboundSubscriptionDetail is issued for each subscription object. Once all detail events are completed an OutboundSubscriptionDetailComplete event is issued.


PJSIPShowResourceLists

Synopsis

Displays settings for configured resource lists.

Description

Provides a listing of all resource lists. An event ResourceListDetail is issued for each resource list object. Once all detail events are completed a ResourceListDetailComplete event is issued.


Parkinglots

Synopsis

Get a list of parking lots

Description

List all parking lots as a series of AMI events


ParkedCalls

Synopsis

List parked calls.

Description

List parked calls.

Syntax

ParkedCalls([ParkingLot])

Arguments


Park

Synopsis

Park a channel.

Description

Park an arbitrary channel with optional arguments for specifying the parking lot used, how long the channel should remain parked, and what dial string to use as the parker if the call times out.

Syntax

Park(Channel,[TimeoutChannel,[AnnounceChannel,[Timeout,[Parkinglot]]]])

Arguments


Monitor

Synopsis

Monitor a channel.

Description

This action may be used to record the audio on a specified channel.

Syntax

Monitor(Channel,[File,[Format,[Mix]]])

Arguments


StopMonitor

Synopsis

Stop monitoring a channel.

Description

This action may be used to end a previously started 'Monitor' action.

Syntax

StopMonitor(Channel)

Arguments


ChangeMonitor

Synopsis

Change monitoring filename of a channel.

Description

This action may be used to change the file started by a previous 'Monitor' action.

Syntax

ChangeMonitor(Channel,File)

Arguments


PauseMonitor

Synopsis

Pause monitoring of a channel.

Description

This action may be used to temporarily stop the recording of a channel.

Syntax

PauseMonitor(Channel)

Arguments


UnpauseMonitor

Synopsis

Unpause monitoring of a channel.

Description

This action may be used to re-enable recording of a channel after calling PauseMonitor.

Syntax

UnpauseMonitor(Channel)

Arguments


DeviceStateList

Synopsis

List the current known device states.

Description

This will list out all known device states in a sequence of DeviceStateChange events. When finished, a DeviceStateListComplete event will be emitted.

See Also


AGI

Synopsis

Add an AGI command to execute by Async AGI.

Description

Add an AGI command to the execute queue of the channel in Async AGI.

Syntax

AGI(Channel,Command,[CommandID])

Arguments

See Also


PJSIPNotify

Synopsis

Send a NOTIFY to either an endpoint, an arbitrary URI, or inside a SIP dialog.

Description

Sends a NOTIFY to an endpoint, an arbitrary URI, or inside a SIP dialog.

All parameters for this event must be specified in the body of this request via multiple Variable: name=value sequences.

One (and only one) of Endpoint, URI, or Channel must be specified. If URI is used, the default outbound endpoint will be used to send the message. If the default outbound endpoint isn't configured, this command can not send to an arbitrary URI.

Syntax

PJSIPNotify([Endpoint,[URI,[channel,]]]Variable)

Arguments


PJSIPShowRegistrationsInbound

Synopsis

Lists PJSIP inbound registrations.

Description

In response, InboundRegistrationDetail events showing configuration and status information are raised for all contacts, static or dynamic. Once all events are completed an InboundRegistrationDetailComplete is issued.

See Also


PJSIPShowRegistrationInboundContactStatuses

Synopsis

Lists ContactStatuses for PJSIP inbound registrations.

Description

In response, ContactStatusDetail events showing status information are raised for each inbound registration (dynamic contact) object. Once all events are completed a ContactStatusDetailComplete event is issued.


MWIGet

Synopsis

Get selected mailboxes with message counts.

Description

Get a list of mailboxes with their message counts.

Syntax

MWIGet(Mailbox)

Arguments


MWIDelete

Synopsis

Delete selected mailboxes.

Description

Delete the specified mailboxes.


MWIUpdate

Synopsis

Update the mailbox message counts.

Description

Update the mailbox message counts.

Syntax

MWIUpdate(Mailbox,[OldMessages,[NewMessages]])

Arguments


PJSIPQualify

Synopsis

Qualify a chan_pjsip endpoint.

Description

Qualify a chan_pjsip endpoint.

Syntax

PJSIPQualify(Endpoint)

Arguments


PJSIPShowEndpoints

Synopsis

Lists PJSIP endpoints.

Description

Provides a listing of all endpoints. For each endpoint an EndpointList event is raised that contains relevant attributes and status information. Once all endpoints have been listed an EndpointListComplete event is issued.


PJSIPShowEndpoint

Synopsis

Detail listing of an endpoint and its objects.

Description

Provides a detailed listing of options for a given endpoint. Events are issued showing the configuration and status of the endpoint and associated objects. These events include EndpointDetail, AorDetail, AuthDetail, TransportDetail, and IdentifyDetail. Some events may be listed multiple times if multiple objects are associated (for instance AoRs). Once all detail events have been raised a final EndpointDetailComplete event is issued.

Syntax

PJSIPShowEndpoint(Endpoint)

Arguments


PJSIPShowAors

Synopsis

Lists PJSIP AORs.

Description

Provides a listing of all AORs. For each AOR an AorList event is raised that contains relevant attributes and status information. Once all aors have been listed an AorListComplete event is issued.


PJSIPShowAuths

Synopsis

Lists PJSIP Auths.

Description

Provides a listing of all Auths. For each Auth an AuthList event is raised that contains relevant attributes and status information. Once all auths have been listed an AuthListComplete event is issued.


PJSIPShowContacts

Synopsis

Lists PJSIP Contacts.

Description

Provides a listing of all Contacts. For each Contact a ContactList event is raised that contains relevant attributes and status information. Once all contacts have been listed a ContactListComplete event is issued.


PJSIPUnregister

Synopsis

Unregister an outbound registration.

Description

Unregisters the specified (or all) outbound registration(s) and stops future registration attempts. Call PJSIPRegister to start registration and schedule re-registrations according to configuration.

Syntax

PJSIPUnregister(Registration)

Arguments


PJSIPRegister

Synopsis

Register an outbound registration.

Description

Unregisters the specified (or all) outbound registration(s) then starts registration and schedules re-registrations according to configuration.

Syntax

PJSIPRegister(Registration)

Arguments


PJSIPShowRegistrationsOutbound

Synopsis

Lists PJSIP outbound registrations.

Description

In response OutboundRegistrationDetail events showing configuration and status information are raised for each outbound registration object. AuthDetail events are raised for each associated auth object as well. Once all events are completed an OutboundRegistrationDetailComplete is issued.


FAXSessions

Synopsis

Lists active FAX sessions

Description

Will generate a series of FAXSession events with information about each FAXSession. Closes with a FAXSessionsComplete event which includes a count of the included FAX sessions. This action works in the same manner as the CLI command 'fax show sessions'


FAXSession

Synopsis

Responds with a detailed description of a single FAX session

Description

Provides details about a specific FAX session. The response will include a common subset of the output from the CLI command 'fax show session ' for each technology. If the FAX technolgy used by this session does not include a handler for FAXSession, then this action will fail.

Syntax

FAXSession(SessionNumber)

Arguments


FAXStats

Synopsis

Responds with fax statistics

Description

Provides FAX statistics including the number of active sessions, reserved sessions, completed sessions, failed sessions, and the number of receive/transmit attempts. This command provides all of the non-technology specific information provided by the CLI command 'fax show stats'


JabberSend

Synopsis

Sends a message to a Jabber Client.

Description

Sends a message to a Jabber Client.

Syntax

JabberSend(Jabber,JID,Message)

Arguments


AlarmClear

Synopsis

Description


SpanAlarmClear

Synopsis

Description


DNDState

Synopsis

Description


Alarm

Synopsis

Description


SpanAlarm

Synopsis

Description


DAHDIChannel

Synopsis

Description


SIPQualifyPeerDone

Synopsis

Description


SessionTimeout

Synopsis

Description


MCID

Synopsis

Description


MiniVoiceMail

Synopsis

Description


Agents

Synopsis

Description


AgentsComplete

Synopsis

Description


TddRxMsg

Synopsis

Description


TddStart

Synopsis

Description


TddStop

Synopsis

Description


QueueMemberStatus

Synopsis

Description


QueueMemberAdded

Synopsis

Description


QueueMemberRemoved

Synopsis

Description


QueueMemberPause

Synopsis

Description


QueueMemberPenalty

Synopsis

Description


QueueMemberRinginuse

Synopsis

Description


QueueCallerJoin

Synopsis

Description


QueueCallerLeave

Synopsis

Description


QueueCallerAbandon

Synopsis

Description


AgentCalled

Synopsis

Description


AgentRingNoAnswer

Synopsis

Description


AgentComplete

Synopsis

Description


AgentDump

Synopsis

Description


AgentConnect

Synopsis

Description


MeetmeJoin

Synopsis

Description


MeetmeLeave

Synopsis

Description


MeetmeEnd

Synopsis

Description


MeetmeTalkRequest

Synopsis

Description


MeetmeTalking

Synopsis

Description


MeetmeMute

Synopsis

Description


ConfbridgeStart

Synopsis

Description


ConfbridgeEnd

Synopsis

Description


ConfbridgeJoin

Synopsis

Description


ConfbridgeLeave

Synopsis

Description


ConfbridgeRecord

Synopsis

Description


ConfbridgeStopRecord

Synopsis

Description


ConfbridgeMute

Synopsis

Description


ConfbridgeUnmute

Synopsis

Description


ConfbridgeTalking

Synopsis

Description


VarSet

Synopsis

Description


MixMonitorStart

Synopsis

Description


MixMonitorStop

Synopsis

Description


MixMonitorMute

Synopsis

Description


ConfbridgeList

Synopsis

Description


Cdr

Synopsis

Description


CEL

Synopsis

Description


VarSet

Synopsis

Description


RTCPSent

Synopsis

Description


RTCPReceived

Synopsis

Description


DeviceStateChange

Synopsis

Description


PresenceStateChange

Synopsis

Description


FullyBooted

Synopsis

Description


Shutdown

Synopsis

Description


AOC-S

Synopsis

Description


AOC-D

Synopsis

Description


AOC-E

Synopsis

Description


UserEvent

Synopsis

Description


BridgeCreate

Synopsis

Description


BridgeDestroy

Synopsis

Description


BridgeEnter

Synopsis

Description


BridgeLeave

Synopsis

Description


BridgeVideoSourceUpdate

Synopsis

Description


FailedACL

Synopsis

Description


InvalidAccountID

Synopsis

Description


SessionLimit

Synopsis

Description


MemoryLimit

Synopsis

Description


LoadAverageLimit

Synopsis

Description


RequestNotSupported

Synopsis

Description


RequestNotAllowed

Synopsis

Description


AuthMethodNotAllowed

Synopsis

Description


RequestBadFormat

Synopsis

Description


SuccessfulAuth

Synopsis

Description


UnexpectedAddress

Synopsis

Description


ChallengeResponseFailed

Synopsis

Description


InvalidPassword

Synopsis

Description


ChallengeSent

Synopsis

Description


InvalidTransport

Synopsis

Description


Newchannel

Synopsis

Description


Newstate

Synopsis

Description


Hangup

Synopsis

Description


HangupRequest

Synopsis

Description


SoftHangupRequest

Synopsis

Description


NewExten

Synopsis

Description


NewCallerid

Synopsis

Description


NewConnectedLine

Synopsis

Description


NewAccountCode

Synopsis

Description


DialBegin

Synopsis

Description


DialState

Synopsis

Description


DialEnd

Synopsis

Description


Hold

Synopsis

Description


Unhold

Synopsis

Description


ChanSpyStart

Synopsis

Description


ChanSpyStop

Synopsis

Description


HangupHandlerRun

Synopsis

Description


HangupHandlerPop

Synopsis

Description


HangupHandlerPush

Synopsis

Description


FAXStatus

Synopsis

Description


ReceiveFAX

Synopsis

Description


SendFAX

Synopsis

Description


MusicOnHoldStart

Synopsis

Description


MusicOnHoldStop

Synopsis

Description


MonitorStart

Synopsis

Description


MonitorStop

Synopsis

Description


PeerStatus

Synopsis

Description


ContactStatus

Synopsis

Description


LocalBridge

Synopsis

Description


LocalOptimizationBegin

Synopsis

Description


LocalOptimizationEnd

Synopsis

Description


VarSet

Synopsis

Description


AgentLogin

Synopsis

Description


AgentLogoff

Synopsis

Description


ChannelTalkingStart

Synopsis

Description


ChannelTalkingStop

Synopsis

Description


Status

Synopsis

Description


StatusComplete

Synopsis

Description


OriginateResponse

Synopsis

Description


CoreShowChannel

Synopsis

Description


CoreShowChannelsComplete

Synopsis

Description


ExtensionStatus

Synopsis

Description


PresenceStatus

Synopsis

Description


Registry

Synopsis

Description


BlindTransfer

Synopsis

Description


AttendedTransfer

Synopsis

Description


Pickup

Synopsis

Description


Reload

Synopsis

Description


Load

Synopsis

Description


Unload

Synopsis

Description


ParkedCall

Synopsis

Description


ParkedCallTimeOut

Synopsis

Description


ParkedCallGiveUp

Synopsis

Description


UnParkedCall

Synopsis

Description


ParkedCallSwap

Synopsis

Description


AsyncAGIStart

Synopsis

Description


AsyncAGIEnd

Synopsis

Description


AsyncAGIExec

Synopsis

Description


AGIExecStart

Synopsis

Description


AGIExecEnd

Synopsis

Description


MWIGet

Synopsis

Description


MWIGetComplete

Synopsis

Description


IdentifyDetail

Synopsis

Description


AorDetail

Synopsis

Description


AuthDetail

Synopsis

Description


TransportDetail

Synopsis

Description


EndpointDetail

Synopsis

Description


AorList

Synopsis

Description


AuthList

Synopsis

Description


ContactList

Synopsis

Description


ContactStatusDetail

Synopsis

Description


EndpointList

Synopsis

Description


FAXSessionsEntry

Synopsis

Description


FAXSessionsComplete

Synopsis

Description


FAXSession

Synopsis

Description


FAXStats

Synopsis

Description