[Asterisk-Users] Connecting Asterisks via SIP
Marcin Okraszewszki
okrasz_news at o2.pl
Tue Mar 1 09:26:12 MST 2005
Hi.
It is propbably a really naive problem, but I really couldn't find
answer how to connect two Astrisks via SIP. I managed to do it via IAX
without any problem. But this is a test installation and I would like to
connect them via SIP.
So I have two computers:
pbx1 - 10.1.3.207
pbx2 - 10.1.3.204
pbx1 handles extensions 1xx and pbx2 for extensions 2xx. I would like to
call user from pbx2 to pbx1 via SIP (note, I can call users within one PBX).
What should be the configuration?
I tried serveral configurations based on
http://www.voip-info.org/wiki-Asterisk+-+dual+servers (especially
example 1). This is one of them:
================= configuration =====================
Configuration on pbx1:
----------------------
sip.conf:
=========
[pbx2]
type=friend
username=pbx2
secret=pbx2
host=10.1.3.204
context=from-sip
extensions.conf:
================
[from-sip]
exten => 113,1, Dial(SIP/adamo,10,t)
exten => 158,1, Dial(SIP/okrasz,10,t)
[default]
include => demo
include => from-sip
Configuration on pbx2:
----------------------
sip.conf:
=========
[pbx1]
type=friend
username=pbx1
secret=pbx1
host=10.1.3.207
extensions.conf:
================
[from-sip]
exten => 223,1, Dial(SIP/adamo2,10,t)
exten => 258,1, Dial(SIP/okrasz2,10,t)
exten => _1XX,1, Dial(SIP/pbx2:pbx2 at 10.1.3.207/${EXTEN},30,r)
[default]
include => demo
include => from-sip
===================== end of configuration ====================
In this case when I start PBXes, register an okrasz client to pbx1 and
write on pbx2 console:
> dial 158
-------
I get fallowing message:
-- Executing Dial("OSS/dsp", "SIP/pbx2:pbx2 at 10.1.3.207/158|30|r")
in new stack
Mar 1 17:12:02 WARNING[8605]: chan_sip.c:1398 create_addr: No such
host: 10.1.3.207/158
Mar 1 17:12:02 NOTICE[8605]: app_dial.c:749 dial_exec: Unable to create
channel of type 'SIP'
------
If on pbx2 I change extensions to:
exten => _1XX,1, Dial(SIP/pbx2/${EXTEN},30,r)
or
exten => _1XX,1, Dial(SIP/${EXTEN}@pbx2,30,r)
or
exten => _1XX,1, Dial(SIP/${EXTEN}@10.1.3.207,30,r)
I get fallowing:
----
-- Executing Dial("OSS/dsp", "SIP/pbx2/158|30|r") in new stack
-- Called pbx2/158
Mar 1 17:14:20 WARNING[8605]: chan_sip.c:6811 handle_response:
Forbidden - wrong password on authentication for INVITE to'"asterisk"
<sip:asterisk at 10.1.3.204>;tag=as4f6fe88d'
-- SIP/pbx2-43cd is circuit-busy
== Everyone is busy/congested at this time
-- Got SIP response 481 "Call Leg Does Not Exist" back from 10.1.3.207
----
and on pbx1:
----
Mar 1 17:14:02 NOTICE[19012]: chan_sip.c:7271 handle_request: Failed
to authenticate user "158" <sip:158 at 10.1.3.204>;tag=as4f6fe88d
----
THANK YOU FOR HELP!!
Marcin Okraszewski
More information about the asterisk-users
mailing list