Connecting to GMail

From Yate Documentation
(Difference between revisions)
Jump to: navigation, search
(Routing calls)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
In this example:
+
In this example we are going to use simple gmail account where:
  
 
GMail_username - your GMail username.<br>
 
GMail_username - your GMail username.<br>
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.
  
See [[Jabber_Client_With_Jingle_Yate_Server|Using jabber client in server mode]] and [[Yjinglechan|Jingle channel]] for more routing and setup details.
+
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.
 +
 
 +
[[File:Yate_server_in_jingle_client_mode_with_gmail_account.png]]
 +
 
 +
==Set gmail account==
  
 
 
In accfile.conf :  
 
In accfile.conf :  
  
Line 18: 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
 +
 +
==Configure users==
 +
 +
In regfile.conf
 +
 +
[123]
 +
password=secretpass
 +
 +
==Routing calls ==
  
 
In regexroute.conf :
 
In regexroute.conf :
Line 28: Line 59:
 
  ${in_line}MyGMailAccount=sip/sip:SIP_number@a.b.c.d
 
  ${in_line}MyGMailAccount=sip/sip:SIP_number@a.b.c.d
  
 +
See [[Jabber_Client_With_Jingle_Yate_Server|Using jabber client in server mode]] and [[Yjinglechan|Jingle channel]] for more routing and setup details.
 +
 +
And know connect to the your SIP account and wait for gmail friends to call you. Or test the incoming calls by calling '123' extension.
  
 
'''See also'''
 
'''See also'''
  
 
* [[Telephony]]
 
* [[Telephony]]
* [[Jabber_Client_With_Jingle_Yate_Server]]
+
* [[Jabber Client With Jingle Yate Server]]
 
* [[Yjinglechan|Jingle channel]]
 
* [[Yjinglechan|Jingle channel]]
 +
 +
[[Category:SIP]] [[Category:Gmail]] [[Category:Server]] [[Category:Jingle]]

Latest revision as of 11:20, 4 November 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.

Yate server in jingle client mode with gmail account.png

Contents

[edit] Set gmail account

In accfile.conf :

[MyGMailAccount]
enabled=yes
protocol=jabber
username=GMail_username
password=GMail_password
domain=gmail.com
options=allowplainauth

[edit] 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

[edit] 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

[edit] Configure users

In regfile.conf

[123]
password=secretpass

[edit] 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.

And know connect to the your SIP account and wait for gmail friends to call you. Or test the incoming calls by calling '123' extension.

See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers