Saturday, January 23, 2010

pygooglevoice 0.5

When I tried to run gvoice within Asterisk 1.6 by System command, I always got an error after using the method described here.

After some digging, I found the following were not clear to me:
  1. The configuration file ~/.gvoice is unavaible to Asterisk. I need to invoke gvoice with all necessary arguments.
  2. The phoneType argument is required for a Gizmo5 ringback number, which is 7. I found the declaration of call in voice.py.
    def call(self, outgoingNumber, forwardingNumber=None, phoneType=None, subscriberNumber=None). Therefore if I invoke gvoice like this
    exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
    exten => _X.,n,System(/usr/bin/gvoice -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK} ${PHONETYPE})
    Then it succeeds. RINGBACK is my Gizmo5 747 number and PHONETYPE is 7.
  3. It's important to set the key gv_dialout/channel in the Asterisk database before calling the system(gvoice) command in [gv-outbound] since it may take a second or two for the System command to return and the chance is good that Asterisk might receive the ring back call from gvoice before the key gv_dialout/channel is set, which caused the bridge command to fail.

16 comments:

願望 said...
This comment has been removed by a blog administrator.
天台 said...
This comment has been removed by a blog administrator.
討厭fu said...
This comment has been removed by a blog administrator.
story said...
This comment has been removed by a blog administrator.
佩怡 said...
This comment has been removed by a blog administrator.
明宏明宏 said...
This comment has been removed by a blog administrator.
王妍妮 said...
This comment has been removed by a blog administrator.
IdellA231_Fecteau1 said...
This comment has been removed by a blog administrator.
瑜吟 said...
This comment has been removed by a blog administrator.
WillyA安恬 said...
This comment has been removed by a blog administrator.
Matt said...

Wow, thanks for this post. I spent about 2 hours trying to figure out why my Bridge was failing. It seems that it would ringback before the gv_dialout/channel was set every single time. Setting the channel first made it work.

育德 said...
This comment has been removed by a blog administrator.
韋于倫成 said...
This comment has been removed by a blog administrator.
韋于倫成 said...

希望能有更多心得與我們分享~ ..................................................

彥安彥安 said...

快樂是你與生俱來的權力,它不應該取決於你完成什麼。 ..................................................

ShilaLong嘉雯 said...

Two heads are better than one. ............................................................