Announcement

Collapse
No announcement yet.

VoIP error, this is something above me :(

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • VoIP error, this is something above me :(

    Hi guys, I have few espoCRM installations, purchased separate plugins for every install.
    On one install it works perfectly fine, when trying on the second one, getting errors on receiving calls (I can do outgoing, but they never appear in the system, neither their recordings), please help!!

    I have separate Twilio accounts (organizations), separate TWIML apps, SIP domains,
    ESPOCRM 7.2.7, VoIP plugin (tested both) 1.20.4 & 1.21.0

    I followed the documentation here



    But still getting 2 errors and it's not working:
    [2023-01-12 02:00:14] NOTICE: E_NOTICE: Undefined index: To {"code":8,"message":"Undefined index: To","file":"/web/crm.domain.com/www/application/Espo/Modules/Voip/Providers/Twilio/WebhookHandler.php","line":68} []
    [2023-01-12 02:00:14] NOTICE: E_NOTICE: Undefined index: CallStatus {"code":8,"message":"Undefined index: CallStatus","file":"/web/crm.domain.com/www/application/Espo/Modules/Voip/Providers/Twilio/EventListener.php","line":34} []​

    Log error:

    [2023-01-12 02:00:14] DEBUG: Voip Request URL: crm.domain.com/api/v1/Voip/webhook/Twilio/t5spndae1n562fq8x379?type=voice&AccountSid=ACdade1 6099dab96078653b772d4e3657a&ApiVersion=2010-04-01&ApplicationSid=AP570c5a745c188fb2d50ceebd5c797 a 7d&CallSid=CAfe9378df421895b404b2d1b1ea885638&Cal l Status=ringing&Called=%2B18187407610&CalledCity=SH ERMAN+OAKS&CalledCountry=US&CalledState=CA&CalledZ ip=91404&Caller=%2B12011234561&CallerCity=&CallerC ountry=US&CallerState=CA&CallerZip=&Direction=inbo und&From=%2B12011234561&FromCity=&FromCountry=US&F romState=CA&FromZip=&To=%2B18187407610&ToCity=SHER MAN+OAKS&ToCountry=US&ToState=CA&ToZip=91404 [] []
    [2023-01-12 02:00:14] DEBUG: Voip Content Type: [] []
    [2023-01-12 02:00:14] DEBUG: Voip Input Data: '' [] []
    [2023-01-12 02:00:14] DEBUG: Voip Normalized Data: array ( ) [] []
    [2023-01-12 02:00:14] NOTICE: E_NOTICE: Undefined index: To {"code":8,"message":"Undefined index: To","file":"/web/crm.domain.com/www/application/Espo/Modules/Voip/Providers/Twilio/WebhookHandler.php","line":68} []
    [2023-01-12 02:00:14] NOTICE: E_NOTICE: Undefined index: CallStatus {"code":8,"message":"Undefined index: CallStatus","file":"/web/crm.domain.com/www/application/Espo/Modules/Voip/Providers/Twilio/EventListener.php","line":34} []
    [2023-01-12 02:00:14] DEBUG: Twilio Twiml response: <?xml version="1.0" encoding="UTF-8"?> <Response><Say>This phone number is not configured yet. Please try again later.</Say></Response> [] []
    [2023-01-12 02:00:19] DEBUG: Voip Request URL: crm.domain.com/api/v1/Voip/webhook/Twilio/t5spndae1n562fq8x379?type=voiceStatus&type=voiceSt atus&Called=%2B18187407610&ToState=CA&CallerCountr y=US&Direction=inbound&Timestamp=Thu,+12+Jan+2023+ 02:00:19+%2B0000&CallbackSource=call-progress-events&CallerState=CA&ToZip=91404&SequenceNumber=0 &To=%2B18187407610&CallSid=CAfe9378df421895b404 b2d 1b1ea885638&ToCountry=US&CallerZip=&CalledZip=9140 4&ApiVersion=2010-04-01&CallStatus=completed&CalledCity=SHERMAN+OAKS&D u ration=1&From=%2B12011234561&CallDuration=5&Accoun tSid=ACdade16099dab96078653b772d4e3657a&CalledCoun try=US&ApplicationSid=AP570c5a745c188fb2d50ceebd5c 797a7d&CallerCity=&ToCity=SHERMAN+OAKS&FromCountry =US&Caller=%2B12011234561&FromCity=&CalledState=CA &FromZip=&FromState=CA [] []
    [2023-01-12 02:00:19] DEBUG: Voip Content Type: application/x-www-form-urlencoded [] []
    [2023-01-12 02:00:19] DEBUG: Voip Input Data: '' [] []
    [2023-01-12 02:00:19] DEBUG: Voip Normalized Data: array ( ) [] []
    [2023-01-12 02:00:19] NOTICE: E_NOTICE: Undefined index: CallStatus {"code":8,"message":"Undefined index: CallStatus","file":"/web/crm.domain.com/www/application/Espo/Modules/Voip/Providers/Twilio/EventListener.php","line":34} []​







    Also, attached twilio log screenshot:Click image for larger version

Name:	Screenshot 2023-01-11 at 6.12.36 PM.png
Views:	279
Size:	743.3 KB
ID:	86983
    Attached Files

  • #2
    Here is VoIP routing screenshot

    Click image for larger version

Name:	Screenshot 2023-01-11 at 6.13.35 PM.png
Views:	222
Size:	128.3 KB
ID:	86985

    Comment


    • #3
      Looks like a Twilio error?
      From your log and your Twilio screenshot:
      Code:
      <Say>This phone number is not configured yet. Please try again later.</Say>

      Comment


      • #4
        Originally posted by Kharg View Post
        Looks like a Twilio error?
        From your log and your Twilio screenshot:
        Code:
        <Say>This phone number is not configured yet. Please try again later.</Say>
        seems like twilio gets this text from the CRM !
        I can see it on both logs

        [2023-01-12 02:00:14] DEBUG: Twilio Twiml response: <?xml version="1.0" encoding="UTF-8"?> <Response><Say>This phone number is not configured yet. Please try again later.</Say></Response> [] []

        Comment


        • #5
          Any help ) ?

          Comment


          • #6
            Hi Russ,
            it really looks like a Twilio issue for me."Twilio Twiml response" Espo is logging the response it receives from Twilio.
            Is this new Twilio account verified? Can you try to setup the number using a softphone and see if it works?
            Last edited by Kharg; 01-12-2023, 05:18 PM.

            Comment


            • #7
              Originally posted by Kharg View Post
              Hi Russ,
              it really looks like a Twilio issue for me."Twilio Twiml response" Espo is logging the response it receives from Twilio.
              Is this new Twilio account verified? Can you try to setup the number using a softphone and see if it works?
              Yes, account is verified
              I can purchase phone numbers, I did, 2 for tests, I can make outgoing calls from CRM, but incoming are not going through, CRM replies back to twilio with an error

              Comment


              • #8
                4 hours, of debugging with 2 CRMs found the issue, posting here for future generations and karma

                Solution (very long story, short): It turns out, that CRM settings had http instead of https...this was posting wrong data to twilio, so twilio would send POST request to http losing content type "application/x-www-form-urlencoded"

                That's it Thanks Kharg for not leaving me alone


                Click image for larger version  Name:	Screenshot 2023-01-12 at 3.56.42 PM.png Views:	3 Size:	87.0 KB ID:	87018

                Comment


                • Kharg
                  Kharg commented
                  Editing a comment
                  Glad you could fix your problem
              Working...
              X