Question

Photo of Jez Hailwood

1

SMS replies: "This phone number is not registered ..."

Sending SMS (via Twilio) is working great, but when I reply I receive an SMS response which says "Could not deliver message. This phone number is not registered in the Freedom Church database." That suggests to me that the reply is getting as far as Rock, but Rock isn't able to find my profile based on the incoming phone number. Any idea why that might be? Obviously my phone number is in the database becasue I was able to send the SMS in the first place. What am I missing?

  • Photo of Jez Hailwood

    0

    We managed to get to the bottom of this. In the UK, all phone numbers begin with a 0 which must be removed when calling the number from abroad. For example, if my UK phone number is 01234 123456, I would need to dial +44 1234 123456. We'd been storing phone numbers with the leading 0, but when Twilio sent a message to Rock it reported it as +44 1234 123456, which didn't match the record in the database. We've solved the problem by storing phone numbers without the 0, and Rock 3.0 will include an option to display the phone number with the international code on the person profile so that we don't see 1234 123456, which doesn't make much sense here. I gather our regexes are going to appear in the 3.0 documentation, but I've included the defined values below in case they're of use to someone now. This is the complete set which should correctly handle every UK geographic and mobile number:

    44
    UK Landline Number in 2+8 Format
    ^(44)?(0)?(2[0-9]{1})(\d{4})(\d{4})$
    $3 $4 $5

    44
    UK Landline Number in 3+7 Format
    ^(44)?(0)?(11[0-9]{1}|1[0-9]{1}1)(\d{3})(\d{4})$
    $3 $4 $5

    44
    UK Landline Number in 5+5 or 5+4 Format
    ^(44)?(0)?(13873|15242|15394|15395|15396|16973|16974|16977|17683|17684|17687|19467)(\d{4,5})$
    $3 $4

    44
    UK Landline Number in 4+6 or 4+5 Format, or Mobile Number
    ^(44)?(0)?(\d{4})(\d{5,6})$
    $3 $4

  • Photo of Robert Frisone

    1

    I was having the same issue. Check your SMS From values in communication settings. I had to put mine in with the country code. Also, make sure that your phone number on your personal profile is opted in to recieving SMS.

    • Jez Hailwood

      As far as I can see, everything's good. My number is opted in to SMS (I was able to send the initial communication from Rock) and the SMS From Value has always included the country code. I've tried with and without the '+' and spaces, but nothing has made a difference. My impression from the response message is that Rock doesn't think the phone number of the incoming message matches the number in my profile, but I'm not sure how that can be.

  • Photo of Robert Frisone

    0

    Have you tried sending your test message to a different phone besides your own? I think something in the system might not work properly if you reply to the original message from the phone that you are supposed to recieve replies to, if that makes sense.

    • Jez Hailwood

      Initially I set the SMS response recipient as myself, sent a message to myself through Rock/Twilio, replied, and then received the response "Could not deliver message. This phone number is not registered in the Freedom Church database." I then tried sending to another number, keeping myself as the response recipient, but replies sent from that phone generated the same message.


      I did wonder if we were running into problems because in the UK our phone number format is 01234 123456, but when adding the international code, the 0 is removed (e.g. 44 1234 123456). I gather this isn't necessary in the US. My phone would report its number to Twilio/Rock as 441234123456, but Rock thinks it's 4401234123456, so the numbers don't match. That said, I changed my phone number in Rock to the equivalent of 1234 123456, but it didn't make any difference.

  • Photo of Marcie Rempel

    0

    I'm having this same issue. I'm in Canada, so our country code is the same as the US I believe. Our numbers are 1 587 123 4567. Not sure if I missed a step in setting it up but I followed the documentation to the letter. 

  • Photo of Marcie Rempel

    0

    I figured out that error (needed to add the +1) to the SMS From Value in Rock. But now my replies aren't going back to the recipient, they're coming back to my phone (response recipient) instead of the the person with the response code. I've put the response code at the end and at the beginning of the reply and it just comes back to me and the assigns another response code. I must be missing a step somewhere.