Not able to route my call properly

I’m new to the asterisk. I want 7001 can dial to 7002 and vice versa and can accept each other call.

My extension.conf configuration is look this but I think there is issue in this configuration that make me unable to work it properly. Please help me what changes is require as per my requirement (I want 7001 can dial to 7002 and vice versa and can accept each other call.)

[internal]
exten => 7001,1,Answer()
exten => 7001,2,Dial(SIP/7001,60)
exten => 7001,3,Playback(invalid)
exten => 7001,4,Hangup()

exten => 7002,1,Answer()
exten => 7002,2,Dial(SIP/7002,60)
exten => 7002,3,Playback(invalid)
exten => 7002,4,Hangup()

There is nothing actually wrong with your extensions.conf, although you will find it easier if you use “n”, rather than 2, 3, 4 etc., for the followon priorities, and you should also note that calling Answer before Dial is not normally good practice.

My guess is that the phones aren’t actually in the internal context. Proper logs will probably confirm this.

Also note that invalid is not likely to be an appropriate message for the likely ways this will fail, when properly configured. It is simplest just to hangup, which, if you also remove the Answer, can be done by reducing the sequence to just the Dial line.

You mean like this. Please make it confirm.

[internal]

exten => 7001,n,Dial(SIP/7001,60)
exten => 7001,n,Answer()
exten => 7001,n,Playback(invalid)
exten => 7001,n,Hangup()

exten => 7002,n,Dial(SIP/7002,60)
exten => 7002,n,Answer()
exten => 7002,n,Playback(invalid)
exten => 7002,n,Hangup()

I did not get you what you mean here “My guess is that the phones aren’t actually in the internal context. Proper logs will probably confirm this.”. Please help me how to set the zoiper to the internal context. I simply created the sip user there but nothing set like the internal context.

Please edit my configuration it would be more easy for me to get you for this. “Also note that invalid is not likely to be an appropriate message for the likely ways this will fail, when properly configured. It is simplest just to hangup, which, if you also remove the Answer, can be done by reducing the sequence to just the Dial line.”

Hope to hear from you soon!!

Kind Regard,
Ajay Saini

You need to do some more reading.

I acually meant

exten => 7001,1, Dial(SIP/7001,60)

exten => 7002,1, Dial(SIP/7002,60)

If you don’t understand Asterisk contexts, you don’t know enough of the basic concepts to be attempting to create a dialplan.

You did not cover the accept in the extension configuration and playback. Is there any reason associated for this. Can you provide me a link to me from where i can read and understand this concept well.

Hope to hear from you soon!!

Kind Regards,
Ajay Saini

asteriskdocs.org/
wiki.asterisk.org/wiki/display/AST/Home
configs/*.sample in the source tree.