[Home]

Summary:ASTERISK-08177: [patch] Connect Asterisk as a component to a jabber server
Reporter:phsultan (phsultan)Labels:
Date Opened:2006-11-23 08:15:32.000-0600Date Closed:2007-07-11 19:59:04
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_jabber
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) trunk-component_connection.1.patch
( 1) trunk-component_connection.2.patch
Description:Hi,

I cannot have Asterisk being published as a discovered service in my jabber server (jabber2d). Here is my configuration :
[asterisk]
type=component
serverhost=host.domain
username=asterisk@host.domain
secret=*********
port=5347

Asterisk authenticates correctly to the server (handshake method), but the server does not fetch it to publish it as a gateway to other users. I believe it's because of the username format, which is not part of our jabber server scope (we only serve 'domain').

The attached patch modifies the component initialization process, to follow what's happening in the client initialization process. That is, prefer the info stored in 'serverhost' over 'username'.

This way, Asterisk authenticates as a component to jabber2d and appears as a gateway to other connected users.

Configuration then becomes :
[asterisk]
type=component
serverhost=host.domain
username=asterisk
secret=*********
port=5347

Thanks to Matthew O'Gorman for the module :)

****** ADDITIONAL INFORMATION ******

Note : setting 'username=asterisk@domain' will prevent from connecting as Asterisk won't trigger any DNS SRV query to retrieve the jabber server A record for 'domain'.

One question :
aji_client_initialize starts with connected = 0;
aji_component_initialize starts with connected = 1;

Isn't there something to modify here?
Comments:By: phsultan (phsultan) 2007-02-21 04:27:11.000-0600

Patch updated to latest revision.

By: Olle Johansson (oej) 2007-05-24 09:42:17

Fixed in svn 1.4 rev 65836 and trunk.