• Resolved afterdarkgrafx

    (@afterdarkgrafx)


    I am having this issue too… ( I removed my phone and replaced with XXXXXXX below)

    The ‘To’ number 216197027377 is not a valid phone number.

    I am entering it in the plugin as +1619XXXXXXX
    I then put it in as 619XXXXXXX
    I then tried 1619XXXXXXX

    I am in the U.S. and it appears the plugin is adding a “2” to the beginning of the phone number…how do I fix this?

    <TwilioResponse><RestException>21211<Message>The ‘To’ number 21619XXXXXXX is not a valid phone number.</Message><MoreInfo>https://www.twilio.com/docs/errors/21211</MoreInfo><Status>400</Status></RestException></TwilioResponse&gt;
    [headers] => Requests_Response_Headers Object

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Art Project Group

    (@artprojectgroup)

    As you can read in the other thread your phone number must be entered without prefix and WooCommerce based must be configured correctly. The plugin gets the WooCommerce based country prefix and adds it to the phone number.

    Kind regards.

    Thread Starter afterdarkgrafx

    (@afterdarkgrafx)

    If you read my message, you will see that I put it in as

    619XXXXXXX

    this does not have a prefix and still adding the number 2 to the front of the phone numbers. I went through your code on funciones-apg.php and the others and found where the + sign is added to the prefix and then I looked at proveedores.php to find this code

    case “twilio”:
    $argumentos[ ‘header’ ] = “Accept-Charset: utf-8\r\n”;
    $argumentos[ ‘body’ ] = [
    ‘To’ => urlencode( $telefono ),

    I then found the country conversion phone numbers in funciones.php and could not find the “2” reference to a country.

    And think there is something wrong with $telefono

    Or is there some other setting that I am missing?

    I setup twilio
    I added SID
    the token
    the mobile phone from twilio as the from

    Please let me know what you think may be the issue.I also made sure the country of origin in WooCommerce is United States.

    Thank you,
    James

    Thread Starter afterdarkgrafx

    (@afterdarkgrafx)

    I think I need to use another plugin…I will test out twilio’s direct plugin.

    Plugin Author Art Project Group

    (@artprojectgroup)

    Maybe the problem is generated with urlencode();. Can you try again editing that line just with $telefono?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘To Number Twilio Not Valid’ is closed to new replies.