Asterisk configuration for Openfire

Hello, I’m new to Asterisk, so I’m sorry if I’m understanding smth wrong.
It’s a week already since i got stuck on Asterisk server integration with Openfire server through Asterisk IM plugin(configured phone mappings).
The thing I want to do is to make possible calls from spark to spark clients(that are not in the same network).
Here are my details:
Debian Squeeze 64 OS
Asterisk 11.0.0 rc1
Openfire 3.7.1+Asterisk IM 1.4.0+SIP plugin (I’m not sure why I need this one :unamused: )

sip.conf

[code]
[general]
context = default
bindport = 5060
bindaddr = 0.0.0.0
tcpbindaddr = 0.0.0.0
tcpenable = yes

[1001]
type = friend
callerid = User One <1001>
secret = 1001
host = 127.0.0.1
canreinvite = no
dtmfmode = rfc2833
mailbox = 1001
disallow = all
allow = ulaw
transport = udp

[1002]
type = friend
callerid = User Two <1002>
secret = 1002
host = startchat.hopto.org
canreinvite = no
dtmfmode = rfc2833
mailbox = 1002
disallow = all
allow = ulaw
transport = udp

[VoIPProvider]
type=peer
host=127.0.0.1
username=admin
fromuser=admin
secret=1234565
canreinvite=no[/code]
manager.conf

enabled = yes
port = 5038
bindaddr = 0.0.0.0
[admin]
secret=1234565
deny = 0.0.0.0/0.0.0.0
permit = 127.0.0.1/255.255.255.255
read = system,call,log,verbose,agent,user,config,dtmf,reporting,cdr,dialplan
write = system,call,agent,user,config,command,reporting,originate,message

extensions.conf

[general] 
static=yes 
writeprotect=no 

[default]
exten => 1001,1,Answer() 
exten => 1001,n,Dial(SIP/1001,20,tr) 
exten => 1001,n,Hangup 

exten => 1002,1,Answer() 
exten => 1002,n,Dial(SIP/1002,20,tr) 
exten => 1002,n,Hangup. 

Is there any real solutions or I’m just wasting time? Any help will be appreciated. Thank you.