[Asterisk-Users] IAX to IAX connect question
Raul Elizondo (wizardteam)
rauleli at wizardteam.com
Wed Sep 15 02:45:59 MST 2004
Hi,
I got my * working fine with FWD at office with 2 extensions, i receive
calls and i can make calls thru FWD. I got also my * at home, and i
connected it using auth=rsa. From my home, i can make calls using my office
iax, but if i try to redirect incomming calls from FWD to my * at home, it
rejects the call. I created the pub/key pairs for rsa and its working ok
and i just pasted the sections/contexts involved.
Must of the samples around the internet works with double config in iax.conf
for each server, a peer and a user, i've done that in a VPN and that works
fine. But... imagine setting a new *, i would need to modify the first 2
besides that adding them in the new one. What about a 4th or a 5th? Every
new * in the pbx means to modify all other *. So what i thougth was to set
a main one with some of slaves or users, in this way, i will only need to
add new "slaves" in the master, and this is what i tried.
Office iax.conf
===============
register => 999999:mypass at iax2.fwdnet.net
[iaxfwd]
type=user
context=fromiaxfwd
auth=rsa
inkeys=freeworlddialup
[rsaauth]
type=peer
host=dynamic
auth=rsa
outkeys=myast
username=rsaauth
context=extensions
[user01]
type=peer
user=user01
host=dynamic
secret=somepass
username=user01
context=localuse
outkeys=myast
inkeys=myast
Office extensions.conf
======================
[officetime]
exten => _999999,1,Answer
exten => _999999,2,wait(1)
exten => _999999,3,Dial(Zap/1,20,tr)
exten => _999999,4,Voicemail,u101
exten => _999999,102,Voicemail,b101
exten => _999999,105,Hangup
[noofficetime]
exten => _999999,1,Answer
exten => _999999,2,wait(1)
exten => _999999,3,Dial(IAX2/user01/${EXTEN})
exten => _999999,4,Voicemail,u101
exten => _999999,102,Voicemail,b101
exten => _999999,105,Hangup
[fromiaxfwd]
include => officetime|09:00-17:30
include => noofficetime|17:30-23:59
include => noofficetime|00:00-08:59
[toiaxfwd]
exten => _8.,1,SetCallerId,"MyName"
exten => _8.,2,Dial(IAX2/999999:mypass at iax2.fwdnet.net/${EXTEN:1},60,r)
exten => _8.,3,Congestion
[localuse]
include => extensions
include => toiaxfwd
Home iax.conf
=============
register => user01:somepass at mydynoffice
[rsaauth]
type=user
context=fromoffice
auth=rsa
inkeys=myast
allow=gsm
Home extensions.conf
====================
[fromoffice]
exten => s,1,Dial(Zap/1,20)
exten => s,2,Voicemail(u101)
exten => s,3,Hangup
exten => s,102,Voicemail(b101)
exten => s,103,Hangup
[tooffice]
exten => _7.,1,SetCallerId,"MyName"
exten => _7.,2,Dial(IAX2/user01:somepass at mydynoffice/${EXTEN},60,r)
exten => _7.,3,Congestion
Everything from my home to the office works fine, even the FWD calls. RSA
auth is working without problem. The problem comes when i try out of office
hours. My home * just refuses the calls. I've tried with switch instead of
exten, but even in the samples it is kinda confusing.
Any hint or help with this? (i believe it would be only one line that is not
right "Dial(IAX2/user01/${EXTEN})")
Regards,
-=Raul=-
More information about the asterisk-users
mailing list