Asterisk 13. RealTime


#1

Hi,

I am using Asterisk Realtime to fetch config files from DB as it worked fine for SIP Registrations. But dosen’t seem to work for extensions. Can some one please help.

Here is the error.
[Nov 29 14:39:40] NOTICE[2250][C-00000001]: chan_sip.c:26459 handle_request_invite: Call from ‘2006’ (192.168.1.2:44670) to extension ‘2007’ rejected because extension not found in context ‘infeetel’.

Here is my ExtensionsConfig.config
[settings]
sippeers => mysql,general,sippeers
sipusers => mysql,general,sipusers
voicemail => mysql,general,voicemail
extensions => mysql,general,extensions_table

And this is Extensions.conf.
[infeetel]
switch => Realtime


#2

The error is related with dialplan, are you sure you have properly populate dialplan into your extensions_table ?

The error says that call cant be established because asterisk dont know how to server call to ‘2007’ extension. Are you provide exten => 2007 or exten => _XXXX to make work it ?

PS. are you used to ‘clear’ mysql connection or ODBC ?


#3

Sample Data in my table - extensions

id context exten priority app appdata
1 infeetel 2007 1 Dial SIP/2007
2 infeetel 2007 2 Hangup

I am using mysql connection…Please advice on how to fill data or any reference to learn


#4

Yours data looks good. Are you sure if you correctly configured mysql connector (res_mysql.conf) and also this module are loaded into Asterisk core ?


#5

i have the following configuration in - res_config_mysql.conf

[general]
dbhost = localhost
dbname = asterisk
dbuser = asterisk
dbpass = asteriskuser
dbport = 3306
dbsock = /var/lib/mysql/mysql.sock
dbcharset = latin1
requirements=warn

still not working…


#6

Modules.conf…

[modules]
autoload=yes
load => res_config_mysql.so
load => app_realtime.so
load => func_realtime.so
load => pbx_realtime.so
load => res_transaction_odbc.so


#7

and what your CLI says? CLI> module show


#8

It says the following…

Module Description Use Count Status Support Level
app_agent_pool.so Call center agent pool applications 0 Running core
app_authenticate.so Authentication Application 0 Running core
app_bridgewait.so Place the channel into a holding bridge 0 Running core
app_cdr.so Tell Asterisk to not maintain a CDR for 0 Running core
app_celgenuserevent.so Generate an User-Defined CEL event 0 Running core
app_channelredirect.so Redirects a given channel to a dialplan 0 Running core
app_chanspy.so Listen to the audio of an active channel 0 Running core
app_confbridge.so Conference Bridge Application 0 Running core
app_controlplayback.so Control Playback Application 0 Running core
app_db.so Database Access Functions 0 Running core
app_dial.so Dialing Application 0 Running core
app_directed_pickup.so Directed Call Pickup Application 0 Running core
app_directory.so Extension Directory 0 Running core
app_disa.so DISA (Direct Inward System Access) Appli 0 Running core
app_dumpchan.so Dump Info About The Calling Channel 0 Running core
app_echo.so Simple Echo Application 0 Running core
app_exec.so Executes dialplan applications 0 Running core
app_flash.so Flash channel application 0 Running core
app_followme.so Find-Me/Follow-Me Application 0 Running core
app_forkcdr.so Fork The CDR into 2 separate entities 0 Running core
app_macro.so Extension Macros 0 Running core
app_milliwatt.so Digital Milliwatt (mu-law) Test Applicat 0 Running core
app_mixmonitor.so Mixed Audio Monitoring Application 0 Running core
app_mysql.so Simple Mysql Interface 0 Running deprecated
app_originate.so Originate call 0 Running core
app_page.so Page Multiple Phones 0 Running core
app_playback.so Sound File Playback Application 0 Running core
app_playtones.so Playtones Application 0 Running core
app_privacy.so Require phone number to be entered, if n 0 Running core
app_queue.so True Call Queueing 0 Running core
app_read.so Read Variable Application 0 Running core
app_readexten.so Read and evaluate extension validity 0 Running core
app_record.so Trivial Record Application 0 Running core
app_sayunixtime.so Say time 0 Running core
app_senddtmf.so Send DTMF digits Application 0 Running core
app_sendtext.so Send Text Applications 0 Running core
app_softhangup.so Hangs up the requested channel 0 Running core
app_speech_utils.so Dialplan Speech Applications 0 Running core
app_stack.so Dialplan subroutines (Gosub, Return, etc 0 Running core
app_stasis.so Stasis dialplan application 0 Running core
app_system.so Generic System() application 0 Running core
app_talkdetect.so Playback with Talk Detection 0 Running extended
app_transfer.so Transfers a caller to another extension 0 Running core
app_userevent.so Custom User Event Application 0 Running core
app_verbose.so Send verbose output 0 Running core
app_voicemail.so Comedian Mail (Voicemail System) 0 Running core
app_waituntil.so Wait until specified time 0 Running core
app_while.so While Loops and Conditional Execution 0 Running core
bridge_builtin_features.so Built in bridging features 1 Running core
bridge_builtin_interval_features.so Built in bridging interval features 0 Running core
bridge_holding.so Holding bridge module 0 Running core
bridge_native_rtp.so Native RTP bridging module 0 Running core
bridge_simple.so Simple two channel bridging module 0 Running core
bridge_softmix.so Multi-party software based channel mixin 0 Running core
cdr_adaptive_odbc.so Adaptive ODBC CDR backend 0 Running core
cdr_csv.so Comma Separated Values CDR Backend 0 Running extended
cdr_custom.so Customizable Comma Separated Values CDR 0 Running core
cdr_manager.so Asterisk Manager Interface CDR Backend 0 Running core
cdr_mysql.so MySQL CDR Backend 0 Running deprecated
cdr_odbc.so ODBC CDR Backend 0 Running extended
cdr_syslog.so Customizable syslog CDR Backend 0 Not Running core
cel_custom.so Customizable Comma Separated Values CEL 0 Running core
cel_manager.so Asterisk Manager Interface CEL Backend 0 Running core
cel_odbc.so ODBC CEL backend 0 Running core
chan_bridge_media.so Bridge Media Channel Driver 0 Running core
chan_dahdi.so DAHDI Telephony w/PRI 0 Running core
chan_iax2.so Inter Asterisk eXchange (Ver 2) 0 Running core
chan_rtp.so RTP Media Channel 0 Running core
chan_sip.so Session Initiation Protocol (SIP) 0 Running core
codec_a_mu.so A-law and Mulaw direct Coder/Decoder 0 Running core
codec_adpcm.so Adaptive Differential PCM Coder/Decoder 0 Running core
codec_alaw.so A-law Coder/Decoder 0 Running core
codec_dahdi.so Generic DAHDI Transcoder Codec Translato 0 Running core
codec_g722.so ITU G.722-64kbps G722 Transcoder 0 Running core
codec_g726.so ITU G.726-32kbps G726 Transcoder 0 Running core
codec_gsm.so GSM Coder/Decoder 0 Running core
codec_ilbc.so iLBC Coder/Decoder 0 Running core
codec_lpc10.so LPC10 2.4kbps Coder/Decoder 0 Running core
codec_resample.so SLIN Resampling Codec 0 Running core
codec_ulaw.so mu-Law Coder/Decoder 0 Running core
format_g719.so ITU G.719 0 Running core
format_g723.so G.723.1 Simple Timestamp File Format 0 Running core
format_g726.so Raw G.726 (16/24/32/40kbps) data 0 Running core
format_g729.so Raw G.729 data 0 Running core
format_gsm.so Raw GSM data 0 Running core
format_h263.so Raw H.263 data 0 Running core
format_h264.so Raw H.264 data 0 Running core
format_ilbc.so Raw iLBC data 0 Running core
format_pcm.so Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G. 0 Running core
format_siren14.so ITU G.722.1 Annex C (Siren14, licensed f 0 Running core
format_siren7.so ITU G.722.1 (Siren7, licensed from Polyc 0 Running core
format_sln.so Raw Signed Linear Audio support (SLN) 8k 0 Running core
format_wav.so Microsoft WAV/WAV16 format (8kHz/16kHz S 0 Running core
format_wav_gsm.so Microsoft WAV format (Proprietary GSM) 0 Running core
func_aes.so AES dialplan functions 0 Running core
func_base64.so base64 encode/decode dialplan functions 0 Running core
func_blacklist.so Look up Caller*ID name/number from black 0 Running core
func_callcompletion.so Call Control Configuration Function 0 Running core
func_callerid.so Party ID related dialplan functions (Cal 0 Running core
func_cdr.so Call Detail Record (CDR) dialplan functi 0 Running core
func_channel.so Channel information dialplan functions 0 Running core
func_config.so Asterisk configuration file variable acc 0 Running core
func_cut.so Cut out information from a string 0 Running core
func_db.so Database (astdb) related dialplan functi 0 Running core
func_devstate.so Gets or sets a device state in the dialp 0 Running core
func_dialgroup.so Dialgroup dialplan function 0 Running core
func_dialplan.so Dialplan Context/Extension/Priority Chec 0 Running core
func_enum.so ENUM related dialplan functions 0 Running core
func_env.so Environment/filesystem dialplan function 0 Running core
func_extstate.so Gets an extension’s state in the dialpla 0 Running core
func_global.so Variable dialplan functions 0 Running core
func_groupcount.so Channel group dialplan functions 0 Running core
func_hangupcause.so HANGUPCAUSE related functions and applic 0 Running core
func_holdintercept.so Hold interception dialplan function 0 Running core
func_iconv.so Charset conversions 0 Running core
func_jitterbuffer.so Jitter buffer for read side of channel. 0 Running core
func_lock.so Dialplan mutexes 0 Running core
func_logic.so Logical dialplan functions 0 Running core
func_math.so Mathematical dialplan function 0 Running core
func_md5.so MD5 digest dialplan functions 0 Running core
func_module.so Checks if Asterisk module is loaded in m 0 Running core
func_odbc.so ODBC lookups 0 Running core
func_periodic_hook.so Periodic dialplan hooks. 1 Running core
func_presencestate.so Gets or sets a presence state in the dia 0 Running core
func_rand.so Random number dialplan function 0 Running core
func_realtime.so Read/Write/Store/Destroy values from a R 0 Running core
func_sha1.so SHA-1 computation dialplan function 0 Running core
func_shell.so Collects the output generated by a comma 0 Running core
func_sorcery.so Get a field from a sorcery object 0 Running core
func_sprintf.so SPRINTF dialplan function 0 Running core
func_srv.so SRV related dialplan functions 0 Running core
func_strings.so String handling dialplan functions 0 Running core
func_sysinfo.so System information related functions 0 Running core
func_talkdetect.so Talk detection dialplan function 0 Running core
func_timeout.so Channel timeout dialplan functions 0 Running core
func_uri.so URI encode/decode dialplan functions 0 Running core
func_version.so Get Asterisk Version/Build Info 0 Running core
func_vmcount.so Indicator for whether a voice mailbox ha 0 Running core
func_volume.so Technology independent volume control 0 Running core
pbx_config.so Text Extension Configuration 0 Running core
pbx_loopback.so Loopback Switch 0 Running core
pbx_spool.so Outgoing Spool Support 0 Running core
res_adsi.so ADSI Resource 0 Running core
res_agi.so Asterisk Gateway Interface (AGI) 2 Running core
res_ari.so Asterisk RESTful Interface 10 Running core
res_ari_applications.so RESTful API module - Stasis application 0 Running core
res_ari_asterisk.so RESTful API module - Asterisk resources 0 Running core
res_ari_bridges.so RESTful API module - Bridge resources 0 Running core
res_ari_channels.so RESTful API module - Channel resources 0 Running core
res_ari_device_states.so RESTful API module - Device state resour 0 Running core
res_ari_endpoints.so RESTful API module - Endpoint resources 0 Running core
res_ari_events.so RESTful API module - WebSocket resource 0 Running core
res_ari_model.so ARI Model validators 0 Running core
res_ari_playbacks.so RESTful API module - Playback control re 0 Running core
res_ari_recordings.so RESTful API module - Recording resources 0 Running core
res_ari_sounds.so RESTful API module - Sound resources 0 Running core
res_calendar.so Asterisk Calendar integration 0 Running core
res_clialiases.so CLI Aliases 0 Running core
res_clioriginate.so Call origination and redirection from th 0 Running core
res_config_mysql.so MySQL RealTime Configuration Driver 0 Running extended
res_config_odbc.so Realtime ODBC configuration 0 Running core
res_config_sqlite3.so SQLite 3 realtime config engine 0 Running core
res_convert.so File format conversion CLI command 0 Running core
res_crypto.so Cryptographic Digital Signatures 1 Running core
res_fax.so Generic FAX Applications 0 Running core
res_format_attr_celt.so CELT Format Attribute Module 1 Running core
res_format_attr_g729.so G.729 Format Attribute Module 1 Running core
res_format_attr_h263.so H.263 Format Attribute Module 1 Running core
res_format_attr_h264.so H.264 Format Attribute Module 1 Running core
res_format_attr_opus.so Opus Format Attribute Module 1 Running core
res_format_attr_silk.so SILK Format Attribute Module 1 Running core
res_format_attr_siren14.so Siren14 Format Attribute Module 1 Running core
res_format_attr_siren7.so Siren7 Format Attribute Module 1 Running core
res_format_attr_vp8.so VP8 Format Attribute Module 1 Running core
res_http_websocket.so HTTP WebSocket Support 3 Running extended
res_limit.so Resource limits 0 Running core
res_manager_devicestate.so Manager Device State Topic Forwarder 0 Running core
res_manager_presencestate.so Manager Presence State Topic Forwarder 0 Running core
res_monitor.so Call Monitoring Resource 1 Running core
res_musiconhold.so Music On Hold Resource 0 Running core
res_mutestream.so Mute audio stream resources 0 Running core
res_odbc.so ODBC resource 0 Running core
res_odbc_transaction.so ODBC transaction resource 0 Running core
res_parking.so Call Parking Resource 0 Running core
res_realtime.so Realtime Data Lookup/Rewrite 0 Running core
res_rtp_asterisk.so Asterisk RTP Stack 0 Running core
res_rtp_multicast.so Multicast RTP Engine 0 Running core
res_security_log.so Security Event Logging 0 Running core
res_smdi.so Simplified Message Desk Interface (SMDI) 1 Running core
res_sorcery_astdb.so Sorcery Astdb Object Wizard 0 Running core
res_sorcery_config.so Sorcery Configuration File Object Wizard 0 Running core
res_sorcery_memory.so Sorcery In-Memory Object Wizard 0 Running core
res_sorcery_memory_cache.so Sorcery Memory Cache Object Wizard 0 Running core
res_sorcery_realtime.so Sorcery Realtime Object Wizard 0 Running core
res_speech.so Generic Speech Recognition API 0 Running core
res_stasis.so Stasis application support 12 Running core
res_stasis_answer.so Stasis application answer support 0 Running core
res_stasis_device_state.so Stasis application device state support 0 Running core
res_stasis_playback.so Stasis application playback support 0 Running core
res_stasis_recording.so Stasis application recording support 0 Running core
res_stasis_snoop.so Stasis application snoop support 0 Running core
res_stun_monitor.so STUN Network Monitor 0 Running core
res_timing_dahdi.so DAHDI Timing Interface 0 Running core
res_timing_timerfd.so Timerfd Timing Interface 1 Running core
204 modules loaded


#9

Please provide me a proper reference guide which helps setup in step by step process…as i see there are very few sites offer info but not in detail…

Also am using: Centos 6.10 with asterisk 13 cert version…i believe the dialplan configurations or the table structures or the sip.conf happens to be the prob…not sure…


#10

There is probably no such document, and contributors to a peer support forum are under no obligation to create one.


#11

Can u help me with the sample data to insert into sip and extensions table so that i get an idea,