Asterisk-IM not authenticating to Asterisk

Hi there

I’ve just done a fresh install of OpenFire and installed the Asterisk-IM plugin.

I’ve added the details of our Asterisk server, but it doesn’t connect and go green at all - it just stays grey the whole time. I’ve used the same login details as I have with other bits of software connecting to Asterisk but it doesn’t like it, and double checked by telnet-ting into the Asterisk Call Manager to check them.

The OpenFire console gives me the following errors:

03-Jan-2008 14:08:27 org.asteriskjava.manager.internal.ManagerConnectionImpl connect

INFO: Connecting to 172.31.255.2:5038

03-Jan-2008 14:08:28 org.asteriskjava.manager.internal.ManagerConnectionImpl setProtocolIdentifier

INFO: Connected via Asterisk Call Manager/1.0

Starting Enterprise Server

03-Jan-2008 14:08:29 org.asteriskjava.manager.internal.ManagerConnectionImpl disconnect

INFO: Closing socket.

and in the error logs:

2008.01.03

14:08:29

[org.jivesoftware.phone.asterisk.AsteriskPhoneManager.init(Asteri skPhoneManager.java:75)

]

Error connecting to asterisk server

172.31.255.2

org.asteriskjava.live.ManagerCommunicationException:

Unable to login

at

org.asteriskjava.live.internal.AsteriskServerImpl.initializeIfNee ded(AsteriskServerImpl.java:236)

at

org.asteriskjava.live.internal.AsteriskServerImpl.initialize(Aste riskServerImpl.java:217)

at

org.asteriskjava.live.DefaultAsteriskServer.initialize(DefaultAst eriskServer.java:123)

at

org.jivesoftware.phone.asterisk.CustomAsteriskServer.logon(Custom AsteriskServer.java:61)

at

org.jivesoftware.phone.asterisk.AsteriskPhoneManager.connectToSer ver(AsteriskPhoneManager.java:120)

at

org.jivesoftware.phone.asterisk.AsteriskPhoneManager.init(Asteris kPhoneManager.java:66)

at

org.jivesoftware.phone.asterisk.AsteriskPlugin.initPhoneManager(A steriskPlugin.java:85)

at

org.jivesoftware.phone.PhonePlugin.init(PhonePlugin.java:100)

at

org.jivesoftware.phone.PhonePlugin$1.call(PhonePlugin.java:298)

at

org.jivesoftware.phone.PhonePlugin$1.call(PhonePlugin.java:294)

at

java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at

java.util.concurrent.FutureTask.run(Unknown Source)

at

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown

Source)

at

java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown

Source)

at java.lang.Thread.run(Unknown

Source)

Caused by:

org.asteriskjava.manager.AuthenticationFailedException: Authentication

failed

at

org.asteriskjava.manager.internal.ManagerConnectionImpl.doLogin(M anagerConnectionImpl.java:573)

at

org.asteriskjava.manager.internal.ManagerConnectionImpl.login(Man agerConnectionImpl.java:433)

at

org.asteriskjava.manager.internal.ManagerConnectionImpl.login(Man agerConnectionImpl.java:418)

at

org.asteriskjava.manager.DefaultManagerConnection.login(DefaultMa nagerConnection.java:266)

at

org.asteriskjava.live.internal.AsteriskServerImpl.initializeIfNee ded(AsteriskServerImpl.java:232)

14 more

I’ve checked, double-checked and triple checked that I’m using the right username and password (we’re using an ic-talk.co.uk system and the default username and password are still in place AstTapi/AstTapi), so any help would be greatly appreciated - i’ve been scratching my head all day over it!

Many thanks

James

Has anyone got any idea on why this could be happening? It’s stopping me doing a deploy on Asterisk… any help much appreciated… thanks

I just downloaded

Openfire

3.4.3 and installed the asterisk-IM 1.4.0 plugin.

I’m also not able to make it login to the asterisk manager interface. I tried with plain telnet and that’s working fine so i know I have the correct username and password.

My asterisk is a checkout of the current -trunk without local modifications.

So you are running a 1.6 pre release of Asterisk, right?

Could you please post an ngrep trace so I can see what’s going on at the Manager API level?

Basically it’s 1.6 pre indeed.

Here’s the ngrep trace:

asterisk:/usr/local/src/asterisk# ngrep -s 1500 port 5038 -T

interface: eth0 (192.168.2.0/255.255.255.0)

filter: (ip or ip6) and ( port 5038 )

T +16.909935 192.168.2.4:5038 -> 192.168.2.109:56939

Asterisk Call Manager/1.1…

T +0.012913 192.168.2.109:56939 -> 192.168.2.4:5038

action: Challenge…actionid: 1852883522_0#…authtype: MD5…

T +0.000094 192.168.2.4:5038 -> 192.168.2.109:56939

Response: Success…

T +0.040201 192.168.2.4:5038 -> 192.168.2.109:56939

ActionID: 1852883522_0#…Challenge: 193476845…

T +0.004876 192.168.2.109:56939 -> 192.168.2.4:5038

action: Login…actionid: 1852883522_1#…key: eb960e72836c29a5eabe5b38cddf0c45…authtype: MD5…username: openfire…

T +1.002301 192.168.2.4:5038 -> 192.168.2.109:56939

Response: Error…

T +0.003992 192.168.2.4:5038 -> 192.168.2.109:56939

ActionID: 1852883522_1#…Message: Authentication failed…

My manager user is openfire with password openfire

umm thats a bug in Asterisk. A rather funny one…

http://bugs.digium.com/view.php?id=11749

Message was edited by: srt

and tilghman committed a patch for it.

Thanks for the work. It’s working fine now

Hi,

I am also getting the same error when i run my openfire server.

2009-02-09 10:39:37,187 [Thread-25] INFO org.asteriskjava.manager.internal.ManagerConnectionImpl - Closing socket.
[AsteriskManager] AuthenticationFailedException org.asteriskjava.manager.AuthenticationFailedException: Authentication failed

[AsteriskManager] AsteriskManager is stopped

Can anybody tell me where do I get & steps for installing the patch to solve the issue.

Thanks,

Gouri Prasad.

A few points to keep in mind:

  • The name of the section in sip.conf should be the same as the username, so in

your case, use [sip103xxxx] rather than [telefinxxx].

  • “type=peer” as they dont authenticate to you. This is the main problem as the sip.conf entry with “user” implies that they have to authenticate to you which is not the case. And as they arent supplying a password, it’s not authenticating.

  • Also try “insecure=very” which will allow registerd hosts to establish calls without re-authenticating. Note sure if this is valid here though.

  • Use a ‘host’ line also.

This config might work for you:

[sip103xxxx]

type=peer

username=sip103xxxx

secret=yyyyyyy

context=telefininsip

host=ser.telefin.dk

fromuser=sip103xxxx

auth=md5 ; maybe, maybe not

insecure=very ; also maybe, maybe not

disallow=all

allow=gsm

allow=ulaw

; add other “allow” lines as needed

anuncios clasificados

____LIFE’S SHORT. If you don’t look around once in a while you might miss it____