Dave, I guess with Andrews note and your help, I kind of got what I was
looking for. I am just testing it now and will let you know the results...

Your cell phone example is absolutely right, I m trying to take a call from
a DID and transferring it to a cell phone or a pstn phone (e.g.: I have a
Japan DID and I m transferring it to my Toronto cell phone)

Thanks a lot for you guys 

Syed

-----Original Message-----
From: Dave Donovan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 05, 2006 11:05 AM
To: [email protected]
Subject: Re: [on-asterisk] Dialplan help

Syed,

I'd like to help you out but I'm a bit confused.  Based on the lack of
replies to your message, I think some other people might be confused too.

I don't know if I have all the answers, but maybe I can help to clarify the
problem a bit.

On 10/4/06, Syed Zia <[EMAIL PROTECTED]> wrote:
> Hello folks, I would appreciate if somebody can help me with some 
> basic dial plan issues I have. Please be addvised that I am a newbie to
asterisk..
>
> I have these voxbone DID's, The way I m using these DID's now that I 
> forward it to an extension (e.g: [EMAIL PROTECTED]) where 192.168.1.1 is 
> my asterisk box, then I have a dial plan for each extension which 
> dials to a pst number through a trunk I am using.

So let me get this right, you have a service from Voxbone that allows people
to dial a 416 PSTN number (4161111111) and this delivers the call to your
system.  Now what?  You want to send the call back out to the PSTN?  It
sounds like you want to take an incoming call from your
4161111111 DID and then make an outgoing call to a cel phone (for
example) at 4162222222.  Is that what you want?

_OR_

When you say you want a separate dial plan, do you want to give an
autoattendant then direct the call to an internal extension?

>
> E.g: exten
> Exten => 300,1,Answer()
> exten => 300,2,Wait(2)
> exten => 300,3,NoOp(${CALLERID})
> exten => 300,4,Dial(SIP/[EMAIL PROTECTED])
> exten => 300,5,Hangup()
>

That looks pretty close to the cel phone example that I describe above,
you're on the right track if that's what you want.  If you want the incoming
calls from a DID to execute this then juse replace the '300' with
'4161111111' where 4161111111 is the DID number from voxbone.  That's
normally the way these things work but I'll say I have no experience with
voxbone specifically.

> What I really want is that I want to map the actual PSTN number in the 
> sip URI for each DID (e,g: [EMAIL PROTECTED]). Then I want to 
> write a dialplan in my asterisk box which should terminate all these 
> calls through this trunk 202.202.202.202

I'm completely confused about what you're asking for here.  I can't
understand what you mean when say you want to terminate a DID through a
trunk.  Is this the same thing described above?  When you say map, do you
mean you want to capture it in a variable?

>
> I was thinking to do this and wanted you guys to validate it:
>
> In my extension.conf
>
> [globals]
> ;define trunck as global variable
> Trunka=192.168.1.1
> prefix=12345
>
> [Voxbone context]
>
> Any call which starts with 1416,1=> Answer()
>                                    1416,2=> Dial(${TrunkA})
>
> I believe this will work but I have 2 questions:
>
> 1. How am I suppose to tell the asterisk that all calls received form 
> this context should be terminated by this truck. Is my dialplan is 
> correct? Can somebody write me the right syntax?

Sorry, you'll have to reword that for me.  I think you play around with the
dialplan a little bit and just get the nature of extensions and contexts
clear in your mind.  It's an important concept and it helps to set up a
couple of phones and make some calls between them and play around with
things to see how it all interacts.

>
> 2.The trunk which I am using requires me to use prefix before dialing 
> any number.. E.g.: [EMAIL PROTECTED], So how am I 
> suppose to set the prefix in a variable so I don't need to hard code it in
all the uri's?

If you have a prefix and a suffix for your trunk, just setup 2 variables in
the general section like:
TrunkPrefixA = 1234
TrunkSuffixA = @202.202.202.202

Then in an extension, you can use a dial statement like
dial(sip/${TrunkPrefixA}${EXTEN}${TrunkSuffixA})

Take a look at the wiki, (www.voip-info.org) and specifically at asterisk
variables, the dial command etc and see if that gives you any ideas.  If we
can help further, post more questions and we'll see what we can do.

Dave

--
David Donovan
Consultant
Fulcrum Solutions

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,
e-mail: [EMAIL PROTECTED]

Reply via email to