(2012-04-22 23:21)hmr Wrote: 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.1
You can download bgservice.py from here: http://code.google.com/p/xbmc-pbx-addon/...service.py
Thank you!
Hernán.-
Hi Hernàn,
this solution doesn't work ...
The XBMC log :
Code:
NOTICE: [XBMC PBX Addon]: > NewChannel()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.171
NOTICE: [XBMC PBX Addon]: >> State: Down
NOTICE: [XBMC PBX Addon]: > NewCallerID()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.171
NOTICE: [XBMC PBX Addon]: >> CallerID: Gilles Fixe <1214>
NOTICE: [XBMC PBX Addon]: > NewChannel()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.172
NOTICE: [XBMC PBX Addon]: >> State: Down
NOTICE: [XBMC PBX Addon]: > NewCallerID()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.172
NOTICE: [XBMC PBX Addon]: >> CallerID: Gilles Iphone <1212>
NOTICE: [XBMC PBX Addon]: > Hangup()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.172
NOTICE: [XBMC PBX Addon]: > Hangup()
NOTICE: [XBMC PBX Addon]: >> UniqueID: 1335193929.171
But i know why....
as you can see in my post #246 the order of event for a new call in asterisk 10 is :
Newchannel() ---> channel caller (bgsercice : create new id)
Newstate() ---> caller ring (bgsercice : fix the id)
Newchannel() ----> channel receiver (bgsercice : create new id but it's not the same and the hangup don´t reinitialise the id ....)
Newstate() ----> receiver ringing (bgsercice : fix the new id)
Hangup() ---> hangup caller (bgservice :

? first id ? second id ??)
my solution it's a "mix" between newChannel and NewCallerID ....
I don't have an equipment (preconised by digium) so i don't have a dahdi or zapata channel, my system work only with SIP (maybe for this reason i have more newChannel event)