Problem with call-forwarding between 2 asterisk-servers

Hi,

I’m running two Asterisk-servers in the same network (1.4.19 + VoiceOne 0.6.1; fixed IPs) and want to route certain calls from Alice to Bob using IAX. I followed the wiki instructions to set up the servers: http://www.voip-info.org/wiki/view/Asterisk±+dual+servers

Here’s my configuration:

Server A (User)
iax.conf

[obelix]
type = peer
host = obelix
auth = md5
secret = secretword ;redundant when already embedded in Dial string
username = asterisk ;redundant when already embedded in Dial string
permit = 0.0.0.0/0.0.0.0

extensions.conf
##########
[office_obelix]
exten = _6XX,1,Dial(IAX2/asterisk:secretword@obelix/${EXTEN:1},30,r)
exten = _6XX,2,Congestion

Server B (Peer)
iax.conf

[asterisk]
type = user
auth = md5
host = asterisk
username = asterisk
secret = secretword
context = all
permit = 0.0.0.0/0.0.0.0

extensions.conf
##########
[40]
exten = 40,hint,SIP/40
exten = 40,1,AGI(dial.php|entity=151&group=2&extension=40)

Both servers work so far for themselves, I can place calls between the attached phones.
When trying to call from A to B, both consoles don’t show an error, but the phone immediately says “Error on dialing” and I can’t connect.

Do you have any idea how to fix that?

Thanks in advance.

your phone does not seem to allow you to dial a 3 digit number starting with 6 you need to check the dialplan in your phone there must be something that blocks the call otherwise you will see some error in the cli
did you use asterisk-rvvvvvvvvvvvvvv so you have some verbose?

I was using verbose-level 5, on ten the cli says (I dialed 630):

– Accepting AUTHENTICATED call from 192.168.11.5:
> requested format = alaw,
> requested prefs = (alaw|ulaw|gsm|ilbc|g729),
> actual format = alaw,
> host prefs = (alaw|ulaw|gsm|ilbc|g729),
> priority = mine
– Executing [30@all:1] AGI(“IAX2/asterisk-1”, “dial.php|entity=115&group=2&extension=30”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/dial.php
– AGI Script dial.php completed, returning 0
== Auto fallthrough, channel ‘IAX2/asterisk-1’ status is ‘UNKNOWN’
– Hungup ‘IAX2/asterisk-1’

looks like some error in the dial.php script is the dial.php some script included in freepbx or some other configured box?.
you can create your own dialplan so you don’t use dial.php then the call should be setup just fine

That’s it.
Using the Dial()-command works just fine.

Thank you!