Sending SMS...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Fazer

    Sending SMS...

    Hello,

    Can anyone point me to a way on how to send a SMS message using Python?

    Thanks,
  • Jarek Zgoda

    #2
    Re: Sending SMS...

    Fazer <faizan@jaredwe b.com> pisze:
    [color=blue]
    > Can anyone point me to a way on how to send a SMS message using Python?[/color]

    Use web gateway, like 1rstWap.com. I think it's simplest method.

    --
    Jarek Zgoda
    Registered Linux User #-1
    http://www.zgoda.biz/ JID:jarek@jabbe rpl.org http://zgoda.jogger.pl/

    Comment

    • Fazer

      #3
      Re: Sending SMS...

      Jarek Zgoda <jzgoda@gazeta. usun.pl> wrote in message news:<bjvs8g$ns o$1@atlantis.ne ws.tpi.pl>...[color=blue]
      > Fazer <faizan@jaredwe b.com> pisze:
      >[color=green]
      > > Can anyone point me to a way on how to send a SMS message using Python?[/color]
      >
      > Use web gateway, like 1rstWap.com. I think it's simplest method.[/color]

      Thanks, but how would I implement that? Any ideas?

      Thanks,

      Faizan

      Comment

      • Jarek Zgoda

        #4
        Re: Sending SMS...

        Fazer <faizanNOSPAM@j aredweb.com> pisze:
        [color=blue][color=green][color=darkred]
        >> > Can anyone point me to a way on how to send a SMS message using Python?[/color]
        >>
        >> Use web gateway, like 1rstWap.com. I think it's simplest method.[/color]
        >
        > Thanks, but how would I implement that? Any ideas?[/color]

        Just send appropriately crafted HTTP request to the gateway's webserver
        using httplib. You should analyze page source to get some basic things
        like http field names and a name of script, where you should send your
        data (form action="script_ name").

        Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
        require prior user registration, that can not be handled by program
        (they show user some picture with text that need to be entered
        correctly).

        --
        Jarek Zgoda
        Registered Linux User #-1
        http://www.zgoda.biz/ JID:jarek@jabbe rpl.org http://zgoda.jogger.pl/

        Comment

        • Peter Hansen

          #5
          Re: Sending SMS...

          Jarek Zgoda wrote:[color=blue]
          >
          > Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
          > require prior user registration, that can not be handled by program
          > (they show user some picture with text that need to be entered
          > correctly).[/color]

          Kind of defeats the value of suggesting that he use this as
          a way of sending using Python, doesn't it?

          -Peter

          Comment

          • Jarek Zgoda

            #6
            Re: Sending SMS...

            Peter Hansen <peter@engcorp. com> pisze:
            [color=blue][color=green]
            >> Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
            >> require prior user registration, that can not be handled by program
            >> (they show user some picture with text that need to be entered
            >> correctly).[/color]
            >
            > Kind of defeats the value of suggesting that he use this as
            > a way of sending using Python, doesn't it?[/color]

            Yes - if this should be service/daemon app and you don't have a user
            that can perform prior registration.

            No - if this will be usual GUI app with user equipped with monitor,
            keyboard and mouse, sitting in front of it.

            And again no - if you don't need "worldwide" functionality of gateways
            like 1rstWap and stick to local telcos.

            --
            Jarek Zgoda
            Registered Linux User #-1
            http://www.zgoda.biz/ JID:jarek@jabbe rpl.org http://zgoda.jogger.pl/

            Comment

            • Fazer

              #7
              Re: Sending SMS...

              Jarek Zgoda <jzgoda@gazeta. usun.pl> wrote in message news:<bk12hf$s9 8$1@nemesis.new s.tpi.pl>...[color=blue]
              > Fazer <faizanNOSPAM@j aredweb.com> pisze:
              >[color=green][color=darkred]
              > >> > Can anyone point me to a way on how to send a SMS message using Python?
              > >>
              > >> Use web gateway, like 1rstWap.com. I think it's simplest method.[/color]
              > >
              > > Thanks, but how would I implement that? Any ideas?[/color]
              >
              > Just send appropriately crafted HTTP request to the gateway's webserver
              > using httplib. You should analyze page source to get some basic things
              > like http field names and a name of script, where you should send your
              > data (form action="script_ name").
              >
              > Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
              > require prior user registration, that can not be handled by program
              > (they show user some picture with text that need to be entered
              > correctly).[/color]


              Thanks for your reply. I thought I would have to use sockets but I
              guess http would be easier.

              Comment

              • Guenther Starnberger

                #8
                Re: Sending SMS...

                Fazer wrote:

                hello,
                [color=blue]
                > Can anyone point me to a way on how to send a SMS message using Python?[/color]

                an alternative to the already suggested SMS-webgateway would be to use the
                ICQ-SMS-gateway ('worldwide' SMSs, no advertisements) .

                either use libicq2000[1] directly (but afaik there are no python bindings
                yet), or setup a local jabber[2] server with an aim-transport[3] to which
                you can connect with python by using jabberpy[4].

                cu
                /gst

                [1] http://libicq2000.sf.net/
                [2] http://www.jabber.org/about/overview.html
                [3] http://aim-transport.jabberstudio.org/
                [4] http://jabberpy.sourceforge.net/

                Comment

                • Jarek Zgoda

                  #9
                  Re: Sending SMS...

                  Guenther Starnberger <gst@sysfrog.or g> pisze:
                  [color=blue]
                  > either use libicq2000[1] directly (but afaik there are no python bindings
                  > yet), or setup a local jabber[2] server with an aim-transport[3] to which
                  > you can connect with python by using jabberpy[4].[/color]

                  Shouldn't public Jabber server with AIM transport be sufficient? I never
                  tried such approach, but it sounds interesting since Jabber is getting
                  more and more audience here in Poland.

                  Also, there is another Jabber library available, PyXMPP. Its author
                  claims it's faster and more robust (it is based on libxml2, not expat).
                  I didn't tried it yet due to some system inconsistencies (libxml2 is
                  heavily used by GNOME2 and Python bindings are tightly tied to
                  particular version of library), but it sounds promising.

                  --
                  Jarek Zgoda
                  Registered Linux User #-1
                  http://www.zgoda.biz/ JID:jarek@jabbe rpl.org http://zgoda.jogger.pl/

                  Comment

                  • Guenther Starnberger

                    #10
                    Re: Sending SMS...

                    Jarek Zgoda wrote:

                    hello,
                    [color=blue][color=green]
                    >> either use libicq2000[1] directly (but afaik there are no python bindings
                    >> yet), or setup a local jabber[2] server with an aim-transport[3] to which
                    >> you can connect with python by using jabberpy[4].[/color]
                    >
                    > Shouldn't public Jabber server with AIM transport be sufficient? I never
                    > tried such approach, but it sounds interesting since Jabber is getting
                    > more and more audience here in Poland.[/color]

                    yop - it should be possible, but AOL already blocks some public jabber
                    servers from login to ICQ/AIM. if people start using large (well known)
                    jabber servers to relay their SMS for free, it's likely that they soon will
                    be blocked too :/

                    cu
                    /gst

                    Comment

                    • Jarek Zgoda

                      #11
                      Re: Sending SMS...

                      Peter Hansen <peter@engcorp. com> pisze:
                      [color=blue][color=green]
                      >> Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
                      >> require prior user registration, that can not be handled by program
                      >> (they show user some picture with text that need to be entered
                      >> correctly).[/color]
                      >
                      > Kind of defeats the value of suggesting that he use this as
                      > a way of sending using Python, doesn't it?[/color]

                      Ah, and one thing I forgot for the first time -- you are not limited to
                      "free" gateways. You can always buy a service from your telco.

                      --
                      Jarek Zgoda
                      Registered Linux User #-1
                      http://www.zgoda.biz/ JID:jarek@jabbe rpl.org http://zgoda.jogger.pl/

                      Comment

                      • Alan Kennedy

                        #12
                        Re: Sending SMS...

                        Fazer wrote:[color=blue]
                        > Can anyone point me to a way on how to send a SMS message using Python?[/color]

                        If you can read Java APIs, and don't mind working jython, then take a
                        look
                        at OpenSMPP, an open source implementation of the SMPP protocol.

                        The dates may look a little stale, i.e. last work done nearly two
                        years ago, but I'm fairly sure that most of the core stuff is working
                        and stable. OpenSMPP was written by Aldiscon (a Dublin company), who
                        were then taken over by Logica. Logica maintained the Open Source
                        committment.



                        Then there are various solutions where you can put a GSM card in your
                        PC, or cables to link an actual mobile handset to your PC, and rx/tx
                        SMS through those.

                        HTH,

                        --
                        alan kennedy
                        -----------------------------------------------------
                        check http headers here: http://xhaus.com/headers
                        email alan: http://xhaus.com/mailto/alan

                        Comment

                        • Peter Hansen

                          #13
                          Re: Sending SMS...

                          Jarek Zgoda wrote:[color=blue]
                          >
                          > Peter Hansen <peter@engcorp. com> pisze:
                          >[color=green][color=darkred]
                          > >> Also, be aware, that 1rstWap.com (and many other free SMS web gateways)
                          > >> require prior user registration, that can not be handled by program
                          > >> (they show user some picture with text that need to be entered
                          > >> correctly).[/color]
                          > >
                          > > Kind of defeats the value of suggesting that he use this as
                          > > a way of sending using Python, doesn't it?[/color]
                          >
                          > Yes - if this should be service/daemon app and you don't have a user
                          > that can perform prior registration.
                          >
                          > No - if this will be usual GUI app with user equipped with monitor,
                          > keyboard and mouse, sitting in front of it.[/color]

                          You're right.... Sorry, I misread your first post as suggesting
                          that each message, not just the registration, required the human
                          confirmation. (Yes, you were quite clear in what you wrote....
                          I must have been skimming or something. :-( )

                          -Peter

                          Comment

                          • Fazer

                            #14
                            Re: Sending SMS...

                            Guenther Starnberger <gst@sysfrog.or g> wrote in message news:<106355805 4.822575@newsma ster-03.atnet.at>...[color=blue]
                            > Fazer wrote:
                            >
                            > hello,
                            >[color=green]
                            > > Can anyone point me to a way on how to send a SMS message using Python?[/color]
                            >
                            > an alternative to the already suggested SMS-webgateway would be to use the
                            > ICQ-SMS-gateway ('worldwide' SMSs, no advertisements) .
                            >
                            > either use libicq2000[1] directly (but afaik there are no python bindings
                            > yet), or setup a local jabber[2] server with an aim-transport[3] to which
                            > you can connect with python by using jabberpy[4].
                            >
                            > cu
                            > /gst
                            >
                            > [1] http://libicq2000.sf.net/
                            > [2] http://www.jabber.org/about/overview.html
                            > [3] http://aim-transport.jabberstudio.org/
                            > [4] http://jabberpy.sourceforge.net/[/color]

                            Wow, thanks for the reply! It was really helpful. Exactly what I was looking for.

                            Comment

                            Working...