Connecting to GMail
Line 6: | Line 6: | ||
'''Note:''' The options=allowplainauth parameter is required, otherwise login will fail. | '''Note:''' The options=allowplainauth parameter is required, otherwise login will fail. | ||
− | We are going to set the gmail account in accfile so Yate will register to it. | + | We are going to set the gmail account in accfile so Yate will register to it. Then set Yate Server with Jingle in client mode. |
− | From routing will set that | + | From routing will set that all calls that comes to extension '123' will go to through the line to the gmail account set(mycontact@domain) the account must be online so that the call won't fail. |
And for outgoing calls all calls that will be made to the account set in accfile will go to a SIP account set. | And for outgoing calls all calls that will be made to the account set in accfile will go to a SIP account set. | ||
[[File:Yate_server_in_jingle_client_mode_with_gmail_account.png]] | [[File:Yate_server_in_jingle_client_mode_with_gmail_account.png]] | ||
− | + | ||
+ | ==Set gmail account== | ||
+ | |||
In accfile.conf : | In accfile.conf : | ||
Line 23: | Line 25: | ||
domain=gmail.com | domain=gmail.com | ||
options=allowplainauth | options=allowplainauth | ||
+ | |||
+ | ==Load Jabber client module == | ||
+ | |||
+ | Since jabberclient is a client module, not loaded when Yate is running in server mode, you must explicitly load it. To do that set in yate.conf: | ||
+ | |||
+ | [postload] | ||
+ | ${modulepath}/client/jabberclient${modsuffix}=yes | ||
+ | |||
+ | ==Set Yate Server with jingle in client mode== | ||
+ | |||
+ | By default the jingle channel detects Yate run mode and behaves accordingly. | ||
+ | To use it in client mode when Yate runs as server, set in yjinglechan.conf: | ||
+ | |||
+ | [general] | ||
+ | servermode=no | ||
+ | |||
+ | ==Routing calls == | ||
In regexroute.conf : | In regexroute.conf : |
Revision as of 15:06, 7 June 2013
In this example we are going to use simple gmail account where:
GMail_username - your GMail username.
GMail_password - your GMail account password.
Note: The options=allowplainauth parameter is required, otherwise login will fail.
We are going to set the gmail account in accfile so Yate will register to it. Then set Yate Server with Jingle in client mode.
From routing will set that all calls that comes to extension '123' will go to through the line to the gmail account set(mycontact@domain) the account must be online so that the call won't fail.
And for outgoing calls all calls that will be made to the account set in accfile will go to a SIP account set.
Contents |
Set gmail account
In accfile.conf :
[MyGMailAccount] enabled=yes protocol=jabber username=GMail_username password=GMail_password domain=gmail.com options=allowplainauth
Load Jabber client module
Since jabberclient is a client module, not loaded when Yate is running in server mode, you must explicitly load it. To do that set in yate.conf:
[postload] ${modulepath}/client/jabberclient${modsuffix}=yes
Set Yate Server with jingle in client mode
By default the jingle channel detects Yate run mode and behaves accordingly. To use it in client mode when Yate runs as server, set in yjinglechan.conf:
[general] servermode=no
Routing calls
In regexroute.conf :
[default] ; Route calls to contacts in MyGMailAccount roster ^123$=jingle/mycontact@domain;line=MyGMailAccount ; Route calls received on MyGMailAccount line ${in_line}MyGMailAccount=sip/sip:SIP_number@a.b.c.d
See Using jabber client in server mode and Jingle channel for more routing and setup details.
See also