Hi,
I have two asteriks servers configured and working. One is at the office, whilst the other is at home.
The Office box has a static IP, whereby the Home machine has a dynamic IP.
The Home machine’s IAX.conf is as follows:-
[OFFICE]
type = friend
auth = md5
host = 196.34.25.88
trunk = yes
secret = secret
context = incoming_OFFICE
Whereby the Office machine’s IAX.conf is as follows:-
[general]
register => OFFICE:secret@196.34.25.88
[Home]
type = friend
auth = md5
host = dynamic
trunk = yes
secret = secret
context = incoming_HOME
No problem with registration between the Asterisk servers.
To enable dialing from the OFFICE to HOME is done simply by creating a context within extensions.conf such as:-
[HOME]
exten => _2X.,1,Dial(IAX2/HOME/${EXTEN:1})
exten => _2X.,n,Hangup()
Dialing from HOME to the OFFICE would be:-
[OFFICE]
exten => _1X.,1,Dial(IAX2/OFFICE/${EXTEN:1})
exten => _1X.,n,Hangup
This works fine, yet we prefer using “FQDN names”, such as Sarah@office.com
And this is where my issue starts…
DNS service records has been created.
When at home, I can phone John on either of the following ways:-
1.) John
2.) John@192.168.0.10
3.) John@home.com
However, should I wish to phone John from the office, I need to call
4.) 1John
(Pattern matching being applied to route the call to the HOME server)
I’ve created a [Home] context at the Office machine’s extensions.conf:-
exten => _.,1,Verbose(1|Transfer to Home)
exten => _.,n,Dial(IAX2/HOME/${EXTEN}@Home)
exten => _.,n,Hangup()
with basically the same config at the OFFICE machine.
Doing a “console dial Sarah@office.com” from the Home machine, creates the following at the Office machine’s CLI:-
[Nov 19 17:56:31] NOTICE[19774]: chan_iax2.c:7613 socket_process: Rejected connect attempt from 16.16.12.16, who was trying to reach 'Sarah@office.com’
[Nov 19 17:56:32] NOTICE[19778]: chan_iax2.c:7613 socket_process: Rejected connect attempt from 16.16.12.16, who was trying to reach 'h@office.com’
A call from a soft client, results in nothing at either side, till the softclient times out…
We wish to phone users as "user@domain.com" with a fallback to an extension number. (Say when a PSTN caller, wished to contact John)
Is this possible with Asterisk?
Can anyone please shed some light on how to accomplish this ? or point me in the right direction… ? if possible.
Thanks in advance
