Urgent help

Hello all,
I am in need of your help. i want to connect two asterisk servers having two extensions each so that extensions on serverA can call extensions on ServerB but i cant do it.

I found this on forums

;Server1
;extensions.conf
— in which context should i write it?
exten => _1XX,1,Dial(SIP/1-sip-trunk/${EXTEN}) ---- what should i type in here???
exten => _1XX,2,Hangup()

;sip.conf
[1-sip-trunk] ;extesions starting with 1
type=peer
context=internal
host=192.168.6.10 — is this serverA’s Ip or ServerB’s
disallow=all
allow=g729
canreinvite=yes
qualify=no

;Server2
;extensions.conf

exten => _2XX,1,Dial(SIP/2-sip-trunk/${EXTEN})
exten => _2XX,2,Hangup()

;sip.conf
[2-sip-trunk] ;extesions starting with 1
type=peer
context=internal
host=192.168.4.10 — which server’s ip will be tuned here?
disallow=all
allow=g729
canreinvite=yes
qualify=no

please help as soon as possible… and explain clearly i m a newbie

Hi Zuhair,
Try the following steps:-

At server A (IP= 192.168.10.1):-

iax.conf

[iax-user-1]
type=peer
auth=md5
username=iax-user-1
secret=1234
host=192.168.10.2
qualify=yes

extensions.conf

[from-pstn]
exten => s,1,Answer()
exten => s,n,Dial(IAX2/iax-user-1,10,g)

At server B (IP= 192.168.10.2):-
iax.conf

[iax-user-1]
type=user
auth=md5
secret=1234
user=iax-user-1
context=mycontext

extensions.conf

[mycontext]
exten => s,1,Answer()
exten => s,n,Playback(beep)
.
.
.
.
and so on

Hope this works
Regards

thank u bhai…
can u give me ur contact number?

how can i register my users at both terminals ?? will they be able to call to the remote server’s extensions?

my config goes like this
SERVER A

iax.conf
[test1]
type=friend
username=test1
secret=test1
host=dynamic
context=xyz

[test2]
type=friend
username=test2
secret=test2
host=dynamic
context=xyz

extension.conf
[xyz]
exten=> 8000,1,Dial(IAX2/test1@test1)
exten=> 8001,1,Dial(IAX2/test2@test2)

SERVER B

iax.conf
[test3]
type=friend
username=test3
secret=test3
host=dynamic
context=xyz

[test4]
type=friend
username=test4
secret=test4
host=dynamic
context=xyz

extension.conf
[xyz]
exten=> 7000,1,Dial(IAX2/test3@test3)
exten=> 7001,1,Dial(IAX2/test4@test4)

a part from that i have inserted your given code
Thank you very much for replying

Hi Zuhair,
My number is 923335397039.

You can use an IAX softphone like Zoiper to register your user at any side.
For more info on Dial have a look at following site

the-asterisk-book.com/unstab … -dial.html

Regards
Adnan

sorry i cudnt manage to call u yesterday…
here is my complete coding…please point errors
Zoiper display the message “no route to destination” when I dial test3 or test4 from server A

SERVER A

iax.conf
[test1]
type=friend
username=test1
secret=test1
host=dynamic
context=xyz

[test2]
type=friend
username=test2
secret=test2
host=dynamic
context=xyz

[iax-user-1]
type=peer
auth=md5
username=iax-user-1
secret=1234
host=192.168.10.2 ; ip of server b
qualify=yes

extension.conf
[xyz]
exten=> 8000,1,Dial(IAX2/test1@test1)
exten=> 8001,1,Dial(IAX2/test2@test2)
[from-pstn]
exten => s,1,Answer()
exten => s,n,Dial(IAX2/iax-user-1,10,g)

SERVER B

iax.conf
[test3]
type=friend
username=test3
secret=test3
host=dynamic
context=xyz

[test4]
type=friend
username=test4
secret=test4
host=dynamic
context=xyz

[iax-user-1]
type=user
auth=md5
secret=1234
user=iax-user-1
context=mycontext

extension.conf
[xyz]
exten=> 7000,1,Dial(IAX2/test3@test3)
exten=> 7001,1,Dial(IAX2/test4@test4)
[mycontext]
exten => s,1,Answer()
exten => s,n,Playback(beep)

adnan bhai… i have done with it but with some other coding astbook.asteriskdocs.org/en/2nd_ … tt670.html

now my target is to transfer an icoming call on server A through pstn to server B and from server B i want to transfer that call to my cell number or another number. Can u help me in this?

Ok, Thats Great.
For connecting call to your cell phone you shoul have FXO card. FXO card which you plug into your system and then plug your telephone line into that card. Search the intenet for FXO cards and you will find alot.
Regards