Freepbx Recovery backup problem pjsip call

Hello! I ran into a problem that occurs after restoring from a backup.
Laboratory experiment:
I have a clean install of Freepbx 16.0.40 with just one extension. I connect a phone to it using the pjsip protocol. The phone works fine and I can make calls. I create a backup via “Backup & Restore 16.0.65”
I install a second Freepbx 16.0.40, and restore a backup on it via “Backup & Restore 16.0.65”.

The backup is successfully restored. But I can’t make calls anymore. I installed debug and looked at what happens during the call. I saw an error:

2023-04-20 09:16:15] WARNING[3525][C-0000000d]: ast_expr2.fl:470 ast_yyerror: ast_yyerror():  syntax error: syntax error, unexpected '>', expecting '-' or '!' or '(' or '<token>'; Input:
""="LIMIT" & 4 & 0 & >0 & 0>=
                     ^
[2023-04-20 09:16:15] WARNING[3525][C-0000000d]: ast_expr2.fl:474 ast_yyerror: If you have questions, please refer to https://wiki.asterisk.org/wiki/display/AST/Channel+Variables

I don’t understand why I am getting the error.
I found one way to fix the problem, but it does not suit me. You need to go to the extensions and click Submit, then apply the changes. Then my number can call again.
How to solve a problem?

grep C-0000000d /var/log/asterisk/full >> /tmp/C-0000000d

Then post the content of /tmp/C-0000000d via pastebin.com

I uploaded the log
But I can’t post links
[2023-04-21 05:41:37] VERBOSE[24031][C-0000000b] pbx.c: Executing [1497@from-int - Pastebin.com

My experiments went further. I installed two new servers Freepbx 16.0.21.9
Repeated all previous actions. after I transferred the backup to the second one Freepbx 16.0.21.9, everything works for me.
Then I updated the module Backup & Restore 16.0.65.
And again performed the recovery. Everything works.
I can conclude that the problem is in the version Freepbx 16.0.40

I think that the development team should pay attention to this problem. I lost more than a week to find out the reason why my restored copy does not work!

I managed to determine with 100% certainty that the problem is in the module Core16.0.68.11
I update the Core16.0.68.11 module on both servers, the backup no longer works when transferred to a new server. Help solve the problem!

Getting ready to do a 14 to 16 upgrade and physical to virtual move.

Current version of core is 16.0.68.11, which this user reports as faulty. @lgaetz , can you offer any insight? We are flying next week to do this work and would like it to go smoothly.

You are calling from 1497 to 1497?

Do you still have an issue with 1497? If so, please provide the output of the following:

asterisk -x"pjsip show endpoint 1497"
asterisk -x"database show" | grep 1497

I’m attempting to reproduce this and can’t. Also @sia13 it might6 be useful to see the Asterisk console output of:

database show AMPUSER/1497/outboundcid

hello
I can’t call myself
From 1497 to 1497 - does not work

[root@freepbx ~]# asterisk -x"pjsip show endpoint 1497"

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  1497/1497                                            Not in use    0 of inf
     InAuth:  1497-auth/1497
        Aor:  1497                                               1
      Contact:  1497/sip:[email protected]:5062          867286232b Avail       110.448


 ParameterName                      : ParameterValue
 ===================================================================================================
 100rel                             : yes
 accept_multiple_sdp_answers        : false
 accountcode                        :
 acl                                :
 aggregate_mwi                      : true
 allow                              : (ulaw|alaw|gsm|g726|g722)
 allow_overlap                      : true
 allow_subscribe                    : true
 allow_transfer                     : true
 allow_unauthenticated_options      : false
 aors                               : 1497
 asymmetric_rtp_codec               : false
 auth                               : 1497-auth
 bind_rtp_to_media_address          : false
 bundle                             : false
 call_group                         :
 callerid                           : "1497" <1497>
 callerid_privacy                   : allowed_not_screened
 callerid_tag                       :
 codec_prefs_incoming_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_incoming_offer         : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_offer         : prefer:pending, operation:union, keep:all, transcode:allow
 connected_line_method              : invite
 contact_acl                        :
 context                            : from-internal
 cos_audio                          : 5
 cos_video                          : 4
 device_state_busy_at               : 0
 direct_media                       : true
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_auto_generate_cert            : No
 dtls_ca_file                       :
 dtls_ca_path                       :
 dtls_cert_file                     :
 dtls_cipher                        :
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   :
 dtls_rekey                         : 0
 dtls_setup                         : active
 dtls_verify                        : No
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 fax_detect_timeout                 : 0
 follow_early_media_fork            : true
 force_avp                          : false
 force_rport                        : true
 from_domain                        :
 from_user                          :
 g726_non_standard                  : false
 ice_support                        : false
 identify_by                        : username,ip
 ignore_183_without_sdp             : false
 inband_progress                    : false
 incoming_call_offer_pref           : local
 incoming_mwi_mailbox               :
 language                           : en
 mailboxes                          :
 max_audio_streams                  : 1
 max_video_streams                  : 1
 media_address                      :
 media_encryption                   : no
 media_encryption_optimistic        : false
 media_use_received_transport       : false
 message_context                    :
 moh_passthrough                    : false
 moh_suggest                        : default
 mwi_from_user                      :
 mwi_subscribe_replaces_unsolicited : no
 named_call_group                   :
 named_pickup_group                 :
 notify_early_inuse_ringing         : false
 one_touch_recording                : true
 outbound_auth                      :
 outbound_proxy                     :
 outgoing_call_offer_pref           : remote_merge
 pickup_group                       :
 preferred_codec_only               : false
 record_off_feature                 : apprecord
 record_on_feature                  : apprecord
 refer_blind_progress               : true
 rewrite_contact                    : true
 rpid_immediate                     : false
 rtcp_mux                           : false
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : true
 rtp_timeout                        : 30
 rtp_timeout_hold                   : 300
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_connected_line                : yes
 send_diversion                     : true
 send_history_info                  : false
 send_pai                           : true
 send_rpid                          : false
 set_var                            :
 srtp_tag_32                        : false
 stir_shaken                        : off
 stir_shaken_profile                :
 sub_min_expiry                     : 0
 subscribe_context                  :
 suppress_q850_reason_headers       : false
 t38_bind_udptl_to_media_address    : false
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          :
 tos_audio                          : 184
 tos_video                          : 136
 transport                          :
 trust_connected_line               : yes
 trust_id_inbound                   : true
 trust_id_outbound                  : false
 use_avpf                           : false
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                :
 webrtc                             : no

[root@freepbx ~]# asterisk -x"pjsip show endpoint 1497"

 Endpoint:  <Endpoint/CID.....................................>  <State.....>  <Channels.>
    I/OAuth:  <AuthId/UserName...........................................................>
        Aor:  <Aor............................................>  <MaxContact>
      Contact:  <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................>
   Identify:  <Identify/Endpoint.........................................................>
        Match:  <criteria.........................>
    Channel:  <ChannelId......................................>  <State.....>  <Time.....>
        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
==========================================================================================

 Endpoint:  1497/1497                                            Not in use    0 of inf
     InAuth:  1497-auth/1497
        Aor:  1497                                               1
      Contact:  1497/sip:[email protected]:5062          867286232b Avail       110.448


 ParameterName                      : ParameterValue
 ===================================================================================================
 100rel                             : yes
 accept_multiple_sdp_answers        : false
 accountcode                        :
 acl                                :
 aggregate_mwi                      : true
 allow                              : (ulaw|alaw|gsm|g726|g722)
 allow_overlap                      : true
 allow_subscribe                    : true
 allow_transfer                     : true
 allow_unauthenticated_options      : false
 aors                               : 1497
 asymmetric_rtp_codec               : false
 auth                               : 1497-auth
 bind_rtp_to_media_address          : false
 bundle                             : false
 call_group                         :
 callerid                           : "1497" <1497>
 callerid_privacy                   : allowed_not_screened
 callerid_tag                       :
 codec_prefs_incoming_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_incoming_offer         : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_answer        : prefer:pending, operation:intersect, keep:all, transcode:allow
 codec_prefs_outgoing_offer         : prefer:pending, operation:union, keep:all, transcode:allow
 connected_line_method              : invite
 contact_acl                        :
 context                            : from-internal
 cos_audio                          : 5
 cos_video                          : 4
 device_state_busy_at               : 0
 direct_media                       : true
 direct_media_glare_mitigation      : none
 direct_media_method                : invite
 disable_direct_media_on_nat        : false
 dtls_auto_generate_cert            : No
 dtls_ca_file                       :
 dtls_ca_path                       :
 dtls_cert_file                     :
 dtls_cipher                        :
 dtls_fingerprint                   : SHA-256
 dtls_private_key                   :
 dtls_rekey                         : 0
 dtls_setup                         : active
 dtls_verify                        : No
 dtmf_mode                          : rfc4733
 fax_detect                         : false
 fax_detect_timeout                 : 0
 follow_early_media_fork            : true
 force_avp                          : false
 force_rport                        : true
 from_domain                        :
 from_user                          :
 g726_non_standard                  : false
 ice_support                        : false
 identify_by                        : username,ip
 ignore_183_without_sdp             : false
 inband_progress                    : false
 incoming_call_offer_pref           : local
 incoming_mwi_mailbox               :
 language                           : en
 mailboxes                          :
 max_audio_streams                  : 1
 max_video_streams                  : 1
 media_address                      :
 media_encryption                   : no
 media_encryption_optimistic        : false
 media_use_received_transport       : false
 message_context                    :
 moh_passthrough                    : false
 moh_suggest                        : default
 mwi_from_user                      :
 mwi_subscribe_replaces_unsolicited : no
 named_call_group                   :
 named_pickup_group                 :
 notify_early_inuse_ringing         : false
 one_touch_recording                : true
 outbound_auth                      :
 outbound_proxy                     :
 outgoing_call_offer_pref           : remote_merge
 pickup_group                       :
 preferred_codec_only               : false
 record_off_feature                 : apprecord
 record_on_feature                  : apprecord
 refer_blind_progress               : true
 rewrite_contact                    : true
 rpid_immediate                     : false
 rtcp_mux                           : false
 rtp_engine                         : asterisk
 rtp_ipv6                           : false
 rtp_keepalive                      : 0
 rtp_symmetric                      : true
 rtp_timeout                        : 30
 rtp_timeout_hold                   : 300
 sdp_owner                          : -
 sdp_session                        : Asterisk
 send_connected_line                : yes
 send_diversion                     : true
 send_history_info                  : false
 send_pai                           : true
 send_rpid                          : false
 set_var                            :
 srtp_tag_32                        : false
 stir_shaken                        : off
 stir_shaken_profile                :
 sub_min_expiry                     : 0
 subscribe_context                  :
 suppress_q850_reason_headers       : false
 t38_bind_udptl_to_media_address    : false
 t38_udptl                          : false
 t38_udptl_ec                       : none
 t38_udptl_ipv6                     : false
 t38_udptl_maxdatagram              : 0
 t38_udptl_nat                      : false
 timers                             : yes
 timers_min_se                      : 90
 timers_sess_expires                : 1800
 tone_zone                          :
 tos_audio                          : 184
 tos_video                          : 136
 transport                          :
 trust_connected_line               : yes
 trust_id_inbound                   : true
 trust_id_outbound                  : false
 use_avpf                           : false
 use_ptime                          : false
 user_eq_phone                      : false
 voicemail_extension                :
 webrtc                             : no


[root@freepbx ~]# asterisk -x"database show" | grep 1497
/AMPUSER/1497/answermode                          : disabled
/AMPUSER/1497/cfringtimer                         : 0
/AMPUSER/1497/cidname                             : 1497
/AMPUSER/1497/cidnum                              : 1497
/AMPUSER/1497/followme/annmsg                     :
/AMPUSER/1497/followme/ddial                      : EXTENSION
/AMPUSER/1497/followme/dring                      :
/AMPUSER/1497/followme/grpconf                    : DISABLED
/AMPUSER/1497/followme/grplist                    : 1497
/AMPUSER/1497/followme/grppre                     :
/AMPUSER/1497/followme/grptime                    : 20
/AMPUSER/1497/followme/postdest                   : ext-local,1497,dest
/AMPUSER/1497/followme/prering                    : 7
/AMPUSER/1497/followme/remotealertmsg             :
/AMPUSER/1497/followme/ringing                    : Ring
/AMPUSER/1497/followme/rvolume                    :
/AMPUSER/1497/followme/strategy                   : ringallv2-prim
/AMPUSER/1497/followme/toolatemsg                 :
/AMPUSER/1497/hint                                : &Custom:DND1497,CustomPresence:1497
/AMPUSER/1497/noanswer                            :
/AMPUSER/1497/outboundcid                         : 1497
/AMPUSER/1497/password                            :
/AMPUSER/1497/recording                           :
/AMPUSER/1497/recording/in/external               : dontcare
/AMPUSER/1497/recording/in/internal               : dontcare
/AMPUSER/1497/recording/ondemand                  : disabled
/AMPUSER/1497/recording/out/external              : dontcare
/AMPUSER/1497/recording/out/internal              : dontcare
/AMPUSER/1497/recording/priority                  : 10
/AMPUSER/1497/ringtimer                           : 0
/AMPUSER/1497/voicemail                           : novm
/CALLTRACE/1497                                   : 1497
/CW/1497                                          : ENABLED
/CustomDevstate/FOLLOWME1497                      : NOT_INUSE
/DEVICE/1497/default_user                         : 1497
/DEVICE/1497/dial                                 : PJSIP/1497
/DEVICE/1497/tech                                 : pjsip
/DEVICE/1497/type                                 : fixed
/DEVICE/1497/user                                 : 1497
/registrar/contact/1497;@867286232bc7afd3a6d5be28b8bb3f5e: {"via_addr":"192.168.98.230","qualify_timeout":"3.000000","call_id":"[email protected]","reg_server":"","prune_on_boot":"no","path":"","endpoint":"1497","via_port":"5062","authenticate_qualify":"no","uri":"sip:[email protected]:5062","qualify_frequency":"60","user_agent":"Yealink SIP-T28P 2.73.0.50","expiration_time":"1683177907","outbound_proxy":""}

freepbx*CLI> database show AMPUSER/1497/outboundcid
/AMPUSER/1497/outboundcid                         : 1497
1 results found.

I’ve had to perform a restore to a system running 16 this morning and can confirm that this is an issue.

No inbound calls would work until I went into each individual extension, changed something trivial and hit submit/apply and then change the trivial thing back. Inbound calls started working properly to extensions after doing this.

The whole time all extensions showed properly as available and as @sia13 mentioned outbound calls worked just fine.

Here is a call log from a test call that failed:

Hello! I am glad that this problem has been confirmed.
But 20 days have passed since I opened this topic. And there is no reaction from the development team. I also sent this information to them through their website for support. I did not receive an answer.

Had a second system that needed to be restored this morning with the same symptoms. External inbound calls wouldn’t work until we went into each individual extension and hit Submit (no other changes needed) and Applying Config.

Internally extension to extension worked just fine after restore before doing anything to the extensions.

@lgaetz what’s the best process to get this looked at?

Step one is a ticket, which I did myself a short while ago based on this thread
https://issues.freepbx.org/browse/FREEPBX-24182

If you have steps to reproduce, please add them to the ticket, in my quick and basic test it worked as expected.

1 Like

Is there a way to check from the backup what version the FreePBX was running after the fact? I don’t recall from either of these and I wonder if this is a problem with going from a certain version of FreePBX to 16. I wouldn’t mind finding that out real quick and reporting in the issue tracker.

Thanks for reporting this and finding where the call actually breaks.

Hello!
Thank you all for your help.
The updated core 16.0.68.18 fixed the problem! HOORAY!

Hello friends. I found another module error.

  1. I create a backup on the main server. I transfer it to a backup server and restore it.
  2. I found that the “Asterisk IAX Settings” module does not transfer the codecs I selected. For example, the G729 codec is selected for me, but after the backup is installed, it is not activated. You need to add ego manually.
    Who knows how to solve the problem?

Hello.
Am I the only one facing this problem?
Anyone can help?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.