Connect 2 asterisk servers


#1

server1 10.44.71.13

extensions.conf

exten => 67490580,1,Answer exten => 67490580,2,wait(1) exten => 67490580,3,Dial(SIP/muhil@67490570) exten => 67490580,4,hangup()

sip.conf

[muhil] type=friend username=foo secret=password123 auth=plaintext host=10.44.71.134 context=default peercontext=default qualify=yes trunk=yes

above 10.44.71.134 is another asterisk server and extensions default context contain 67490570 number, but getting the below debug lines and called from E1 lines . pls suggest how to resolve this one.

[code]
– Accepting call from ‘04447415600’ to ‘67490580’ on channel 0/1, span 1
– Executing [67490580@default:1] Answer(“DAHDI/i1/04447415600-2”, “”) in new stack
– Executing [67490580@default:2] Wait(“DAHDI/i1/04447415600-2”, “1”) in new stack

– Executing [67490580@default:3] Dial(“DAHDI/i1/04447415600-2”, “SIP/bar@67490570”) in new stack
Really destroying SIP dialog ‘420838630342e67f319d0b5e11901273@[::1]:0’ Method: INVITE
== Everyone is busy/congested at this time (1:0/0/1)
– Executing [67490580@default:4] Hangup(“DAHDI/i1/04447415600-2”, “”) in new stack
== Spawn extension (default, 67490580, 4) exited non-zero on ‘DAHDI/i1/04447415600-2’
– Hungup ‘DAHDI/i1/04447415600-2’[/code]

below code from 3cx phone

-- Executing [67490580@default:3] Dial("SIP/6000-00000000", "SIP/bar@67490570") in new stack Really destroying SIP dialog '419fafa256fc85e81dde2b36478e3e03@[::1]:0' Method: INVITE == Everyone is busy/congested at this time (1:0/0/1) -- Executing [67490580@default:4] Hangup("SIP/6000-00000000", "") in new stack == Spawn extension (default, 67490580, 4) exited non-zero on 'SIP/6000-00000000' Scheduling destruction of SIP dialog 'OGIyMmIyYjBmODVlM2EzODNhOWYwNTc0NzMxOWNlYm
both i am getting " Everyone is busy/congested at this time "


#2

Your setup is a little confusing, and you dial command does not make any sense. If you want to dial another box you will either have to have an outbound trunk, or use the dial command with the server address like this:

Server 1 (10.44.61.13)
extensions.conf

exten => 67490580,1,Answer
exten => 67490580,2,wait(1)
exten => 67490580,3,Dial(SIP/67490570@10.44.71.134) ; this is how you dial your other box 
exten => 67490580,4,hangup()

Server 2 (10.44.71.134 - receiving the call)
sip.conf:

[TrunkIn]
host=10.44.61.13 ; Trunk matches based on this IP (ie. your source server)
username=Server1 ; Shows in CDR's
context=from-server-1 ; see below
type=peer ; VERY NB
insecure=port,invite ; for type=peer
; you can add more settings like codec, nat etc etc

Server 2 (10.44.71.134 - handling the call)
extensions.conf

[from-server-1]
exten => 67490570,1,NoOp(Call received from Server 1... you can do what you want from here like dial extension)

BTW, if you are going to route the call (like what it appears you are trying to get server 1 to do), then you probably don’t need to “Answer” the call, especially if you are going to push the call to a handset, on say 67490570. If asterisk answers the call the customer will start paying for the call from the moment it comes into your pbx, and not from the time your agent picks up the call.


#3

Thank you very much Euphorian…