[asterisk-dev] [Code Review] SIP: Pineapple
Michiel van Baak
michiel at vanbaak.info
Fri Oct 23 09:11:46 CDT 2009
On 14:57, Fri 23 Oct 09, Klaus Darilion wrote:
>
>
> Michiel van Baak schrieb:
> > On 17:05, Thu 22 Oct 09, Klaus Darilion wrote:
> >>> And we have a good couple of setups that have an asterisk box specific
> >>> for routing, it grabs the calls from ITSP and landlines and routes those
> >>> calls to other boxen. Most of them use a different route when setting up
> >>> an outbound call.
> >>>
> >>> Many many possibilities that dont match the simple setup you described.
> >> The thing is: the SIP channel needs not be aware of how you use the
> >> "trunks". Even if you do specify a trunk as outgoing-only, this can not
> >> avoid that the other side can send you calls over this "trunk".
> >
> > Agreed.
> >
> >> As you handle LCR in the dialplan (not in the SIP channel) you can
> >> decide in the dialplan too if you use a "trunk" for in, out or both.
> >> Don't make the SIP configuration to complex.
> >
> > I guess it would be enough (see your previous mail with the comments on
> > my reply) to route the incoming calls to an empty context for a trunk
> > you only want to use for outbound.
>
> So we have two possibilities:
> 1. Let the user handle this by explicitly making an empty context in
> extensions.conf and specify this empty context in the relevant "trunk"
> section.
>
> 2. make the "trunk" option direction=[in|out|both] where:
> "out": all incoming requests gets rejected with 403
> "in": all Dial(SIP/trunkname) attempts will cause
> immediate CHANUNAVAIL
> "both": allows both directions
3. If a trunk is only for outgoing calls, don't specify a context.
Then it will default to 'default' (or whatever you configured in the
global sip settings) and you are not accepting calls there either right
? (maybe some for ENUM stuff, but those should be named anywayz)
Not using a trunk for outbound calls is as simple as never using
Dial(SIP/trunkname)
I think 3. is all we need and already available at the moment.
--
Michiel van Baak
michiel at vanbaak.eu
http://michiel.vanbaak.eu
GnuPG key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x71C946BD
"Why is it drug addicts and computer aficionados are both called users?"
More information about the asterisk-dev
mailing list