Announcement

Collapse
No announcement yet.

Event that phones a number

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

    Event that phones a number

    What scripts are available that can phone a number PSTN and announce an event.

    HS cann and announces a reminder ( scheduled important event)

    There were some interactive phone sessions, have any be setup to perform this type of activity?

    Thanks in advance
    HS3 Standard Edition 3.0.0.258

    #2
    Any HomeSeer event can place a SIP Call (to a PSTN number if you have a real SIP provider).

    In the HomeSeer event action you can find a "Place SIP Call" option. Alternatively you can use scripting to place a call:

    Here is a talking clock example:
    &hs.plugin("SIP Connector").PlaceCall "phone_number", "sip_talking_clock.vb"


    You have to create the IVR script sip_talking_clock.vb in HomeSeer 2\Scripts

    Quote:
    <TABLE cellSpacing=0 cellPadding=3 width="100%" border=0><TBODY><TR><TD class=alt2 style="BORDER-RIGHT: 1px inset; BORDER-TOP: 1px inset; BORDER-LEFT: 1px inset; BORDER-BOTTOM: 1px inset">Imports HSPI_SIP
    Sub Init( ByVal c as SipCall )
    SpeakTime( c )
    End Sub

    Sub CallConnected( ByVal c as SipCall )
    SpeakTime( c )
    c.Hangup()
    End Sub

    Sub SpeakTime( ByVal c as SipCall )
    Dim curDate as DateTime = DateTime.Now
    Dim strTime as String = "The time is " & curDate.ToString("%h") & " hour"
    If curDate.Hour > 1 Then strTime = strTime & "s"
    strTime = strTime & " " & curDate.ToString("%m") & " minute"
    If curDate.Minute > 1 Then strTime = strTime & "s"
    strTime = strTime & " " & curDate.ToString("%s") & " second"
    If curDate.Second > 1 Then strTime = strTime & "s"
    If curDate.Hour < 12 Then
    strTime = strTime & " A M"
    Else
    strTime = strTime & " P M"
    End If
    c.SpeakTextWait( strTime )
    End Sub

    Sub CallHungup( ByVal c as SipCall )
    End Sub </TD></TR></TBODY></TABLE>
    You can find many more sample IVR scripts here:
    http://board.homeseer.com/showthread.php?t=116898

    Best regards,

    stipus
    --
    stipus

    Comment


      #3
      I use the SIP connector to call me if the geomagnetic activity goes nuts during the night so I won't miss any auroras. It works great!

      &hs.plugin("SIP Connector").PlaceCallOnLine "Heather SER", myphonenumber@mySERaddress, "sip_outgoingk.vb"


      sip_outgoingk.vb:

      Imports HSPI_SIP
      Sub Init( ByVal c as SipCall )
      SpeakWeather( c )
      End Sub
      Sub CallConnected( ByVal c as SipCall )
      SpeakWeather( c )
      End Sub
      Sub SpeakWeather( ByVal c as SipCall )
      Dim kindex As String = hs.DeviceString("x1")
      Dim IMF As String = hs.DeviceString("X8")

      Dim weather as String = "Warning, Warning. Warning. This is Heather, with a space weather alert. Warning. This is a space weather alert. The current K index is a " & kindex & ". The interplanetary magnetic field is B Z" & IMF
      c.SpeakTextWait(weather)
      c.Hangup()
      End Sub
      Sub CallHungup( ByVal c as SipCall )
      End Sub
      ______________________________
      Skibumsplace - Locate Me

      Comment


        #4
        HS calls you

        Thanks Stipus.
        I am dealing with HS memory problems recently and am trying to get handle on adding plugins and the geturl and get urlie issues.... seems that SIP and something in HS are not playing nice with each other on my system.

        Stipus- did you have a level of hardware that was needed for HS, HSP, and SIP to all work together? I turned off logging a few months ago and that helped somewhat but with new additions... I am getting into trouble with the CPU 667mhz and less that 1/2 G - memory. Your experience on this is welcome... anyone?

        Skybum ... really

        I have a few events that if I was phone called on;

        **

        Someone arrived at home and I need to give access to. HSP could call me and in a question answer session, I open up the garage door / barn.

        weather alert notifications "do you want to hear details" or acknowledge receipt and the event will not try again in 5 minutes. notify

        receipt of activity in HS environment. pool drained, windows opened, activity in barn.

        HSP calls and asks do you want me to turn on XYZ ? yes / no.

        HSP calls and asks if I will be home early today to turn on / off sprinklers, HVAC, lighting, announcements when I arrive.

        I have a few reach-outs from HS.

        **

        is the

        &hs.plugin("SIP Connector").PlaceCallOnLine "Heather SER", myphonenumber@mySERaddress, "sip_outgoingk.vb"


        ??
        what are the values indicated here?

        "Heather SER",
        myphonenumber@mySERaddress,

        I like the idea to HS place call and connect 2 lines "conference" them.

        Under this condition would HSP be able to listen for commands when a conference call is made?

        Thanks All.
        HS3 Standard Edition 3.0.0.258

        Comment


          #5
          Originally posted by Richard View Post
          Thanks Stipus.
          Stipus- did you have a level of hardware that was needed for HS, HSP, and SIP to all work together? I turned off logging a few months ago and that helped somewhat but with new additions... I am getting into trouble with the CPU 667mhz and less that 1/2 G - memory. Your experience on this is welcome... anyone?
          I have been stress testing the SIP plugin on a 600Mhz laptop... it was running but everything was really slow, and voice quality wasn't very good.

          My production HS2 server is an AMD Athlon 3500+ with 512MB of RAM, and it works well.

          I have a few events that if I was phone called on;

          **

          Someone arrived at home and I need to give access to. HSP could call me and in a question answer session, I open up the garage door / barn.

          weather alert notifications "do you want to hear details" or acknowledge receipt and the event will not try again in 5 minutes. notify

          receipt of activity in HS environment. pool drained, windows opened, activity in barn.

          HSP calls and asks do you want me to turn on XYZ ? yes / no.

          HSP calls and asks if I will be home early today to turn on / off sprinklers, HVAC, lighting, announcements when I arrive.
          Yes you can do all this with the SIP plugin and a bit of scripting. Similar scripts are already on production, and you can find samples on the forum.

          &hs.plugin("SIP Connector").PlaceCallOnLine "Heather SER", myphonenumber@mySERaddress, "sip_outgoingk.vb"


          ??
          what are the values indicated here?

          "Heather SER",
          myphonenumber@mySERaddress,
          Heather SER is the name of the SIP Line (skibum uses several SIP lines so when you want to call, you have to select which line you want to use).

          myphonenumber@mySERaddress is skibum's SIP address. A SIP address is a bit like an email address (user@domain). The user part of the address is usualy a real phone number.

          I like the idea to HS place call and connect 2 lines "conference" them.

          Under this condition would HSP be able to listen for commands when a conference call is made?
          You can connect two calls, but it's not really a conference... it's a call transfer from one call to the other. Once the call has been transferred, the SIP plugin cannot interact anymore.

          I'm working on a new version of the SIP Library with Conferences enabled, and better call transfers. However I can't give a date.


          Thanks All.
          --
          stipus

          Comment


            #6
            testing the outbound call question

            Sorting out the syntax and using the example: I want to test outgoing to test account on XLite soft phone.

            Using the free test example ( that I set up) the protocol of username-extension as in stipus-601 (HS calls the softphone)

            stipus-601@pbxes.org

            "myphonenumber@mySERaddress is skibum's SIP address. A SIP address is a bit like an email address (user@domain). The user part of the address is usualy a real phone number."

            And from the script:
            "Heather SER",
            myphonenumber@mySERaddress,

            Phone line is ? so... what would the script values be using the Free example ?

            And from the script:

            "????",
            ????@????,


            Richard G.
            HS3 Standard Edition 3.0.0.258

            Comment


              #7
              You also have a much simpler interface from homeseer event action. Just create a new HS Event, select the "Place SIP Call" action, and fill in the outgoing sip address and the outgoing script.

              If you want to try a sample outgoing script with user interaction, please see the sip_fun.vb script post #21 of this thread:
              http://board.homeseer.com/showthread...=116898&page=2

              If your pbxes.org account name is richard, and if under this account you created a 601 line, then the sip address is richard-601@pbxes.org

              Regards,

              stipus
              --
              stipus

              Comment


                #8
                Ok

                Great and thanks for the quick response. I am going to try the test SIP provider then grow to PSTN. I have been looking at the scripts, and my level of expertise is review and modify.... so any new or additional scripts for features please feel free to post.

                *
                Further, I wanted to alert in local home / voice message but if not acknowledged after period of time make a phone call and send email reminder. Can HST have ability to ring internal phones numbers and still use SIP for outgoing? (this might be too much)

                Set up a mail trigger that generates a phone call with my choices of action;
                call and transfer a phone call, call and leave a message with someone (interactive, make an appointment) a girl Friday of sorts.

                Thanks !
                HS3 Standard Edition 3.0.0.258

                Comment


                  #9
                  My outgoing call problems.


                  5/25/2007 5:10:51 PM Info Event Trigger "Call Xlite"
                  5/25/2007 5:10:51 PM SIP#FREE1 Connecting to : home-601...
                  5/25/2007 5:10:53 PM SIP#FREE1 CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()
                  5/25/2007 5:11:12 PM Info Web Server authorized local login successful from: 127.0.0.1 User: default
                  5/25/2007 5:11:35 PM SIP#FREE1 CALL#1 SCRIPT:sip_incoming.vb:IncomingCall(home-601)
                  5/25/2007 5:11:36 PM SIP#FREE1 CALL#1 SCRIPT:sip_incoming.vb:Ringing(1)
                  5/25/2007 5:11:41 PM SIP#FREE1 CALL#1 SCRIPT:sip_incoming.vb:Ringing(2)
                  5/25/2007 5:11:46 PM SIP#FREE1 CALL#1 SCRIPT:sip_incoming.vb:Ringing(3)
                  5/25/2007 5:11:51 PM SIP#FREE1 CALL#1 SCRIPT:sip_incoming.vb:Ringing(4)
                  5/25/2007 5:11:51 PM SIP#FREE1 CALL#1 SCRIPT:sip_unknown.vb:CallConnected(home-601)
                  5/25/2007 5:11:57 PM Info Web Server authorized local login successful from: 192.168.0.8 User: default
                  5/25/2007 5:11:57 PM SIP#FREE1 CALL#1 SCRIPT:sip_unknown.vb:HeardDTMF(9,9)
                  5/25/2007 5:11:58 PM SIP#FREE1 CALL#1 SCRIPT:sip_unknown.vb:HeardDTMF(1,9x)
                  5/25/2007 5:11:59 PM SIP#FREE1 CALL#1 SCRIPT:sip_unknown.vb:HeardDTMF(2,9xx)
                  5/25/2007 5:12:00 PM SIP#FREE1 CALL#1 SCRIPT:sip_unknown.vb:HeardDTMF(9,9xx)
                  5/25/2007 5:12:00 PM SIP#FREE1 CALL#1 SCRIPT:sip_admin.vb:Init(homeseerva-601)
                  5/25/2007 5:12:14 PM Info Web Server authorized local login successful from: 127.0.0.1 User: default
                  5/25/2007 5:12:16 PM SIP#FREE1 CALL#1 SCRIPT:sip_admin.vb:CallHungup(homeseerva-601)
                  5/25/2007 5:12:26 PM Info Web Server authorized local login successful from: 192.168.0.8 User: default
                  5/25/2007 5:12:32 PM Info Event Trigger "Call Xlite"
                  5/25/2007 5:12:33 PM SIP#FREE1 Connecting to : home-601...
                  5/25/2007 5:12:34 PM SIP#FREE1 CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()
                  5/25/2007 5:13:15 PM Info Web Server authorized local login successful from: 127.0.0.1 User: default
                  5/25/2007 5:13:23 PM Info Web Server authorized local login successful from: 192.168.0.8 User: default
                  5/25/2007 5:13:27 PM SIP#FREE1 Connecting to : home-601...
                  5/25/2007 5:13:28 PM SIP#FREE1 CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()

                  I am not getting any further .....

                  ? Suggestions

                  ? Does HSP have to be enabled to use outgoing features and scripts ( I do not think so)

                  ? how can I trace or track the progress ?

                  Xlite does not get a call but xlite to HS works...just tried it in tests.

                  ? where does HSP get enabled.... disabled .... can not find the selection .
                  HS3 Standard Edition 3.0.0.258

                  Comment


                    #10
                    Originally posted by Richard View Post
                    My outgoing call problems.
                    5/25/2007 5:13:27 PM SIP#FREE1 Connecting to : home-601...
                    5/25/2007 5:13:28 PM SIP#FREE1 CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()

                    I am not getting any further .....

                    ? Suggestions
                    ? Does HSP have to be enabled to use outgoing features and scripts ( I do not think so)
                    No there is no need for HS Phone to be enabled to use outgoing calls.


                    ? how can I trace or track the progress ?
                    Just enable all debug modes in the plugin web configuration interface, then try again.


                    Xlite does not get a call but xlite to HS works...just tried it in tests.
                    That's really weird. It should work both ways.


                    ? where does HSP get enabled.... disabled .... can not find the selection .
                    --
                    stipus

                    Comment


                      #11
                      Hi Richard

                      Can you porvide additional information about your VOIP setup?
                      What is HS connected to?
                      What is X-Lite connected to?
                      Also what version of X-Lite are you using?
                      Is X-Lite local to the HS machine?
                      Lastly what does the call out event look like?

                      Thanks
                      ______________________________
                      Skibumsplace - Locate Me

                      Comment


                        #12
                        debug outputs call does not complete ??

                        Hello Skibum, thanks for checking this out, should work !

                        Stipus- if you have any behind the plugin ideas, please help.


                        Originally posted by Skibum View Post
                        Hi Richard

                        Can you porvide additional information about your VOIP setup?
                        What is HS connected to?
                        What is X-Lite connected to?
                        Also what version of X-Lite are you using?
                        Is X-Lite local to the HS machine?
                        Lastly what does the call out event look like?

                        Thanks
                        setup 2 free accounts , I can call HS via xlite version 3.0 345 build
                        local xlite ran HS from Hs server to xlite PC.

                        Xlite to HS server works, and HSP picks up and access is fine, I use HSP for call into.

                        Problem is not outgoing from Plugin side home-600 to X lite home-601


                        debug log



                        5/27/2007 12:15:14 PM SIP Debug SIP Connector: Debug Mode activated. Waiting 0 secs...
                        5/27/2007 12:15:14 PM SIP Debug SIP Connector: ReInitializing SipxTapi. Primary identity= TcpPort=5060 UdpPort=5060 TlsPort=5061 RtpPortStart=9000 BindAddress=0.0.0.0 UseSequentialPorts=False
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: Configuring register expiration to 3600 secs.
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: Enabling ICE.
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: Enabling STUN. StunServer=stun.counterpath.net StunPort=3478 StunKeepAliveSec=28
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: ContactId=1 Type=Local TransportType=udp Interface=eth0 Ip=192.168.0.2 Port=5060
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: ContactId=2 Type=Local TransportType=tcp Interface=eth0 Ip=192.168.0.2 Port=5060
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: ContactId=3 Type=NatMapped TransportType=udp Interface=eth0 Ip=24.125.138.228 Port=18432
                        5/27/2007 12:15:23 PM SIP Debug SIP Connector: Creating new line FREE1. LocalContactId=0
                        5/27/2007 12:15:24 PM SIP Debug SIP Connector: Setting-up line FREE1 credentials. AuthUserName=home AuthDomain=pbxes.org
                        5/27/2007 12:15:24 PM SIP Debug SIP#FREE1: Registering Homeseer . LocalContactId=0
                        5/27/2007 12:15:26 PM SIP Debug SIP Connector: Adding 10s NAT keepalive to pbxes.org
                        5/27/2007 12:15:26 PM SIP Debug SIP Connector: Ready
                        5/27/2007 12:16:03 PM Info Event Trigger "Call Xlite"
                        5/27/2007 12:16:03 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#8): Dialtone Normal
                        5/27/2007 12:16:03 PM SIP Debug SIP#FREE1: Connecting to : home-601...
                        5/27/2007 12:16:07 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#8): RemoteOffering Normal
                        5/27/2007 12:16:07 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#8): Disconnected Unknown
                        5/27/2007 12:16:07 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#8): Destroyed Normal
                        5/27/2007 12:16:07 PM SIP Debug SIP#FREE1: CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()


                        is pbxes setup not accepting an outgoing for some reason....? the log says is sees incoming

                        log shows connection
                        2007-05-27 12:16:07 home-600 600 ext-local 0 sec
                        2007-05-27 12:16:07 home-600 home-601 pbxes.org from-internal-cont 0 sec
                        HS3 Standard Edition 3.0.0.258

                        Comment


                          #13
                          I had the same problem the first time I tried with pbxes.org. You have to enable incoming calls in the pbxes.org configuration:

                          Can you double-check this part of the tutorial ?

                          > In the left menu choose:
                          > Incoming Calls
                          > Choose Extension HomeSeer <600> for both regular and after hours
                          > SUBMIT Then click on the red bar.
                          --
                          stipus

                          Comment


                            #14
                            Outgoing call on pbxes.com does not work

                            Originally posted by stipus View Post
                            I had the same problem the first time I tried with pbxes.org. You have to enable incoming calls in the pbxes.org configuration:

                            Can you double-check this part of the tutorial ?

                            > In the left menu choose:
                            > Incoming Calls
                            > Choose Extension HomeSeer <600> for both regular and after hours
                            > SUBMIT Then click on the red bar.
                            ?
                            Might be a provider setting ?

                            ?
                            What is required for outgoing call ( from HS to Xlite on another PC ?)

                            Incoming works OK



                            Here is debug on another test.

                            5/27/2007 7:05:03 PM Info Event Trigger "Call Xlite"
                            5/27/2007 7:05:03 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#2): Dialtone Normal
                            5/27/2007 7:05:03 PM SIP Debug SIP#FREE1: Connecting to : home-601...
                            5/27/2007 7:05:04 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#2): RemoteOffering Normal
                            5/27/2007 7:05:05 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#2): Disconnected Unknown
                            5/27/2007 7:05:05 PM SIP Debug CALL EVENT ON LINE FREE1 (Call#2): Destroyed Normal
                            5/27/2007 7:05:05 PM SIP Debug SIP#FREE1: CALL#1 SCRIPT:sip_talking_clock.vb:CallHungup()

                            Does this provide any information ?
                            HS3 Standard Edition 3.0.0.258

                            Comment


                              #15
                              Yes but the provider setting for the X-Lite side also has to allow incoming.

                              HS outgoing ---> incoming X-Lite

                              So you have to go to the pbxes.org configuration and allow incoming for the 601 extension.

                              > In the left menu choose:
                              > Incoming Calls
                              > Choose Extension <601> for both regular and after hours
                              > SUBMIT Then click on the red bar.
                              --
                              stipus

                              Comment

                              Working...
                              X