[RELEASE] XBMC PBX Addon - Home Telephony Experience using Asterisk

  Thread Rating:
  • 3 Votes - 4.67 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #41
Updated changelog on first post and uploaded newer screenshots to google-code page, together with v0.0.6 package.

Regards!
Hernan.-
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #42
This looks like a great plugin!... Big Grin I have set it up per the information provided but having a problem when accessing/running the module as it locks up XBMC and I receive a message at the bottom of the screen that appears truncated... (-5, No address associated w

I have tested the server side of things with...

https://xxx.xxx.xxx.xxx/xbmc/xbmc_pbx/xb...on.php?cdr WORKS (Gives me CDR Info)

https://xxx.xxx.xxx.xxx/xbmc/xbmc_pbx/xb...format=wav WORK (Pull VM Down)

So it has to be something on the XBMC side.

[UPDATE} Ok... got the plugin to the point where it fires up and doesn't lock up XBMC and is talking with the PBX and it is pulling vm info down... but it comes back with a "syntax error line 1" after telling me it has 2 vm's.

Debug INFO:

12:35:42 T:2971896688 M:284372992 NOTICE: [XBMC PBX Addon]: Launching GUI...
12:35:42 T:2971896688 M:284372992 INFO: Loading skin includes from /home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/includes.xml this file is NOT there (was not in the dist i got... ??
12:35:42 T:2971896688 M:284372992 INFO: Error loading includes.xml file (/home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/includes.xml): Failed to open file (row=0, col=0)
12:35:42 T:2971896688 M:284213248 NOTICE: [XBMC PBX Addon]: __init__()
12:35:42 T:3078109040 M:284213248 DEBUG: Activating window ID: 13000
12:35:42 T:3078109040 M:284213248 DEBUG: Checking if window ID 13000 is locked.
12:35:42 T:3078109040 M:284213248 DEBUG: ------ Window Deinit (MyScripts.xml) ------
12:35:43 T:3078109040 M:284213248 DEBUG: ------ Window Init (/home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/PAL/script_xbmc-pbx-addon_main.xml) ------
12:35:43 T:3078109040 M:284213248 INFO: Loading skin file: /home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/PAL/script_xbmc-pbx-addon_main.xml
12:35:43 T:3078109040 M:284213248 DEBUG: Load /home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/PAL/script_xbmc-pbx-addon_main.xml: 41.60ms
12:35:43 T:3078109040 M:284213248 DEBUG: Alloc resources: 57.23ms (42.23 ms skin load)
12:35:43 T:3078109040 M:284213248 DEBUG: CGUIMediaWindow::GetDirectory (?)
12:35:43 T:3078109040 M:284213248 DEBUG: ParentPath = []
12:35:43 T:3078109040 M:284213248 ERROR: GetDirectory - Error getting ?
12:35:43 T:3078109040 M:284213248 ERROR: CGUIMediaWindow::GetDirectory(?) failed
12:35:43 T:2971896688 M:284213248 NOTICE: [XBMC PBX Addon]: > onInit()
12:35:43 T:2971896688 M:284213248 INFO: Loading skin file: DialogProgress.xml
12:35:43 T:2971896688 M:284213248 DEBUG: Load DialogProgress.xml: 3.44ms
12:35:43 T:2971896688 M:284213248 DEBUG: ------ Window Init (DialogProgress.xml) ------
12:35:43 T:2971896688 M:284213248 DEBUG: Alloc resources: 1.11ms (0.00 ms skin load)
12:35:43 T:2971896688 M:292405248 NOTICE: [XBMC PBX Addon]: > skinSetup()
12:35:43 T:2971896688 M:292405248 NOTICE: [XBMC PBX Addon]: > getInfo()
12:35:43 T:2971896688 M:292405248 NOTICE: [XBMC PBX Addon]: >> Asterisk 1.4.28 built by root @ rpmbuild32.elastix.palosanto.com on a i686 running Linux on 2010-01-06 16:46:18 UTC
12:35:43 T:2971896688 M:292405248 DEBUG: xbp_dlopen loading python lib /usr/share/xbmc/system/python/python24.zip/pyexpat.so. flags: 2
12:35:44 T:2971896688 M:292405248 DEBUG: Loading: /home/tshepherd/.xbmc/temp/pyexpat.so
12:35:44 T:2971896688 M:292405248 DEBUG: RegisterExtensionLib, adding pyexpat.so (0xb99c4d0)
12:35:44 T:2971896688 M:292405248 DEBUG: xbp_dlsym - load symbol initpyexpat
12:35:44 T:2971896688 M:292405248 NOTICE: [XBMC PBX Addon]: >> Notification: syntax error: line 1, column 49
12:35:44 T:3078109040 M:292405248 DEBUG: ------ Window Init (DialogKaiToast.xml) ------
12:35:44 T:3078109040 M:292405248 DEBUG: Alloc resources: 0.00ms (0.00 ms skin load)
12:35:44 T:2971896688 M:292405248 NOTICE: [XBMC PBX Addon]: >> Done.
12:35:44 T:3078109040 M:292397056 DEBUG: ------ Window Deinit (DialogProgress.xml) ------
12:35:49 T:3078109040 M:295276544 DEBUG: ------ Window Deinit (DialogKaiToast.xml) ------
12:35:49 T:3078109040 M:295276544 DEBUG: SDLKeyboard: scancode: 9, sym: 27, unicode: 27, modifier: 0
12:35:49 T:3078109040 M:295276544 DEBUG: OnKey: 61467 pressed, action is 10
12:35:49 T:3078109040 M:295276544 DEBUG: Activating window ID: 10020
12:35:49 T:3078109040 M:295276544 DEBUG: Checking if window ID 10020 is locked.
12:35:49 T:3078109040 M:295276544 DEBUG: ------ Window Deinit (/home/tshepherd/.xbmc/scripts/My Scripts/xbmc-pbx-addon/resources/skins/Default/PAL/script_xbmc-pbx-addon_main.xml) ------
12:35:49 T:3078109040 M:295276544 DEBUG: ------ Window Init (MyScripts.xml) ------
12:35:49 T:3078109040 M:295276544 INFO: Loading skin file: MyScripts.xml

Any ideas? ;-)

Keep up the good work though! Thanks. Smile
(This post was last modified: 2010-07-25 18:57 by teshephe.)
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #43
Sorry the late reply.

Just to clarify for others in the same situation, I'll guess your first issue was related to the configuration of the Asterisk hostname or ip address.
Once you have changed it in settings, it started to work. Right?

I wasn't able to identify the reason for your second issue, as there is nothing at line 1, column 49 on scripts.

I'll suggest you removing the autoexec.py in order to test one script at time. First run and check the default.py.

Once you identify everything is ok, re-create the autoexec.py in order to launch bgservice.py when XBMC starts, and check that (vm notification, incoming call notification, etc).

Please let us know your results.

Best regards,
Hernan.-
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #44
Thanks for the reply and I totally understand... we all have real jobs! ;-)

Good news is that everything is working.... well almost... inbound notification is not.

Verified that bg is initiating and I can view CDRS, VM's, listen/DEL VM's, and initiate outbound calls with ringback.

Inbound VM notification works though... i already tried other solutions outlined earlier in the thread regarding but notta...

I am thinking that this may have something to do with the notification of inbound

13:48:13 T:140729194882832 M:3153326080 NOTICE: -->Python Interpreter Initialized<--
13:48:13 T:140729194882832 M:3153432576 NOTICE: XBMC PBX Addon Version: 0.0.6
13:48:14 T:140729194882832 M:3153653760 NOTICE: [XBMC PBX Addon]: Launching GUI...
13:48:14 T:140729194882832 M:3153653760 NOTICE: [XBMC PBX Addon]: __init__()
13:48:14 T:140729632434208 M:3152707584 ERROR: GetDirectory - Error getting ?
13:48:14 T:140729632434208 M:3152707584 ERROR: CGUIMediaWindow::GetDirectory(?) failed
13:48:14 T:140729194882832 M:3152707584 NOTICE: [XBMC PBX Addon]: > onInit()
13:48:14 T:140729194882832 M:3151441920 NOTICE: [XBMC PBX Addon]: > skinSetup()
13:48:14 T:140729194882832 M:3151441920 NOTICE: [XBMC PBX Addon]: > getInfo()
13:48:14 T:140729194882832 M:3152363520 NOTICE: [XBMC PBX Addon]: >> Asterisk 1.4.28 built by root @ rpmbuild32.elastix.palosanto.com on a i686 running Linux on 2010-01-06 16:46:18 UTC
13:48:14 T:140729194882832 M:3152351232 NOTICE: [XBMC PBX Addon]: > showInfo()
13:48:14 T:140729194882832 M:3152465920 NOTICE: [XBMC PBX Addon]: >> Done.

Any ideas?? Also, I am still getting that annoying includes.xml not found message in the log every once in a while from my earlier post...

SIDE NOTE:

For everyone else looking to play with this great "script" and so you don't make the same mistake I initially did thinking "plugin"..

1) Copy the plugin to your XBMC scripts/My Scripts directory

2) Then go into XBMC and select Scripts ..... and do Plugin Settings

3) Make all of the necessary changes to the Asterisk side of the house.

3) copy the autoexec.py from the xbmc-pbx-addon plugin dir to the root of your scripts directory

4) Restart XBMC and you should be ready to go... ;-)


Enjoy OpenSource!
MY SETUP: ubuntu lucid, xbmc 9.11, elastix 1.6 based Asterisk PBX
(This post was last modified: 2010-08-02 20:12 by teshephe.)
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #45
It's so nice to see you find this script useful Big Grin


teshephe Wrote:I am thinking that this may have something to do with the notification of inbound

13:48:13 T:140729194882832 M:3153326080 NOTICE: -->Python Interpreter Initialized<--
13:48:13 T:140729194882832 M:3153432576 NOTICE: XBMC PBX Addon Version: 0.0.6
13:48:14 T:140729194882832 M:3153653760 NOTICE: [XBMC PBX Addon]: Launching GUI...
13:48:14 T:140729194882832 M:3153653760 NOTICE: [XBMC PBX Addon]: __init__()
13:48:14 T:140729632434208 M:3152707584 ERROR: GetDirectory - Error getting ?
13:48:14 T:140729632434208 M:3152707584 ERROR: CGUIMediaWindow::GetDirectory(?) failed
13:48:14 T:140729194882832 M:3152707584 NOTICE: [XBMC PBX Addon]: > onInit()
13:48:14 T:140729194882832 M:3151441920 NOTICE: [XBMC PBX Addon]: > skinSetup()
13:48:14 T:140729194882832 M:3151441920 NOTICE: [XBMC PBX Addon]: > getInfo()
13:48:14 T:140729194882832 M:3152363520 NOTICE: [XBMC PBX Addon]: >> Asterisk 1.4.28 built by root @ rpmbuild32.elastix.palosanto.com on a i686 running Linux on 2010-01-06 16:46:18 UTC
13:48:14 T:140729194882832 M:3152351232 NOTICE: [XBMC PBX Addon]: > showInfo()
13:48:14 T:140729194882832 M:3152465920 NOTICE: [XBMC PBX Addon]: >> Done.

That error is something related to the WindowXML initialization that I couldn't fix, and I gave up since I didn't find any troubles caused by this.

Quote:Any ideas?? Also, I am still getting that annoying includes.xml not found message in the log every once in a while from my earlier post...

That message is a Warning which also has no impact on script functionality.
I think I've read somewhere a recommendation to include an empty file there in order to stop getting that message.


So, going back to your remaining issue on inbound calls, have you tried changing the "XBMC: Initiate upon Asterisk NewChannel State" setting ?

See this screenshot: http://code.google.com/p/xbmc-pbx-addon/...g&can=2&q=

When it is set to "Ring", it should only display a notification when receiving a real phone call from outside. This means that if you are placing phone calls from one local extension to another, nothing will happen (In this case try changing it to "Down").

In the event that changing it doesn't work for you, please change self.DEBUG from False to True in Line 50 of bgservice.py and see the extra messages on log.

Find line 50 here: http://code.google.com/p/xbmc-pbx-addon/...service.py

Please let me know if that helps.

Best regards!
HernĂ¡n.-
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #46
Thanks... I will look into the items you indicated. I believe that you may have "jogged" my memory banks regarding outside calls inbound and calls from internal extension... I have all outside (inbound) calls going to a call group which in turn rings all of the extensions in the house. I will change it on the @ side and see if that makes a difference.

BTW... I did change the status RING to DOWN and it did not make a difference.

Side Note (Suggestion):

When calling out via the plugin it would be nice to have a dialogue popup asking or letting you select which number to call (Destination or Source) if you know what I mean.

Also maybe integrate the XML phone/address book on the @ into your plugin would be nice to have. :-)

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #47
Ok... I have tried all of the mentioned and tricks and I was running a tail on the logs for both the @ and xbmc and I see the following:

22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: > NewChannel()
22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974998.55
22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: >> State: Down
22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: >>> Uniqueid: 1280974998.55
22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: >>> State: Down
22:23:17 T:140714881378064 M:3233103872 NOTICE: [XBMC PBX Addon]: > NewChannel()
22:23:17 T:140714881378064 M:3233103872 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974999.56
22:23:17 T:140714881378064 M:3233103872 NOTICE: [XBMC PBX Addon]: >> State: Down
22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: > NewCallerID()
22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974999.56
22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: >> CallerID: <Unknown> <561XXXXXXX>
22:23:43 T:140714881378064 M:3233595392 NOTICE: [XBMC PBX Addon]: > Hangup()
22:23:43 T:140714881378064 M:3233595392 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974999.56
22:24:01 T:140714881378064 M:3233226752 NOTICE: [XBMC PBX Addon]: > Hangup()
22:24:01 T:140714881378064 M:3233226752 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974998.55
22:24:01 T:140714881378064 M:3233226752 NOTICE: [XBMC PBX Addon]: > hangup_actions()

Got this same info multiple times during call tests...

It's definately getting the info but nothing ever pops up on xbmc. No

Any ideas?

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
hmr Offline
Member
Posts: 83
Joined: Jun 2006
Reputation: 0
Location: Argentina
Post: #48
Ok, so this is the Channel UniqueID selected to monitor for NewCallerID:

teshephe Wrote:>>> Uniqueid: 1280974998.55
22:23:16 T:140714881378064 M:3233153024 NOTICE: [XBMC PBX Addon]: >>> State: Down
22:23:17 T:140714881378064 M:3233103872 NOTICE: [XBMC PBX Addon]:

However, NewCallerID happens for another UniqueID:

teshephe Wrote:22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: > NewCallerID()
22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: >> UniqueID: 1280974999.56
22:23:17 T:140714881378064 M:3233218560 NOTICE: [XBMC PBX Addon]: >> CallerID: <Unknown> <561XXXXXXX>

Therefore, no notification message will ever popup.

Never found this situation before, so will have to test it further trying to mimic your asterisk setup.

I'll keep you posted on any findings.

Thanks!
Hernan.-
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #49
Thanks. Probably the best way to mimic it is to download a livecd copy of Elastix. It's pretty simple to setup but if you have questions let me know and I will lend a hand. ;-)

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
(This post was last modified: 2010-08-19 21:26 by teshephe.)
find quote
teshephe Offline
Senior Member
Posts: 107
Joined: Dec 2009
Reputation: 0
Post: #50
Bump... Hello Heman. How is it going? I suppose you don't have an update do ya?

Enjoy OpenSource! :nod:
MY SETUP: XBMC 12 Frodo RC3, Multiple Asus EB1501's throughout the Home for XBMC based STB's
find quote
Post Reply