New Forum system requires email address which you used to apply for your account to replace your original username. Password stays the same.Please see this post for more details
http://forum.yealink.com/forum/showthread.php?tid=40344

Yealink Test Club has been officially launched. Please visit post below to get detail information. Come and join us!
http://forum.yealink.com/forum/announcements.php?aid=18

We just had the YMCS online and we are also working on the features plan on the future versions, in this regard we are need to hear your voice about the YMCS.
Please visit : http://forum.yealink.com/forum/showthread.php?tid=42322


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
V73 Remote Control Forwarding T41
Author Message
raphael Offline
Junior Member
**

Posts: 25
Joined: Mar 2014
Reputation: 0
Post: #1
V73 Remote Control Forwarding T41
We have installations with T41 and T46. Because the T41 has no forwarding key I made a small python script to Control to set that on the T41.

The problem is that the script is not working anymore on V73. Is there a better way to do that on V73 or any hint what can I do?

Thank you

def set_forward(phoneip, status=0, number='', password='admin'):
"""
Used to enable and disable the always forward settings.
We connect to the phone like a webbrowser and send the key/values via POST

phoneip = ip address of the yealink phone
status = 0=off 1=on
number = destination phone number
password = admin password for the web ui
"""
import cookielib, urllib2, urllib
cj = cookielib.CookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
opener.addheaders.append(('User-agent', 'Mozilla/4.0'))
referer = 'http://%s/servlet?p=login&q=loginForm&jumpto=status' % phoneip
opener.addheaders.append(('Referer', referer))
login_values = {'username' : 'admin',
'pwd' : password,
'acc' : '',
'jumpto' : 'status'
}
login_data = urllib.urlencode(login_values)
# do the first login
url = 'http://%s/servlet?p=login&q=login' % phoneip
resp = opener.open(url, login_data)

"""
values = {'ForwardMode': '0',
'AlwaysForwardSwitch': status,
'AlwaysForwardTarget': number,
'AlwaysForwardOnCode': '',
'AlwaysForwardOffCode': '*754',
'BusyForwardSwitch': '0',
'BusyForwardTarget': '',
'BusyForwardOnCode': '',
'BusyForwardOffCode': '',
'NoAnswerForwardSwitch': '0',
'NoAnswerForwardDelayTime': '2',
'NoAnswerForwardTarget': '',
'NoAnswerForwardOnCode': '',
'NoAnswerForwardOffCode': '',
'DNDEmergencySwitch': '0',
'DNDEmergencyNumberList': '',
'DndMode': '0',
'DndStatus': '0',
'DndOnCode': '',
'DndOffCode': ''}"""
values = {'ForwardMode': '0',
'AlwaysForwardSwitch': status
}
if number != '':
values['AlwaysForwardTarget'] = number
data = urllib.urlencode(values)
# send cmd
url = 'http://%s/servlet?p=features-forward&q=write&fwd=0&dnd=0' % phoneip
resp = opener.open(url, data)
02-27-2015 01:43 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Messages In This Thread
V73 Remote Control Forwarding T41 - raphael - 02-27-2015 01:43 AM

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  V73 - Remote Control fabgoa 5 6,122 02-18-2015 11:44 PM
Last Post: ModCraig

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication