4

I have this code on my extensions.conf

[test]
exten => 20,1,Answer()
exten => 20,n,Playback(hello-world)
exten => 20,n,Hangup()

and this is my sip.conf

[201]
user=201
secret=123456
type=friend
host=dynamic
nat=yes
context=test

[202]
user=202
secret=123456
type=friend
host=dynamic
nat=yes
context=test

I try to call 201 from 202 , 202 from 201 but i keep getting this error

Call from '201' to extension '201' rejected because extension not found in context 'test'

Agent69
  • 141
  • 1
  • 2

1 Answers1

3

Right now, you only have 1 extension defined in your [test] context ... Extension 20.

If you want to be able to place calls between 200 and 201, you'd need to have something like the following:

[test]
exten => 20,1, Answer()
 same => n, Playback(hello-world)
 same => n, Hangup()

exten => 20[01], Verbose(2,Call for Extension ${EXTEN})
 same => n, Progress()
 same => n, Dial(SIP/${EXTEN})
 same => n, Hangup()

I'd strongly recommend that you check out this online book. It will help you out with basic stuff like this.

Cheers!

MichelV69
  • 249
  • 1
  • 6