Unable to bind contact to AOR

I am facing issues with some extensions like 161 and 151 below. 105 and other extensions are fine.

[Jun  2 10:33:30] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:33:30] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
[Jun  2 10:33:30] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:33:30] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
[Jun  2 10:34:00] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:34:00] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
[Jun  2 10:34:00] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:34:00] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
    -- Contact 151/sip:151@192.168.1.239:5060;line=1d7972cfd23669f is now Reachable.  RTT: 7.054 msec
    -- Contact 101/sip:101@192.168.1.101:5060 is now Reachable.  RTT: 3.949 msec
[Jun  2 10:34:30] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:34:30] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
[Jun  2 10:34:30] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:34:30] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
SHAULA-720*CLI> 
SHAULA-720*CLI> 
[Jun  2 10:35:00] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:35:00] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
[Jun  2 10:35:00] WARNING[23238]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:35:00] ERROR[23238]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
[Jun  2 10:35:06] WARNING[23208]: asterisk.c:3830 canary_thread: The canary is no more.  He has ceased to be!  He's expired and gone to meet his maker!  He's a stiff!  Bereft of life, he rests in peace.  His metabolic processes are now history!  He's off the twig!  He's kicked the bucket.  He's shuffled off his mortal coil, run down the curtain, and joined the bleeding choir invisible!!  THIS is an EX-CANARY.  (Reducing priority)

This is what I get on the CLI

<--- Received SIP request (703 bytes) from UDP:192.168.1.239:5060 --->
REGISTER sip:192.168.1.18 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.239:5060;rport;branch=z9hG4bK968902573
From: <sip:151@192.168.1.18>;tag=912867723
To: <sip:151@192.168.1.18>
Call-ID: 1495462174
CSeq: 8879 REGISTER
Contact: <sip:151@192.168.1.239:5060;line=1d7972cfd23669f>
Authorization: Digest username="151", realm="asterisk", nonce="1559471430/b35bb8cbcd1116f141ed7a8b381f2278", uri="sip:192.168.1.18", response="97337ce1593f2ba4333607cc51bc5380", algorithm=MD5, cnonce="0a4f113b", opaque="3680d38732773352", qop=auth, nc=00000005
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO
Max-Forwards: 70
User-Agent: DnakeVoip v1.0
Expires: 3600
Content-Length: 0


[Jun  2 10:32:30] WARNING[4625]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:32:30] ERROR[4625]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
<--- Transmitting SIP response (349 bytes) to UDP:192.168.1.239:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.239:5060;rport=5060;received=192.168.1.239;branch=z9hG4bK968902573
Call-ID: 1495462174
From: <sip:151@192.168.1.18>;tag=912867723
To: <sip:151@192.168.1.18>;tag=z9hG4bK968902573
CSeq: 8879 REGISTER
Date: Sun, 02 Jun 2019 10:32:30 GMT
Expires: 3600
Server: Asterisk PBX 15.2.2
Content-Length:  0
Asterisk 15.2.2, Copyright (C) 1999 - 2016, Digium, Inc. and others.
Created by Mark Spencer <markster@digium.com>
Asterisk comes with ABSOLUTELY NO WARRANTY; type 'core show warranty' for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type 'core show license' for details.
=========================================================================
Connected to Asterisk 15.2.2 currently running on S8572 (pid = 28099)
Core debug is still 3.
  == Parsing '/etc/asterisk/pjsip_wizard.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
[Jun  2 10:40:40] ERROR[28099]: config_options.c:775 aco_process_var: Could not find option suitable for category 'global' named 'videosupport' at line 311 of 
[Jun  2 10:40:40] ERROR[28099]: res_sorcery_config.c:336 sorcery_config_internal_load: Could not create an object of type 'global' with id 'global' from configuration file 'pjsip.conf'
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == 'UDP+IPv4' is an available SIP transport
  == 'TCP+IPv4' is not an available SIP transport, disabling resolver support for it
  == 'TLS+IPv4' is an available SIP transport
  == 'UDP+IPv6' is not an available SIP transport, disabling resolver support for it
  == 'TCP+IPv6' is not an available SIP transport, disabling resolver support for it
  == 'TLS+IPv6' is not an available SIP transport, disabling resolver support for it
[Jun  2 10:40:40] ERROR[28132]: res_pjsip/config_system.c:236 system_create_resolver_and_set_nameservers: There are no local system nameservers configured, resorting to system resolution
  == Manager registered action PJSIPQualify
  == res_pjsip.so => (Basic SIP resource)
 Loading res_crypto.so.
[Jun  2 10:40:40] WARNING[28099]: res_crypto.c:506 crypto_load: Unable to open key directory '/usr/share/asterisk/keys'
  == res_crypto.so => (Cryptographic Digital Signatures)
 Loading res_pjsip_outbound_publish.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == res_pjsip_outbound_publish.so => (PJSIP Outbound Publish Support)
 Loading res_pjsip_pubsub.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == Manager registered action PJSIPShowSubscriptionsInbound
  == Manager registered action PJSIPShowSubscriptionsOutbound
  == Manager registered action PJSIPShowResourceLists
  == res_pjsip_pubsub.so => (PJSIP event resource)
 Loading res_rtp_multicast.so.
  == Registered RTP engine 'multicast'
  == res_rtp_multicast.so => (Multicast RTP Engine)
 Loading res_srtp.so.
  == res_srtp.so => (Secure RTP (SRTP))
 Loading res_speech.so.
  == res_speech.so => (Generic Speech Recognition API)
 Loading res_pjsip_session.so.
  == res_pjsip_session.so => (PJSIP Session resource)
 Loading res_agi.so.
  == AGI Command 'answer' registered
  == AGI Command 'asyncagi break' registered
  == AGI Command 'channel status' registered
  == AGI Command 'database del' registered
  == AGI Command 'database deltree' registered
  == AGI Command 'database get' registered
  == AGI Command 'database put' registered
  == AGI Command 'exec' registered
  == AGI Command 'get data' registered
  == AGI Command 'get full variable' registered
  == AGI Command 'get option' registered
  == AGI Command 'get variable' registered
  == AGI Command 'hangup' registered
  == AGI Command 'noop' registered
  == AGI Command 'receive char' registered
  == AGI Command 'receive text' registered
  == AGI Command 'record file' registered
  == AGI Command 'say alpha' registered
  == AGI Command 'say digits' registered
  == AGI Command 'say number' registered
  == AGI Command 'say phonetic' registered
  == AGI Command 'say date' registered
  == AGI Command 'say time' registered
  == AGI Command 'say datetime' registered
  == AGI Command 'send image' registered
  == AGI Command 'send text' registered
  == AGI Command 'set autohangup' registered
  == AGI Command 'set callerid' registered
  == AGI Command 'set context' registered
  == AGI Command 'set extension' registered
  == AGI Command 'set music' registered
  == AGI Command 'set priority' registered
  == AGI Command 'set variable' registered
  == AGI Command 'stream file' registered
  == AGI Command 'control stream file' registered
  == AGI Command 'tdd mode' registered
  == AGI Command 'verbose' registered
  == AGI Command 'wait for digit' registered
  == AGI Command 'speech create' registered
  == AGI Command 'speech set' registered
  == AGI Command 'speech destroy' registered
  == AGI Command 'speech load grammar' registered
  == AGI Command 'speech unload grammar' registered
  == AGI Command 'speech activate grammar' registered
  == AGI Command 'speech deactivate grammar' registered
  == AGI Command 'speech recognize' registered
  == Registered application 'DeadAGI'
  == Registered application 'EAGI'
  == Manager registered action AGI
  == Registered application 'AGI'
  == res_agi.so => (Asterisk Gateway Interface (AGI))
 Loading res_config_mysql.so.
  == MySQL RealTime driver loaded.
  == res_config_mysql.so => (MySQL RealTime Configuration Driver)
 Loading res_timing_dahdi.so.
  == res_timing_dahdi.so => (DAHDI Timing Interface)
 Loading res_pjsip_authenticator_digest.so.
  == res_pjsip_authenticator_digest.so => (PJSIP authentication resource)
 Loading res_pjsip_endpoint_identifier_ip.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == Parsing '/etc/asterisk/pjsip_wizard.conf': Found
  == res_pjsip_endpoint_identifier_ip.so => (PJSIP IP endpoint identifier)
 Loading res_pjsip_endpoint_identifier_user.so.
  == res_pjsip_endpoint_identifier_user.so => (PJSIP username endpoint identifier)
 Loading res_pjsip_registrar.so.
  == Manager registered action PJSIPShowRegistrationsInbound
  == Manager registered action PJSIPShowRegistrationInboundContactStatuses
  == res_pjsip_registrar.so => (PJSIP Registrar Support)
 Loading res_musiconhold.so.
  == Parsing '/etc/asterisk/musiconhold.conf': Found
[Jun  2 10:40:40] WARNING[28099]: res_musiconhold.c:1160 moh_scan_files: Cannot open dir /usr/share/asterisk/moh or dir does not exist
[Jun  2 10:40:40] WARNING[28099]: res_musiconhold.c:1997 load_module: No music on hold classes configured, disabling music on hold.
  == Registered application 'MusicOnHold'
  == Registered application 'StartMusicOnHold'
  == Registered application 'StopMusicOnHold'
  == res_musiconhold.so => (Music On Hold Resource)
 Loading res_pjsip_outbound_authenticator_digest.so.
  == res_pjsip_outbound_authenticator_digest.so => (PJSIP authentication resource)
 Loading res_pjsip_xpidf_body_generator.so.
  == res_pjsip_xpidf_body_generator.so => (PJSIP Extension State PIDF Provider)
 Loading res_rtp_asterisk.so.
  == Registered RTP engine 'asterisk'
  == Parsing '/etc/asterisk/rtp.conf': Found
  == RTP Allocating from port range 30000 -> 40000
  == res_rtp_asterisk.so => (Asterisk RTP Stack)
 Loading res_sdp_translator_pjmedia.so.
[Jun  2 10:40:40] NOTICE[28099]: sdp_translator.c:44 ast_sdp_register_translator: Placed ops 0xb55fc004 at slot 1
  == res_sdp_translator_pjmedia.so => (PJMEDIA SDP Translator)
 Loading res_pjsip_dialog_info_body_generator.so.
  == res_pjsip_dialog_info_body_generator.so => (PJSIP Extension State Dialog Info+XML Provider)
 Loading res_pjsip_mwi_body_generator.so.
  == res_pjsip_mwi_body_generator.so => (PJSIP MWI resource)
 Loading res_pjsip_pidf_body_generator.so.
  == res_pjsip_pidf_body_generator.so => (PJSIP Extension State PIDF Provider)
 Loading res_pjsip_pidf_digium_body_supplement.so.
  == res_pjsip_pidf_digium_body_supplement.so => (PJSIP PIDF Digium presence supplement)
 Loading res_pjsip_pidf_eyebeam_body_supplement.so.
  == res_pjsip_pidf_eyebeam_body_supplement.so => (PJSIP PIDF Eyebeam supplement)
 Loading res_pjsip_exten_state.so.
  == res_pjsip_exten_state.so => (PJSIP Extension State Notifications)
 Loading res_pjsip_mwi.so.
  == res_pjsip_mwi.so => (PJSIP MWI resource)
 Loading res_pjsip_publish_asterisk.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == res_pjsip_publish_asterisk.so => (PJSIP Asterisk Event PUBLISH Support)
 Loading chan_alsa.so.
  == Parsing '/etc/asterisk/alsa.conf': Found
  == Registered channel type 'Console' (ALSA Console Channel Driver)
  == chan_alsa.so => (ALSA Console Channel Driver)
 Loading chan_console.so.
  == Parsing '/etc/asterisk/console.conf': Found
[Jun  2 10:40:40] WARNING[28099]: channel.c:562 ast_channel_register: Already have a handler for type 'Console'
[Jun  2 10:40:40] ERROR[28099]: chan_console.c:1547 load_module: Unable to register channel type 'Console'
 Loading chan_dahdi.so.
  == Registered bridge technology native_dahdi
  == Registered application 'DAHDISendKeypadFacility'
  == Registered application 'DAHDISendCallreroutingFacility'
  == Parsing '/etc/asterisk/chan_dahdi.conf': Found
  == Parsing '/etc/asterisk/users.conf': Found
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:4058 dahdi_open: Unable to specify channel 1: Invalid argument
[Jun  2 10:40:40] ERROR[28099]: chan_dahdi.c:12002 mkintf: Unable to open channel 1: Invalid argument
here = 0, tmp->channel = 1, channel = 1
[Jun  2 10:40:40] ERROR[28099]: chan_dahdi.c:17367 build_channels: Unable to register channel '1'
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:17574 process_dahdi: Channel '1' failure ignored: ignore_failed_channels.
    -- Automatically generated pseudo channel
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to 'userbase' (on reload) at line 23.
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to 'vmsecret' (on reload) at line 31.
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to 'hassip' (on reload) at line 35.
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to 'hasiax' (on reload) at line 39.
[Jun  2 10:40:40] WARNING[28099]: chan_dahdi.c:18883 process_dahdi: Ignoring any changes to 'hasmanager' (on reload) at line 47.
  == Registered channel type 'DAHDI' (DAHDI Telephony w/PRI)
  == Manager registered action DAHDITransfer
  == Manager registered action DAHDIHangup
  == Manager registered action DAHDIDialOffhook
  == Manager registered action DAHDIDNDon
  == Manager registered action DAHDIDNDoff
  == Manager registered action DAHDIShowChannels
  == Manager registered action DAHDIRestart
  == Manager registered action PRIShowSpans
  == Manager registered action PRIDebugSet
  == Manager registered action PRIDebugFileSet
  == Manager registered action PRIDebugFileUnset
  == chan_dahdi.so => (DAHDI Telephony w/PRI)
 Loading res_pjsip_t38.so.
  == res_pjsip_t38.so => (PJSIP T.38 UDPTL Support)
 Loading chan_pjsip.so.
  == Registered RTP glue 'PJSIP'
  == Registered channel type 'PJSIP' (PJSIP Channel Driver)
  == Registered custom function 'PJSIP_DIAL_CONTACTS'
  == Registered custom function 'PJSIP_MEDIA_OFFER'
  == Registered custom function 'PJSIP_DTMF_MODE'
  == Registered custom function 'PJSIP_SEND_SESSION_REFRESH'
  == chan_pjsip.so => (PJSIP Channel Driver)
 Loading chan_rtp.so.
  == Registered channel type 'MulticastRTP' (Multicast RTP Paging Channel Driver)
  == Registered channel type 'UnicastRTP' (Unicast RTP Media Channel Driver)
  == chan_rtp.so => (RTP Media Channel)
 Loading res_pjsip_sdp_rtp.so.
  == res_pjsip_sdp_rtp.so => (PJSIP SDP RTP/AVP stream handler)
 Loading app_stack.so.
  == AGI Command 'gosub' registered
  == Registered application 'StackPop'
  == Registered application 'Return'
  == Registered application 'GosubIf'
  == Registered application 'Gosub'
  == Registered custom function 'LOCAL'
  == Registered custom function 'LOCAL_PEEK'
  == Registered custom function 'STACK_PEEK'
  == app_stack.so => (Dialplan subroutines (Gosub, Return, etc))
 Loading format_g719.so.
  == Registered file format g719, extension(s) g719
  == format_g719.so => (ITU G.719)
 Loading format_g723.so.
  == Registered file format g723sf, extension(s) g723|g723sf
  == format_g723.so => (G.723.1 Simple Timestamp File Format)
 Loading format_g729.so.
  == Registered file format g729, extension(s) g729
  == format_g729.so => (Raw G.729 data)
 Loading format_gsm.so.
  == Registered file format gsm, extension(s) gsm
  == format_gsm.so => (Raw GSM data)
 Loading format_h264.so.
  == Registered file format h264, extension(s) h264
  == format_h264.so => (Raw H.264 data)
 Loading format_ogg_vorbis.so.
  == Registered file format ogg_vorbis, extension(s) ogg
  == format_ogg_vorbis.so => (OGG/Vorbis audio)
 Loading format_pcm.so.
  == Registered file format pcm, extension(s) pcm|ulaw|ul|mu|ulw
  == Registered file format alaw, extension(s) alaw|al|alw
  == Registered file format au, extension(s) au
  == Registered file format g722, extension(s) g722
  == format_pcm.so => (Raw/Sun uLaw/ALaw 8KHz (PCM,PCMA,AU), G.722 16Khz)
 Loading format_wav.so.
  == Registered file format wav, extension(s) wav
  == Registered file format wav16, extension(s) wav16
  == format_wav.so => (Microsoft WAV/WAV16 format (8kHz/16kHz Signed Linear))
 Loading format_wav_gsm.so.
  == Registered file format wav49, extension(s) WAV|wav49
  == format_wav_gsm.so => (Microsoft WAV format (Proprietary GSM))
 Loading res_pjsip_acl.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == res_pjsip_acl.so => (PJSIP ACL Resource)
 Loading res_pjsip_caller_id.so.
  == res_pjsip_caller_id.so => (PJSIP Caller ID Support)
 Loading res_pjsip_diversion.so.
  == res_pjsip_diversion.so => (PJSIP Add Diversion Header Support)
 Loading res_pjsip_dlg_options.so.
  == res_pjsip_dlg_options.so => (SIP OPTIONS in dialog handler)
 Loading res_pjsip_dtmf_info.so.
  == res_pjsip_dtmf_info.so => (PJSIP DTMF INFO Support)
 Loading res_pjsip_empty_info.so.
  == res_pjsip_empty_info.so => (PJSIP Empty INFO Support)
 Loading res_pjsip_history.so.
  == res_pjsip_history.so => (PJSIP History)
 Loading res_pjsip_logger.so.
  == res_pjsip_logger.so => (PJSIP Packet Logger)
 Loading res_pjsip_messaging.so.
    -- Message technology 'pjsip' registered.
  == res_pjsip_messaging.so => (PJSIP Messaging Support)
 Loading res_pjsip_nat.so.
  == res_pjsip_nat.so => (PJSIP NAT Support)
 Loading res_pjsip_notify.so.
  == Parsing '/etc/asterisk/pjsip_notify.conf': Found
  == Manager registered action PJSIPNotify
  == res_pjsip_notify.so => (CLI/AMI PJSIP NOTIFY Support)
 Loading res_pjsip_one_touch_record_info.so.
  == res_pjsip_one_touch_record_info.so => (PJSIP INFO One Touch Recording Support)
 Loading res_pjsip_outbound_registration.so.
  == Parsing '/etc/asterisk/sorcery.conf': Found
  == Manager registered action PJSIPUnregister
  == Manager registered action PJSIPRegister
  == Manager registered action PJSIPShowRegistrationsOutbound
  == Parsing '/etc/asterisk/pjsip.conf': Found
  == Parsing '/etc/asterisk/pjsip_wizard.conf': Found
  == res_pjsip_outbound_registration.so => (PJSIP Outbound Registration Support)
 Loading res_pjsip_path.so.
  == res_pjsip_path.so => (PJSIP Path Header Support)
 Loading res_pjsip_registrar_expire.so.
  == res_pjsip_registrar_expire.so => (PJSIP Contact Auto-Expiration)
 Loading res_pjsip_rfc3326.so.
  == res_pjsip_rfc3326.so => (PJSIP RFC3326 Support)
 Loading res_pjsip_sips_contact.so.
  == res_pjsip_sips_contact.so => (UAC SIPS Contact support)
 Loading res_pjsip_transport_websocket.so.
 Loading res_pjsip_header_funcs.so.
  == Registered custom function 'PJSIP_HEADER'
  == res_pjsip_header_funcs.so => (PJSIP Header Functions)
 Loading res_pjsip_refer.so.
  == res_pjsip_refer.so => (PJSIP Blind and Attended Transfer Support)
 Loading res_pjsip_send_to_voicemail.so.
  == res_pjsip_send_to_voicemail.so => (PJSIP REFER Send to Voicemail Support)
 Loading app_confbridge.so.
  == Parsing '/etc/asterisk/confbridge.conf': Found
[Jun  2 10:40:40] NOTICE[28099]: confbridge/conf_config_parser.c:2177 verify_default_profiles: Adding default_menu menu to app_confbridge
  == Registered channel type 'CBRec' (Conference Bridge Recording Channel)
  == Registered channel type 'CBAnn' (Conference Bridge Announcing Channel)
  == Registered application 'ConfBridge'
  == Registered custom function 'CONFBRIDGE'
  == Registered custom function 'CONFBRIDGE_INFO'
  == Manager registered action ConfbridgeList
  == Manager registered action ConfbridgeListRooms
  == Manager registered action ConfbridgeMute
  == Manager registered action ConfbridgeUnmute
  == Manager registered action ConfbridgeKick
  == Manager registered action ConfbridgeUnlock
  == Manager registered action ConfbridgeLock
  == Manager registered action ConfbridgeStartRecord
  == Manager registered action ConfbridgeStopRecord
  == Manager registered action ConfbridgeSetSingleVideoSrc
  == app_confbridge.so => (Conference Bridge Application)
 Loading cdr_csv.so.
  == Parsing '/etc/asterisk/cdr.conf': Found
  == cdr_csv.so => (Comma Separated Values CDR Backend)
 Loading cdr_custom.so.
  == Parsing '/etc/asterisk/cdr_custom.conf': Found
  == cdr_custom.so => (Customizable Comma Separated Values CDR Backend)
 Loading cdr_manager.so.
  == Parsing '/etc/asterisk/cdr_manager.conf': Found
  == cdr_manager.so => (Asterisk Manager Interface CDR Backend)
 Loading cdr_sqlite3_custom.so.
[Jun  2 10:40:40] WARNING[28099]: cdr_sqlite3_custom.c:161 load_config: Failed to load configuration file. Module not activated.
 Loading cdr_syslog.so.
  == Parsing '/etc/asterisk/cdr_syslog.conf': Found
 Loading app_cdr.so.
  == Registered application 'NoCDR'
  == Registered application 'ResetCDR'
  == app_cdr.so => (Tell Asterisk to not maintain a CDR for the current call)
 Loading app_db.so.
  == Registered application 'DBdel'
  == Registered application 'DBdeltree'
  == app_db.so => (Database Access Functions)
 Loading app_dial.so.
  == Registered application 'Dial'
  == Registered application 'RetryDial'
  == app_dial.so => (Dialing Application)
 Loading app_echo.so.
  == Registered application 'Echo'
  == app_echo.so => (Simple Echo Application)
 Loading app_forkcdr.so.
  == Registered application 'ForkCDR'
  == app_forkcdr.so => (Fork The CDR into 2 separate entities)
 Loading app_macro.so.
  == Registered application 'MacroExit'
  == Registered application 'MacroIf'
  == Registered application 'MacroExclusive'
  == Registered application 'Macro'
  == app_macro.so => (Extension Macros)
 Loading app_originate.so.
  == Registered application 'Originate'
  == app_originate.so => (Originate call)
 Loading app_page.so.
  == Registered application 'Page'
  == app_page.so => (Page Multiple Phones)
 Loading app_playback.so.
  == Registered application 'Playback'
  == app_playback.so => (Sound File Playback Application)
 Loading app_playtones.so.
  == Registered application 'PlayTones'
  == Registered application 'StopPlayTones'
  == app_playtones.so => (Playtones Application)
 Loading app_record.so.
  == Registered application 'Record'
  == app_record.so => (Trivial Record Application)
 Loading app_softhangup.so.
  == Registered application 'SoftHangup'
  == app_softhangup.so => (Hangs up the requested channel)
 Loading app_stream_echo.so.
  == Registered application 'StreamEcho'
  == app_stream_echo.so => (Stream Echo Application)
 Loading app_system.so.
  == Registered application 'TrySystem'
  == Registered application 'System'
  == app_system.so => (Generic System() application)
 Loading app_userevent.so.
  == Registered application 'UserEvent'
  == app_userevent.so => (Custom User Event Application)
 Loading app_verbose.so.
  == Registered application 'Log'
  == Registered application 'Verbose'
  == app_verbose.so => (Send verbose output)
 Loading bridge_builtin_features.so.
  == bridge_builtin_features.so => (Built in bridging features)
 Loading bridge_native_rtp.so.
  == Registered bridge technology native_rtp
  == bridge_native_rtp.so => (Native RTP bridging module)
 Loading bridge_simple.so.
  == Registered bridge technology simple_bridge
  == bridge_simple.so => (Simple two channel bridging module)
 Loading bridge_softmix.so.
  == Registered bridge technology softmix
  == bridge_softmix.so => (Multi-party software based channel mixing)
 Loading chan_bridge_media.so.
  == Registered channel type 'Announcer' (Bridge Media Announcing Channel Driver)
  == Registered channel type 'Recorder' (Bridge Media Recording Channel Driver)
  == chan_bridge_media.so => (Bridge Media Channel Driver)
 Loading codec_a_mu.so.
  == Registered translator 'alawtoulaw' from codec alaw to ulaw, table cost, 915000, computational cost 314
  == Registered translator 'ulawtoalaw' from codec ulaw to alaw, table cost, 915000, computational cost 250
  == codec_a_mu.so => (A-law and Mulaw direct Coder/Decoder)
 Loading codec_adpcm.so.
  == Registered translator 'adpcmtolin' from codec adpcm to slin, table cost, 900000, computational cost 650
  == Registered translator 'lintoadpcm' from codec slin to adpcm, table cost, 600000, computational cost 967
  == codec_adpcm.so => (Adaptive Differential PCM Coder/Decoder)
 Loading codec_alaw.so.
  == Registered translator 'alawtolin' from codec alaw to slin, table cost, 900000, computational cost 410
  == Registered translator 'lintoalaw' from codec slin to alaw, table cost, 600000, computational cost 335
  == codec_alaw.so => (A-law Coder/Decoder)
 Loading codec_dahdi.so.
[Jun  2 10:40:40] ERROR[28099]: codec_dahdi.c:813 find_transcoders: Failed to open /dev/dahdi/transcode: No such file or directory
  == codec_dahdi.so => (Generic DAHDI Transcoder Codec Translator)
 Loading codec_g722.so.
  == Registered translator 'g722tolin' from codec g722 to slin, table cost, 960000, computational cost 7179
  == Registered translator 'lintog722' from codec slin to g722, table cost, 825000, computational cost 6472
  == Registered translator 'g722tolin16' from codec g722 to slin, table cost, 900000, computational cost 12969
  == Registered translator 'lin16tog722' from codec slin to g722, table cost, 600000, computational cost 13496
  == codec_g722.so => (ITU G.722-64kbps G722 Transcoder)
 Loading codec_g726.so.
  == Registered translator 'g726tolin' from codec g726 to slin, table cost, 900000, computational cost 4601
  == Registered translator 'lintog726' from codec slin to g726, table cost, 600000, computational cost 9983
  == Registered translator 'g726aal2tolin' from codec g726aal2 to slin, table cost, 900000, computational cost 4474
  == Registered translator 'lintog726aal2' from codec slin to g726aal2, table cost, 600000, computational cost 9870
  == codec_g726.so => (ITU G.726-32kbps G726 Transcoder)
 Loading codec_g729.so.
  == Registered translator 'g729tolin' from codec g729 to slin, table cost, 900000, computational cost 7130
  == Registered translator 'lintog729' from codec slin to g729, table cost, 600000, computational cost 34906
  == codec_g729.so => (g729 Coder/Decoder, based on Bcg729)
 Loading codec_gsm.so.
  == Registered translator 'gsmtolin' from codec gsm to slin, table cost, 900000, computational cost 2474
  == Registered translator 'lintogsm' from codec slin to gsm, table cost, 600000, computational cost 7509
  == codec_gsm.so => (GSM Coder/Decoder)
 Loading codec_ulaw.so.
  == Registered translator 'ulawtolin' from codec ulaw to slin, table cost, 900000, computational cost 512
  == Registered translator 'lintoulaw' from codec slin to ulaw, table cost, 600000, computational cost 262
  == Registered translator 'lintotestlaw' from codec slin to testlaw, table cost, 600000, computational cost 445
  == Registered translator 'testlawtolin' from codec testlaw to slin, table cost, 900000, computational cost 370
  == codec_ulaw.so => (mu-Law Coder/Decoder)
 Loading func_callerid.so.
  == Registered custom function 'CALLERPRES'
  == Registered custom function 'CALLERID'
  == Registered custom function 'CONNECTEDLINE'
  == Registered custom function 'REDIRECTING'
  == func_callerid.so => (Party ID related dialplan functions (Caller-ID, Connected-line, Redirecting))
 Loading func_cdr.so.
  == Registered custom function 'CDR'
  == Registered custom function 'CDR_PROP'
  == func_cdr.so => (Call Detail Record (CDR) dialplan functions)
 Loading func_db.so.
  == Registered custom function 'DB'
  == Registered custom function 'DB_EXISTS'
  == Registered custom function 'DB_DELETE'
  == Registered custom function 'DB_KEYS'
  == func_db.so => (Database (astdb) related dialplan functions)
 Loading func_hangupcause.so.
  == Registered custom function 'HANGUPCAUSE'
  == Registered custom function 'HANGUPCAUSE_KEYS'
  == Registered application 'HangupCauseClear'
  == func_hangupcause.so => (HANGUPCAUSE related functions and applications)
 Loading func_logic.so.
  == Registered custom function 'ISNULL'
  == Registered custom function 'SET'
  == Registered custom function 'EXISTS'
  == Registered custom function 'IF'
  == Registered custom function 'IFTIME'
  == Registered custom function 'IMPORT'
  == func_logic.so => (Logical dialplan functions)
 Loading func_module.so.
  == Registered custom function 'IFMODULE'
  == func_module.so => (Checks if Asterisk module is loaded in memory)
 Loading func_shell.so.
  == Registered custom function 'SHELL'
  == func_shell.so => (Collects the output generated by a command executed by the system shell)
 Loading func_strings.so.
  == Registered custom function 'FIELDQTY'
  == Registered custom function 'FIELDNUM'
  == Registered custom function 'FILTER'
  == Registered custom function 'REPLACE'
  == Registered custom function 'STRREPLACE'
  == Registered custom function 'LISTFILTER'
  == Registered custom function 'REGEX'
  == Registered custom function 'ARRAY'
  == Registered custom function 'QUOTE'
  == Registered custom function 'CSV_QUOTE'
  == Registered custom function 'LEN'
  == Registered custom function 'STRFTIME'
  == Registered custom function 'STRPTIME'
  == Registered custom function 'EVAL'
  == Registered custom function 'KEYPADHASH'
  == Registered custom function 'HASHKEYS'
  == Registered custom function 'HASH'
  == Registered application 'ClearHash'
  == Registered custom function 'TOUPPER'
  == Registered custom function 'TOLOWER'
  == Registered custom function 'SHIFT'
  == Registered custom function 'POP'
  == Registered custom function 'PUSH'
  == Registered custom function 'UNSHIFT'
  == Registered custom function 'PASSTHRU'
  == func_strings.so => (String handling dialplan functions)
 Loading func_timeout.so.
  == Registered custom function 'TIMEOUT'
  == func_timeout.so => (Channel timeout dialplan functions)
 Loading func_volume.so.
  == Registered custom function 'VOLUME'
  == func_volume.so => (Technology independent volume control)
 Loading pbx_config.so.
  == Manager registered action DialplanExtensionAdd
  == Manager registered action DialplanExtensionRemove
  == Parsing '/etc/asterisk/extensions.conf': Found
    -- Registered extension context 'default'; registrar: pbx_config
---
    -- Registered extension context 'mobile'; registrar: pbx_config
    -- Including context 'default' in context 'mobile'
    -- Registered extension context 'fullrights'; registrar: pbx_config
    -- Including context 'default' in context 'fullrights'
    -- Including context 'outgoing' in context 'fullrights'
  == Parsing '/etc/asterisk/users.conf': Found
    -- Time to scan old dialplan and merge leftovers back into the new: 0.000010 sec
    -- Time to restore hints and swap in new dialplan: 0.000048 sec
    -- Time to delete the old dialplan: 0.000005 sec
    -- Total time merge_contexts_delete: 0.000063 sec
  == pbx_config.so => (Text Extension Configuration)
 Loading res_pjsip_endpoint_identifier_anonymous.so.
  == res_pjsip_endpoint_identifier_anonymous.so => (PJSIP Anonymous endpoint identifier)
 Loading res_security_log.so.
    -- Security Logging Enabled
  == res_security_log.so => (Security Event Logging)
 Loading func_pjsip_aor.so.
  == Registered custom function 'PJSIP_AOR'
  == func_pjsip_aor.so => (Get information about a PJSIP AOR)
 Loading func_pjsip_contact.so.
  == Registered custom function 'PJSIP_CONTACT'
  == func_pjsip_contact.so => (Get information about a PJSIP contact)
 Loading func_pjsip_endpoint.so.
  == Registered custom function 'PJSIP_ENDPOINT'
  == func_pjsip_endpoint.so => (Get information about a PJSIP endpoint)
  == Parsing '/etc/asterisk/cli_permissions.conf': Found
  == Parsing '/etc/asterisk/cli.conf': Found
Asterisk Ready.
[Jun  2 10:41:00] WARNING[28132]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:41:00] ERROR[28132]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
[Jun  2 10:41:00] WARNING[28132]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:41:00] ERROR[28132]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:151@192.168.1.239:5060;line=1d7972cfd23669f' to AOR '151'
    -- Contact 161/sip:161@192.168.1.161:5060;line=0c57db2d55b8030 is now Reachable.  RTT: 74.828 msec
    -- Contact 101/sip:101@192.168.1.101:5060 is now Reachable.  RTT: 3.672 msec
    -- Contact 106/sip:106@192.168.1.105:5062 is now Reachable.  RTT: 9.838 msec
    -- Contact 151/sip:151@192.168.1.239:5060;line=1d7972cfd23669f is now Reachable.  RTT: 10.865 msec
[Jun  2 10:41:30] WARNING[28132]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error
[Jun  2 10:41:30] ERROR[28132]: res_pjsip_registrar.c:626 register_aor_core: Unable to bind contact 'sip:161@192.168.1.161:5060;line=0c57db2d55b8030' to AOR '161'
    -- Contact 105/sip:105@192.168.1.105:5060 is now Reachable.  RTT: 9.009 msec
[Jun  2 10:41:30] WARNING[28132]: db.c:348 ast_db_put: Couldn't execute statment: SQL logic error

The first error is usually the important one. Your logs don’t have millisecond timestamps, and you don’t have the error stream merged with the the protocol trace, so I can’t be sure, but I assume it is the SQL failure, especially as the first database error seems to precede the first registration failure.

1 Like

How can I do that?

I just checked around 5 to 6 boards with same installations and all of them are having this issue. There was no such issue before few days

Typically you use the full log settings in logger.conf.

1 Like

It seemed to be an issue with the device getting out of free memory due to some huge log files generated by one service.