On Dec 28, 2009, at 11:14 AM, Carl A jeptha <[email protected]> wrote:

 Hi,
> I am looking for a instruction set on how to make DID only work with an
> extension for both incoming  and outgoing  calls
>



Andre Courchesne wrote:

> Depends a lot on your asterisk config and architecture. Voip or traditional
> carrier? Using hand made dialplan or a gui like freepbx?
>
>

On Wed, Dec 30, 2009 at 8:42 PM, Carl A jeptha <[email protected]> wrote:

> This a Trixbox with gui and it is a voip number.
>
>

Hi Carl,

I'm not running Trixbox so I don't have perfect answers or screen shots.
I'll give you some pointers that might put you onto the right answer.

For incoming calls, it should be pretty easy, in the extension configuration
page, populate the "Add Inbound DID" field.  At least, that's what it's
called in Elastix, which should be pretty similar to your Trixbox.  Also set
the outbound CID field.

For outgoing calls, it's a bit more complicated but you're not the first
person to try it so there seems to be a package available.  I've never run
it, but have you looked at the Custom Contexts module?  There's an article
discussing it here:
http://www.trixbox.org/forums/trixbox-forums/help/bind-trunk

Another option might be to use CallerID matching syntax in your outbound
route.  I haven't tested this but you could experiment with creating an
outbound route for each extension (let's use extension 200 as an example)
that looks like:  9|./200

That might cause the route to be selected only for calls from extension
200.  Like I said, I based it on having read the following blurb from
voip-info.org.
http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20extensions.conf#Extensions

___________________________________________________
Other options for defining extensions include an option commonly referred to
as the ex-girlfriend logic. This logic will match the dialed extension,
whether it came from outside or inside, based on the callerid of the person
calling it. For exmaple:

   exten => 123/100,1,Answer()
   exten => 123/100,2,Playback(tt-weasels)
   exten => 123/100,3,Voicemail(123)
   exten => 123/100,4,Hangup()

This will match extension 123 and perform the following options ONLY if the
Caller-ID Number of the calling user is 100. This can also be accomplished
with pattern matching, as seen below:

   exten => 1234/_256NXXXXXX,1,Answer()
   and so on...

This will only match for 1234 if the Caller ID Number is something beginning
with 256. This is very useful to keep locals from dialing your toll-free
number and charging you for the call.

You can even do this:

   exten => s,1,Answer
   exten => s/9184238080,2,Set(CALLERID(name)=EVIL BASTARD)
   exten => s,2,Set(CALLERID(name)=Good Person)
   exten => s,3,Dial(SIP/goodperson)
_____________________________________________________

One thing to keep in mind is that even though they talk about extensions,
they're really just numbers being matched.  When you configure the dial
pattern on an outgoing route, the callerID is that of the user doing the
dialing, and 'extension' is 10 digit (or whatever) number they dialed.

I hope this sets you on the right track.

Dave

Reply via email to