Code:
xbmc_caller_picture = xbmc_caller_picture_path + self.event_callerid_num + ".jpg"I believe to make file extensions, but you would be limited to whatever extension you put there. (Might make it easier to keep track of it)
Josh
oneadvent
Fan Posts: 405 Joined: May 2011 Reputation: 0 |
2012-04-08 14:37
Post: #241
For the picture anyway you could change line 252 of bgservice.py to:
Code: xbmc_caller_picture = xbmc_caller_picture_path + self.event_callerid_num + ".jpg"I believe to make file extensions, but you would be limited to whatever extension you put there. (Might make it easier to keep track of it) Josh |
| find quote |
gillou666
Junior Member Posts: 15 Joined: Apr 2012 Reputation: 0 |
2012-04-15 06:21
Post: #242
Hi All,
for exit program in APPLE TV 2 with the button "menu" of apple remote change the line Code: ACTION_EXIT_SCRIPT = (9,10,247,275,61467,216,257,61448,)to Code: ACTION_EXIT_SCRIPT = (9,10,247,275,61467,216,257,92,61448,)in default.py
(This post was last modified: 2012-04-15 06:22 by gillou666.)
|
| find quote |
marigo
Junior Member Posts: 15 Joined: Mar 2012 Reputation: 0 |
2012-04-15 20:41
Post: #243
Hi All,
I've setup the pbx-add-on but can't get the incoming call pop-up working. I see the incoming call in the log file: Code: [XBMC PBX Addon]: > NewChannel()I think that it has got to do with the uniqueness of the ID which is not consistent. Can someone confirm that above logging causes that the incoming call pop-up is not working? And what to do about it? Edit: Summary call flow -Incoming call from my sip provider (via register command) triggers an extension; -Extension dials an user (client) I think this is why I can see that two unique channels are reported in the log file. The question remains; How can I get the incoming pop-up working?
(This post was last modified: 2012-04-15 21:58 by marigo.)
|
| find quote |
gillou666
Junior Member Posts: 15 Joined: Apr 2012 Reputation: 0 |
2012-04-17 01:10
Post: #244
Hi All,
Outbound Call work with Asterisk 10.1 on APPLE TV 2 the originate API function is the same in Astersik 1.8 ![]() My configuration work on SIP only. Example of Setting : Define here what to do with outbound calls PBX: Use extension : SIP/telefone-1 PBX: Use context : outbound-calls Example of extension.conf : [outbound-calls] exten => _X.,1,Dial(SIP/${EXTEN}@MyVoiceProvider) Example of sip.conf : [telefone-1] type=friend callerid="telefone-1" <1212> username=userNameForClient secret=passForClient host=dynamic context=outbound-calls ... |
| find quote |
gillou666
Junior Member Posts: 15 Joined: Apr 2012 Reputation: 0 |
2012-04-17 17:56
Post: #245
(2012-04-15 20:41)marigo Wrote: Hi All, What is your version of Asterisk ?? in the mine (10.1) I have a new Event : "Newstate" ... and in the bgservice.py there is not a subscripter to this event. |
| find quote |
gillou666
Junior Member Posts: 15 Joined: Apr 2012 Reputation: 0 |
2012-04-17 19:42
Post: #246
Complete manager log call (internal SIP) : Gilles Fixe <1214> ----> Gilles Iphone <1212> (without response of 1212) for Asterisk 10.1
Newchannel({'Context': 'appel-sortant', 'AccountCode': '', 'Func': '__ast_channel_alloc_ap', 'SequenceNumber': '13818', 'ChannelState': '0', 'Exten': '1212', 'CallerIDNum': '1214', 'Uniqueid': '1334680909.139', 'File': 'channel.c', 'CallerIDName': 'Gilles Fixe', 'Privilege': 'call,all', 'Line': '1353', 'Event': 'Newchannel', 'Channel': 'SIP/fixe-00000087' , 'ChannelStateDesc': 'Down'}), **{}) Newstate({'ConnectedLineNum': '', 'Func': 'ast_setstate', 'SequenceNumber': '13822', 'ChannelState': '4', 'CallerIDNum': '1214', 'Uniqueid': '1334680909.139', 'ConnectedLineName': '', 'File': 'channel.c', 'CallerIDName': 'Gilles Fixe', 'Privilege': 'call,all', 'Line': '7124', 'Event': 'Newstate', 'Channel': 'SIP/fixe-00000087' , 'ChannelStateDesc': 'Ring'}), **{}) Newexten({'Context': 'appel-sortant', 'Priority': '1', 'Func': 'pbx_extension_helper', 'SequenceNumber': '13823', 'Uniqueid': '1334680909.139', 'Extension': '1212', 'Application': 'Dial', 'File': 'pbx.c', 'Privilege': 'dialplan,all', 'Line': '4389', 'AppData': 'SIP/gillesIphone,20,m', 'Event': 'Newexten', 'Channel': 'SIP/fixe-00000087' }), **{}) Newchannel({'Context': 'appel-sortant', 'AccountCode': '', 'Func': '__ast_channel_alloc_ap', 'SequenceNumber': '13829', 'ChannelState': '0', 'Exten': '', 'CallerIDNum': '1212', 'Uniqueid': '1334680909.140', 'File': 'channel.c', 'CallerIDName': 'Gilles Iphone', 'Privilege': 'call,all', 'Line': '1353', 'Event': 'Newchannel', 'Channel': 'SIP/gillesIphone-00000088' , 'ChannelStateDesc': 'Down'}), **{}) Dial({'ConnectedLineNum': '<unknown>', 'Func': 'senddialevent', 'SequenceNumber': '13832', 'Destination': 'SIP/gillesIphone-00000088', 'CallerIDNum': '1214', 'DestUniqueID': '1334680909.140', 'SubEvent': 'Begin', 'ConnectedLineName': '<unknown>', 'UniqueID': '1334680909.139', 'File': 'app_dial.c', 'CallerIDName': 'Gilles Fixe', 'Privilege': 'call,all', 'Line': '810', 'Event': 'Dial', 'Channel': 'SIP/fixe-00000087' , 'Dialstring': 'gillesIphone'}), **{}) Newstate({'ConnectedLineNum': '1214', 'Func': 'ast_setstate', 'SequenceNumber': '13834', 'ChannelState': '5', 'CallerIDNum': '1212', 'Uniqueid': '1334680909.140', 'ConnectedLineName': 'Gilles Fixe', 'File': 'channel.c', 'CallerIDName': 'Gilles Iphone', 'Privilege': 'call,all', 'Line': '7124', 'Event': 'Newstate', 'Channel': 'SIP/gillesIphone-00000088' , 'ChannelStateDesc': 'Ringing'}), **{}) Hangup({'ConnectedLineNum': '1214', 'Cause-txt': 'Normal Clearing', 'Func': 'ast_hangup', 'SequenceNumber': '13841', 'CallerIDNum': '1212', 'Uniqueid': '1334680909.140', 'ConnectedLineName': 'Gilles Fixe', 'File': 'channel.c', 'CallerIDName': 'Gilles Iphone', 'Privilege': 'call,all', 'Line': '2896', 'Cause': '16', 'Event': 'Hangup', 'Channel': 'SIP/gillesIphone-00000088' }), **{}) Dial({'Func': 'senddialendevent', 'SequenceNumber': '13843', 'DialStatus': 'NOANSWER', 'SubEvent': 'End', 'UniqueID': '1334680909.139', 'File': 'app_dial.c', 'Privilege': 'call,all', 'Line': '820', 'Event': 'Dial', 'Channel': 'SIP/gillesIphone-00000088' }), **{}) SoftHangupRequest({'Func': 'ast_softhangup', 'SequenceNumber': '13844', 'Uniqueid': '1334680909.139', 'File': 'channel.c', 'Privilege': 'call,all', 'Line': '2731', 'Cause': '16', 'Event': 'SoftHangupRequest', 'Channel': 'SIP/fixe-00000087' }), **{}) Hangup({'ConnectedLineNum': '1212', 'Cause-txt': 'Unknown', 'Func': 'ast_hangup', 'SequenceNumber': '13845', 'CallerIDNum': '1214', 'Uniqueid': '1334680909.139', 'ConnectedLineName': 'Gilles Iphone', 'File': 'channel.c', 'CallerIDName': 'Gilles Fixe', 'Privilege': 'call,all', 'Line': '2896', 'Cause': '0', 'Event': 'Hangup', 'Channel': 'SIP/fixe-00000087' }), **{})
(This post was last modified: 2012-04-17 19:43 by gillou666.)
|
| find quote |
gillou666
Junior Member Posts: 15 Joined: Apr 2012 Reputation: 0 |
2012-04-18 20:54
Post: #247
Hi All,
Patch code for Asterisk 10.1 (Debian Squeeze) : work : play/pause video, contact image, redirect extension, call internal(same network SIP)/external not work : filter by ALERT_INFO in bgservice.py in get_incoming_call(object) : Comment the line in def __init__(self) Code: self.events.subscribe('Newchannel',self.NewChannel)Comment the method NewCallerID, Newchannel in get_incoming_call(object) Add the line in def __init__(self) Code: self.events.subscribe('Newstate',self.Newstate)Add the method Code: def Newstate(self,pbx,event):set the param "XBMC: Initiate upon Asterisk NewChannel State" to "Ring" it's done !!
(This post was last modified: 2012-04-18 21:06 by gillou666.)
|
| find quote |
peeedeee
Junior Member Posts: 8 Joined: Jun 2010 Reputation: 0 |
2012-04-21 23:25
Post: #248
...Help!!!
This is the fifth time I'm trying to get this script working, and it alway hangs on "syntax error: line 2" And nasty as astisk can be to configure, is this error for me to debug? The xbmc-pbx-addon.php Reports: Able to write into VoiceMail (VM) directory ERROR (/var/spool/asterisk/voicemail/) XBMC log: [XBMC PBX Addon]: PATH: /home/xbmc/.xbmc/addons/script.xbmc-pbx-addon NOTICE: [XBMC PBX Addon]: Launching GUI... NOTICE: [XBMC PBX Addon]: __init__() ERROR: Control 120 in window 13000 has been asked to focus, but it can't NOTICE: [XBMC PBX Addon]: > onInit() NOTICE: [XBMC PBX Addon]: > skinSetup() NOTICE: [XBMC PBX Addon]: > getInfo() NOTICE: [XBMC PBX Addon]: >> Asterisk 1.8 NOTICE: [XBMC PBX Addon]: >> Asterisk 1.8.7.1 built by xxx @ xxx.linux-appliance.net on a i686 running Linux on 2011-12-10 23:20:56 UTC ( NOTICE: [XBMC PBX Addon]: >> http://localhost/test/xbmc-pbx-addon.php?vm&cdr&mailbox=77&vmcontext=default NOTICE: [XBMC PBX Addon]: >> Notification: syntax error: line 2, column 0 APACHE error.log: [error] [client 127.0.0.1] PHP Warning: Invalid argument supplied for foreach() in /var/www/test/xbmc-pbx-addon.php on line 320 [error] [client 127.0.0.1] PHP Warning: array_multisort(): Argument #3 is expected to be an array or a sort flag in /var/www/test/xbmc-pbx-addon.php on line 323 [error] [client 127.0.0.1] PHP Warning: array_slice() expects parameter 1 to be array, null given in /var/www/test/xbmc-pbx-addon.php on line 204 [error] [client 127.0.0.1] PHP Warning: array_reverse() expects parameter 1 to be array, null given in /var/www/test/xbmc-pbx-addon.php on line 205 [error] [client 127.0.0.1] PHP Warning: DOMDocument::saveXML(): xmlEscapeEntities : char out of range in /var/www/test/xbmc-pbx-addon.php on line 229 Could somebody push me in the right direction
|
| find quote |
hmr
Member Posts: 83 Joined: Jun 2006 Reputation: 0 Location: Argentina |
2012-04-22 23:21
Post: #249
(2012-04-18 20:54)gillou666 Wrote: Hi All, Hi gillou666, nice work! I don't have an Asterisk 10 to test it. Could you please test the following ? Get a fresh copy of bgservice.py and just add a new method: add this line in def __init__(self) Code: self.events.subscribe('Newstate',self.NewCallerID) # Asterisk 10.1You can download bgservice.py from here: http://code.google.com/p/xbmc-pbx-addon/...service.py Thank you! Hernán.- (2012-04-21 23:25)peeedeee Wrote: ...Help!!! Hello!, it seems there is some issues with path to files. Please make sure you follow all steps detailed here http://code.google.com/p/xbmc-pbx-addon/...stallation and here http://code.google.com/p/xbmc-pbx-addon/...leshooting If you are still having issues please let us know as much information as you can, i.e. Are you using latest version of this script ? which XBMC version are you running ? Thanks! Hernán.-
(This post was last modified: 2012-04-22 23:29 by hmr.)
|
| find quote |
peeedeee
Junior Member Posts: 8 Joined: Jun 2010 Reputation: 0 |
2012-04-23 01:35
Post: #250
Update:
Solved the: PHP Warning: DOMDocument::saveXML(): xmlEscapeEntities : char out of range in /var/www/test/xbmc-pbx-addon.php on line 229 Because i didn't had a Master.crv file I copied it from my router running asterisk, to my server (running xbmc and asterisk) and its probably caused by the settings. usegmtime=yes ; log date/time in GMT. Default is "no" loguniqueid=yes ; log uniqueid. Default is "no" loguserfield=yes ; log user field. Default is "no" I dialed to my asterisk server, (on my server) and there was a different notation in the Master.crv After that i tried some other settings, and again there where less errors. I still get the other errors (apache.log) so i think it's probably caused by the same reason. Could someone where the plugin works, post his cdr.conf? |
| find quote |