This is probably a no-brainer for you guys, however for me, I get confused by the documentation.
I have an Asterisk box, and 2 iax atas connected to cheap drugstore handsets. Their is no external VOIP service at this time. Currently they are able to dial each other and connect just fine.
What I’m wanting to do is ‘trap’ anything dialed from one of the phones to ALWAYS dial the other phone.
For instance:
Phone A is extension 1000
Phone B is extension 2000
I want phone B to automatically call phone A no matter what numbers are pressed on it’s keypad, or how many are pressed. In other words, as soon as ANY number is pressed, it automatically calls phone A.
But I want phone A to work just as it is now, or in other words, the user actually has to correctly enter a valid extension.
The problem with _X. is that it wont match * # or even A,B,C,D.
and as long as the sets context only has the single entry and no includes it should be fairly safe and catching t and i in this case wouldnt be a bad thing.
[from-sip]
exten => 1000,1,Dial(SIP/2000,20)
exten => 2000,1,Dial(SIP/2000,20)
include => from-iax
[from-iax]
exten => 1000,1,Dial(IAX2/1000,20)
exten => 2000,1,Dial(IAX2/2000,20)
include => from-sip
This is my sip.conf:
[1000]
type=friend
context=from-iax ; Where to start in the dialplan when this phone calls
callerid=phoneA <1> ; Full caller ID, to override the phones config
host=192.168.1.102 ; we have a static but private IP address
mask=255.255.255.0
defaultip=192.168.1.102
username=1000
secret=somesecret
;regexten=1000 ; No registration allowed
nat=no ; there is not NAT between phone and Asterisk
canreinvite=no ; allow RTP voice traffic to bypass Asterisk
dtmfmode=inband ; either RFC2833 or INFO for the BudgeTone
[2000]
type=friend
regexten=2000 ; When they register, create extension 2
callerid="phoneB" <2>
context=from-iax
dtmfmode=inband
host=192.168.1.103
mask=255.255.255.0 ; This device needs to register
defaultip=192.168.1.103
username=2000
secret=somesecret
nat=no ; X-Lite is behind a NAT router
canreinvite=no ; Typically set to NO if behind NAT
disallow=all
allow=gsm
;allow=alaw
allow=ulaw
Do I need to make another context or can I just modify the one context in my extensions.conf?
I think you need to think a little ore about your numbering, you seem to have 2 x1000 and 2 x2000, Even though they are in different contexts this will cause problems in the furure. As to the hotdial yes the set would need its own context and use a Goto