On Wed, 11 Aug 2004 12:47:33 -0400, John Blackman <[EMAIL PROTECTED]> wrote: > How would I make entries in extensions.conf to forward to certain SIP > extensions based on the incoming call's DID?
In your sip.conf, each DID probably has its own [section] either type=friend or type=user and peer. Within this [section] you define the context=mainmenu for example. We can tell each of these DIDs to go to a different context within our dialplan. At this point we can then make each line do something different, such as ring a different phone. We could have one general purpose number to go to the autoattendent, and the other lines could ring a phone directly. I do this within' my iax.conf, but it should be similar for your sip.conf. You'll just have to look at either sip.conf samples, or perhaps it'll seem self evident once you look at your own sip.conf. Anyways, here's what I do for two incoming DIDs from a VoIP provider. /etc/asterisk/iax.conf [7830] type=friend host=asterisk username=iax-user1 secret=password1 context=mainmenu trunk=yes disallow=all allow=ulaw [7831] type=friend host=asterisk username=iax-user2 secret=password2 context=7831-incoming trunk=yes Then within your extensions.conf, you could do something like this... /etc/asterisk/extensions.conf [mainmenu] ;include => default (*btw: you probably shouldn't do this*) exten => s,1,Answer exten => s,2,Background(/var/lib/asterisk/sounds/initial_greeting) exten => 5,1,Directory(default) exten => fax,1,Dial(SIP/6204,20) exten => t,1,Goto(mainmenu,s,1) exten => i,1,Playback(invalid) [7831-incoming] exten => s,1,Answer exten => s,2,Dial(SIP/100) exten => s,3,Voicemail(u100) exten => s,4,Hangup exten => s,103,Voicemail(b100) exten => s,104,Hangup Hope this helps, Leif Madsen. http://www.asteriskdocs.org _______________________________________________ Asterisk-Users mailing list [EMAIL PROTECTED] http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
