Jabber Client With Jingle Yate Server
Line 1: | Line 1: | ||
+ | |||
This page describes the way to use the jingle channel and the jabberclient module to make and receive calls on jabber accounts | This page describes the way to use the jingle channel and the jabberclient module to make and receive calls on jabber accounts | ||
− | |||
− | |||
− | |||
== Load jabber client module == | == Load jabber client module == | ||
− | + | Since jabberclient is a client module, not loaded when Yate is running in server mode, you must explicitly load it. | |
− | 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: | To do that set in yate.conf: | ||
− | |||
− | |||
[postload] | [postload] | ||
${modulepath}/client/jabberclient${modsuffix}=yes | ${modulepath}/client/jabberclient${modsuffix}=yes | ||
− | |||
− | |||
== Account setup == | == Account setup == | ||
Line 21: | Line 14: | ||
Set jabber account in accfile.conf: | Set jabber account in accfile.conf: | ||
− | |||
− | |||
[MyJabberAccount] | [MyJabberAccount] | ||
enabled=yes | enabled=yes | ||
Line 29: | Line 20: | ||
domain=mydomain | domain=mydomain | ||
password=mypassword | password=mypassword | ||
− | |||
The account options listed above are required. | The account options listed above are required. | ||
Line 40: | Line 30: | ||
* '''server:''' Optional server IP address to connect to. | * '''server:''' Optional server IP address to connect to. | ||
* '''port:''' Optional server port to connect to. If set no SRV request will be made to detect jabber server IP/port. | * '''port:''' Optional server port to connect to. If set no SRV request will be made to detect jabber server IP/port. | ||
− | |||
== Jingle configuration == | == Jingle configuration == | ||
− | By default the jingle channel detects Yate run mode and behaves accordingly. | + | By default the jingle channel detects Yate run mode and behaves accordingly.<br> |
To use it in client mode when Yate runs as server, set in yjinglechan.conf: | To use it in client mode when Yate runs as server, set in yjinglechan.conf: | ||
− | + | ||
− | + | ||
[general] | [general] | ||
servermode=no | servermode=no | ||
− | + | ||
'''NOTE:''' If you intend to use the jabberserver module, keep in mind that the jingle channel will handle all jingle iq stanzas when running in client mode. All jingle calls between jabber users will be handled by Yate. | '''NOTE:''' If you intend to use the jabberserver module, keep in mind that the jingle channel will handle all jingle iq stanzas when running in client mode. All jingle calls between jabber users will be handled by Yate. | ||
Line 63: | Line 51: | ||
Calls can be sent to a contact (contact@domain) using the configured account like this: | Calls can be sent to a contact (contact@domain) using the configured account like this: | ||
− | |||
− | |||
[default] | [default] | ||
^123$=jingle/contact@domain;line=MyJabberAccount | ^123$=jingle/contact@domain;line=MyJabberAccount | ||
− | |||
The contact must be online, otherwise the call will fail.\\ | The contact must be online, otherwise the call will fail.\\ | ||
For online contacts the module will pick up the first resource with audio capabilities and will send the call to it. | For online contacts the module will pick up the first resource with audio capabilities and will send the call to it. | ||
− | |||
=== Incoming calls === | === Incoming calls === | ||
Line 77: | Line 61: | ||
You can match incoming calls on a configured account in regexroute.conf preroute handler on the 'in_line' parameter and set the called number: | You can match incoming calls on a configured account in regexroute.conf preroute handler on the 'in_line' parameter and set the called number: | ||
− | |||
− | |||
[contexts] | [contexts] | ||
${in_line}MyJabberAccount=;called=called_number | ${in_line}MyJabberAccount=;called=called_number | ||
− | |||
or in the route handler: | or in the route handler: | ||
− | |||
− | |||
[default] | [default] | ||
${in_line}MyJabberAccount=sip/sip:called_number@a.b.c.d | ${in_line}MyJabberAccount=sip/sip:called_number@a.b.c.d | ||
− | |||
== Additional requirements == | == Additional requirements == |
Revision as of 13:22, 15 October 2012
This page describes the way to use the jingle channel and the jabberclient module to make and receive calls on jabber accounts
Contents |
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
Account setup
Set jabber account in accfile.conf:
[MyJabberAccount] enabled=yes protocol=jabber username=myusername domain=mydomain password=mypassword
The account options listed above are required.
The following parameters are optional:
- options: Comma separated list of extra connection options:
- allowplainauth Allow plain password authentication if offered by the server and no other authentication method is available. This flag must be set for GMail accounts.
- tlsrequired Require stream encryption. The connection will fail if encryption is not supported by the server.
- server: Optional server IP address to connect to.
- port: Optional server port to connect to. If set no SRV request will be made to detect jabber server IP/port.
Jingle configuration
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
NOTE: If you intend to use the jabberserver module, keep in mind that the jingle channel will handle all jingle iq stanzas when running in client mode. All jingle calls between jabber users will be handled by Yate.
Routing calls
See Jingle channel for more routing details.
Outgoing calls
Calls can be sent to a contact (contact@domain) using the configured account like this:
[default] ^123$=jingle/contact@domain;line=MyJabberAccount
The contact must be online, otherwise the call will fail.\\ For online contacts the module will pick up the first resource with audio capabilities and will send the call to it.
Incoming calls
You can match incoming calls on a configured account in regexroute.conf preroute handler on the 'in_line' parameter and set the called number:
[contexts] ${in_line}MyJabberAccount=;called=called_number
or in the route handler:
[default] ${in_line}MyJabberAccount=sip/sip:called_number@a.b.c.d
Additional requirements
- Some Jingle clients (like GTalk) supports only ICE-UDP audio transports, so make sure the ystunchan.yate module is loaded.
- The jabber service may require client stream encryption, so make sure the openssl.yate module is loaded.
- If you want to use stream compression make sure the zlibcompress.yate module is loaded.