• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1048
  • Last Modified:

How to setup Asterisk Prefix Based dialing

Hello Guys,

I'm newbie in VOIP world and playing with Asterisk PBX.
I Have setup two Asterisk server (1.6.2) and configured SIP end points for both and connected each with other with IAX2 trunk

I'm successfully able to call between Asterisks with below dialplan, But I want to do prefix based dialing where in I just dial prefix number to reach extension of other asterisk and vice versa

Any help appreciated

Asterisk server 1 Dialplan (Extn 4XXX)
[general]
writeprotect=no
priorityjumping=yes

[default]
exten => 4000,1,Dial(SIP/4000)
exten => _1X.,1,Dial(IAX2/server2/${EXTEN})
[fromiax]
exten => _4X.,1,Dial(SIP/${EXTEN},20,tr)


Asterisk server 1 Dialplan (Extn 1XXX)
[general]
writeprotect=no
priorityjumping=yes
include => parkedcalls

[group1]
include => parkedcalls
exten => _1XXX,1,Dial(SIP/${EXTEN},10,tr)
exten => _1XXX,2, VoiceMail(${EXTEN}@voicemail_test,u,b)
exten => _1XXX,3,Playback(vm-goodbye)
exten => _1XXX,4,Hangup()
exten => 9998,1,VoiceMailMain(_1XXX@voicemail_test)

exten => _4X.,1,Dial(IAX2/server1/${EXTEN})

[fromiax]
exten => _1X.,1,Dial(SIP/${EXTEN},20,tr)erisk server 1 Dialplan (Extn 4XXX)


0
Ananthahk
Asked:
Ananthahk
1 Solution
 
AnanthahkAuthor Commented:
I was able to set up perfix based dialing by following code

Server1
exten => _801X.,1,Dial(IAX2/server2/${EXTEN:2})

Server2
exten => _811X.,1,Dial(IAX2/server1/${EXTEN:2})
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now