Using Asterisk to control VDR or other device... - UkCvs.org
 

Go Back   UkCvs.org > VOIP Section > VOIP

VOIP Voice Over Internet Protocol forum

Reply
 
LinkBack Thread Tools Display Modes
Old 26-04-2009, 12:24 PM   #1 (permalink)
Moderator
UkCvs Senior Member
 
mike557's Avatar
 
Join Date: Apr 2009

Location: Surrey
Posts: 174
iTrader: (0)
Casino cash: $120545
Thanks: 33
Thanked 188 Times in 100 Posts
Nominated 6 Times in 1 Post
Nominated TOTW/F/M Award(s): 1
Groans: 0
Groaned at 0 Times in 0 Posts
Default Using Asterisk to control VDR or other device...

I feed my VDR picture throughout the house via a modulator, but wanted to be able to alter the channels while in other rooms.
The web interface (vdradmin) works well with a wireless tablet but it is not practical to carry around all the time.
The solution was to use my PABX (Asterisk), which runs on the VDR server. Now I can pick up any phone and dial extension 837 (vdr).

The PABX gives a beep and I then use the keys on the phone to navigate. By pressing 0 on the phone puts me into number mode and after 2 seconds the system reverts back to navigation mode.

If anyone else is using Asterisk and VDR, then this may be a handy dial string to include in extensions_custom.conf.

exten => 837,1,Answer()
exten => 837,n(start),Read(APCODE,beep,1)
exten => 837,n,GotoIf($[${APCODE} = 0]?vdr-numb,1:vdr-navi,1)

exten => vdr-numb,1,Read(APCODE,number,1,,,2)
exten => vdr-numb,n,GotoIf($[${APCODE} < 0]:?837,start)
exten => vdr-numb,n,System(/usr/local/bin/svdrpsend.pl HITK "${APCODE}")
exten => vdr-numb,n,Goto(vdr-numb,1)

exten => vdr-navi,1,Set(APCODE=${IF($[${APCODE} = 1]?Green:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 2]?Up:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 3]?Yellow:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 4]?Left:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 5]?Ok:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 6]?Right:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 7]?Menu:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 8]?Down:${APCODE})})
exten => vdr-navi,n,Set(APCODE=${IF($[${APCODE} = 9]?Back:${APCODE})})
exten => vdr-navi,n,System(/usr/local/bin/svdrpsend.pl HITK "${APCODE}")
exten => vdr-navi,n,Goto(837,start)

Now I can use my cordless phones (connected to a PAP2 box) to control the
VDR completely.

The important line of code if you are unfamiliar with Asterisk is

exten => vdr-numb,n,System(/usr/local/bin/svdrpsend.pl HITK "${APCODE}")

This is running a program (svdrpsend.pl) and passing to it the code entered on the phone. This could be easily modified to send the data to a dbox2/Dream

Hope that helps someone
mike557 is offline   Reply With Quote
The Following 4 Users Say Thank You to mike557 For This Useful Post:
FreddyFr0g (27-04-2009), nj2006 (21-06-2009), PaphosAL (04-05-2009), pt-1 (26-04-2009)
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 04:18 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Any information provided on this site is not guaranteed in any way. Some articles may discuss topics that are illegal, so this information is provided for educational purposes only, use at your own risk !! Ukcvs.org cannot be held responsible for the content of any post on this forum.