Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

SMS Messaging

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

    SMS Messaging

    I am doing SMS messaging in one of my apps, using the method of sending an email to all participants with their phone number and text message carrier address.

    The problem is that this seems to work intermittently. Sometimes I will send a message and everyone will get it, sometimes only half of the folks will get it.

    There doesn't seem to be a rhyme or reason.

    This is a tour company. The text messages are going to people during their trip, providing up to the minute instructions and information. (Such as please meet back at the bus in the north parking lot at 10pm.)

    These people will often only be going on 1 trip, so we don't want to require everyone to download an app - because they won't do it. However, we collect everyone's cell phone carrier and phone number prior to the trip, so I have all that info.

    Currently, I am sending the message in batches of 80 or less, with all of the messages being blind copied. It may be that some servers are rejecting the mass text - but like I said, it works to everyone sometimes and not others - so I don't know what is going wrong.

    Does anyone have a working SMS app that I can adapt to use with my system.

    Willing to pay for the help.

    We would be sending from to 20 to 500 text messages at a time, multiple times per day. Different numbers each time.

    Any suggestions appreciated.

    If you have an app that might work for me, respond here or by private message, please.

    Larry

    #2
    Re: SMS Messaging

    look in twilio
    they have api, i am sure you can work with that. i did not try yet.
    Last edited by GGandhi; 05-19-2016, 01:58 PM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    [email protected]
    Skype:[email protected]
    1 914 924 5171

    Comment


      #3
      Re: SMS Messaging

      Larry,
      my esperience, sending using phone number & the phone company extension
      is never reliable ... We had a carrier who for some reason hold back the message for few days.

      plus it is a histle to ask tourist for their carrier company name.

      there are several good discussion on this topics ..
      please search ..

      ken

      Comment


        #4
        Re: SMS Messaging

        I am using Twillio now. It works great - no issues.

        Comment


          #5
          Re: SMS Messaging

          thanks for coming back to me Larry,

          I would very much appreciate if you wouldnt mind sharing your code ?

          thanks in advance

          john

          Comment


            #6
            Re: SMS Messaging

            Larry,

            I just implemented Twilio too. I agree - works great!

            One question though: Have you found a way to use this to send a text message to say, 10 phone numbers at once?
            Gary S. Traub, Ph.D.

            Comment


              #7
              Re: SMS Messaging

              I have a function called Send TW. It takes a contact_id, which is the table for an email or text message.

              I got this function from Alpha Help, I think, and modified it from there.

              FUNCTION SendTw AS C (vContact_ID AS C )

              'debug(1)
              '==CONNECTION AND VARS
              dim cn as SQL::Connection
              dim vHasError as c
              dim cf_1 as extension::CurlFile
              dim flag_1 as l
              dim ce as extension::Curl

              vHasError = "N"

              cn.open("::name::conn")

              vselect = "select sid, token, messagefromid, apiurl from twillio"
              cn.execute(vSelect)
              vTwilioURLPre= cn.resultset.data("apiurl")
              vSID = cn.resultset.data("sid")
              vTwilioURL=vTwilioURLPre+vSID+"/Messages"
              vToken = cn.resultset.data("token")
              vPassword=vSID+":"+vToken
              vFromNumber=cn.resultset.data("messagefromid")
              vFrom="&From="+vFromNumber

              vSelect = "SELECT Subject, Message FROM Contact_Info where Contact_ID = "+ vContact_id

              cn.execute(vSelect)
              vSubject = cn.resultset.data("Subject")
              vMessage = cn.resultset.data("Message")

              ' I grab all of the recipients phone numbers from the recipients table - so this will send to multiple people.
              vSelect = "SELECT cell_phone_No_Check FROM Contact_recipients as cr inner join view_people_info as p on p.people_id = cr.people_id where Contact_ID = "+ vContact_id
              cn.execute(vSelect)

              if vSubject > " " then
              vMessage=vSubject + " : " + vMessage
              end if

              ce = extension::Curl.Init()
              ce.setOpt("URL",vTwilioURL)
              ce.setOpt("NOPROGRESS",1)
              ce.setOpt("USERPWD",vPassword)
              ' ce.setOpt("POSTFIELDSIZE_LARGE",85)
              ce.setOpt("USERAGENT","curl/7.34.0")
              ce.setOpt("MAXREDIRS",50)
              ce.setOpt("CAINFO","C:\\Program Files (x86)\\a5V12\\CARoot\\ca-cert.pem")
              ce.setOpt("CAPATH","C:\\Program Files (x86)\\a5V12\\CARoot")
              ce.setOpt("CUSTOMREQUEST","POST")
              ce.setOpt("TCP_KEEPALIVE",1)
              vBody = "Body="+urlencode(vMessage)

              while eval_valid("cn.resultset.data("cell_phone_No_Check")")

              vToNumber= cn.resultset.data("cell_phone_No_Check")
              vTo="&To=+1"+vToNumber

              vPostFields=vBody+vTo+vFrom

              ce.setOpt("POSTFIELDS",vPostFields)
              ce.SetOpt("FILE",cf_1)
              flag_1 = ce.Exec()

              flag_1 = cn.ResultSet.NextRow()

              end while

              ce.close()

              sentout:

              ' if we made it this far, the email was sent.
              vUpdate = "update Contact_Info set Sent = 1 where Contact_ID = "+ vcontact_id
              cn.execute(vUpdate)

              errorout:

              cn.close()

              if vHasError = "Y" then
              save_to_file(vcode, "c:\a5webroot\wtsql\cc\emailstatus.txt")
              end if

              SendTW = ""

              END FUNCTION
              Last edited by lgrupido; 09-02-2017, 10:35 AM.

              Comment


                #8
                Re: SMS Messaging

                larry
                if the vSid, token you say above are true sid and token., please remove that. twilio charges by usage. your sid and token can be harvested here and used elsewhere.
                thanks for reading

                gandhi

                version 11 3381 - 4096
                mysql backend
                http://www.alphawebprogramming.blogspot.com
                [email protected]
                Skype:[email protected]
                1 914 924 5171

                Comment


                  #9
                  Re: SMS Messaging

                  thanks, didn't notice that in my testing examples.

                  Comment


                    #10
                    Re: SMS Messaging

                    Twillio works great. Been using it for over a year now. No Issues

                    Comment


                      #11
                      Re: SMS Messaging

                      Thanks for posting this Larry. I was hoping for a built in way to use action scripting, but if this is what is needed to send SMS to multiple people, I will give it a try.
                      Gary S. Traub, Ph.D.

                      Comment


                        #12
                        Re: SMS Messaging

                        Ok, I am taking a stab at this myself tonight and I have an xbasic error I cannot figure out.

                        Code:
                        FUNCTION SendTw AS C (e as p)
                        
                        debug(1)
                        '==CONNECTION AND VARS
                        dim cn as SQL::Connection
                        dim vHasError as c
                        dim cf_1 as extension::CurlFile
                        dim flag_1 as l
                        dim ce as extension::Curl	
                        
                        vHasError = "N"
                        
                        cn.open("::Name::DropsConn")
                        
                        vTwilioURLPre= "https://api.twilio.com/2010-04-01/Accounts/"
                        vSID = "my-SID-here"
                        vTwilioURL=vTwilioURLPre+vSID
                        vToken = "my-TOKEN-here"
                        vPassword=vSID+":"+vToken
                        vFromNumber="+my-NUMBER-here"
                        vFrom="&From="+vFromNumber
                        
                        
                        vSubject = "New post"
                        vMessage = "There is a post"
                        
                        ' trying to grab all of the recipients phone numbers from the sharedto table - so this will send to multiple people.
                        vSelect = "SELECT phone FROM sharedto where notify = 'Yes' AND userid = 'my-USERID-here' "
                        cn.execute(vSelect)
                        
                        ce = extension::Curl.Init()
                        ce.setOpt("URL",vTwilioURL)
                        ce.setOpt("NOPROGRESS",1)
                        ce.setOpt("USERPWD",vPassword)
                        ce.setOpt("USERAGENT","curl/7.34.0")
                        ce.setOpt("MAXREDIRS",50)
                        ce.setOpt("CAINFO","C:\\Program Files (x86)\\a5V12\\CARoot\\ca-cert.pem")
                        ce.setOpt("CAPATH","C:\\Program Files (x86)\\a5V12\\CARoot")
                        ce.setOpt("CUSTOMREQUEST","POST")
                        ce.setOpt("TCP_KEEPALIVE",1)
                        vBody = "Body="+urlencode(vMessage)
                        
                        while eval_valid("cn.resultset.data("phone")")
                        
                        vToNumber= cn.resultset.data("phone")
                        vTo="&To=+1"+vToNumber
                        
                        vPostFields=vBody+vTo+vFrom
                        
                        ce.setOpt("POSTFIELDS",vPostFields)
                        ce.SetOpt("FILE",cf_1)
                        flag_1 = ce.Exec()
                        
                        flag_1 = cn.ResultSet.NextRow()
                        
                        end while
                        ce.close()
                        cn.Close()
                        
                        END FUNCTION

                        The error is "bad expression character" at the while statement with "while" being the cuplrit. Any ideas? Also when I commented it out I of course did get a phone number back but only one row, also I did NOT get a text from twilio. My account is working fine if I just use the action button for a twilio message but I want to send out the message to multiple numbers not just one.
                        NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                        Comment


                          #13
                          Re: SMS Messaging

                          Try this:

                          while eval_valid("cn.resultset.data("phone")")


                          (You can't have quotes inside your quotes!)

                          Comment


                            #14
                            Re: SMS Messaging

                            that looks the same, no?
                            This is a screenshot showing the error @ the "while"
                            while error.JPG

                            Changing it to
                            while eval_valid(cn.resultset.data("phone"))
                            does get rid of the error though...
                            Last edited by CharlesParker; 06-17-2018, 10:17 PM.
                            NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                            Comment


                              #15
                              Re: SMS Messaging

                              so I got around the error, however, I am not receiving an SMS and not sure how to debug. The debugger shows a phone number in the Phone variable and all of the other info such as SID and Token are good so not sure how to get this working...
                              NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                              Comment

                              Working...
                              X