[Asterisk-Users] Sip Trunk config / Least Cost Routing

John Todd jtodd at loligo.com
Thu Aug 7 13:48:46 MST 2003


See answers in-line.

At 4:14 PM -0400 8/7/03, Wade Weppler wrote:
>From: "Wade Weppler" <weppler at wwworks-inc.com>
>To: <asterisk-users at lists.digium.com>
>Subject: RE: [Asterisk-Users] Sip Trunk config / Least Cost Routing
>Reply-To: asterisk-users at lists.digium.com
>Date: Thu, 7 Aug 2003 16:14:51 -0400
>
>Ah, good idea!  I assume even a global variable could be used instead of
>using db routines...
>
>Where this doesn't work so well is when trying to implement
>least-cost-routing using local calling areas spread over satellite offices.
>Here's an example:
>
>Office A has 4 Telco lines.
>
>Office B has 4 Telco lines.
>
>Office A and Office B have 8 station sets each.
>
>Office A and Office B both have Asterisk boxes.
>
>Office A and Office B are long distance calls away from each other, so they
>use IAX for interoffice calls, and would also like to utilize VoIP to extend
>their local calling area.
>
>If an employee from Office A wants to make a call to someone in Office B's
>local calling area, the system will need to follow the following logic:
>
>1)	Is there a telco line available in Office B?
>2)	No?  Use a local line in Office A and make a long distance call.
>3)	Yes?  Place the call through a local line in Office B.
>4)	Worst case, all lines are busy.  Let the user know.
>
>Bottom line, the call has to go through without any intervention from the
>user, but try the cheapest method first.
>
>We're already written an AGI module to handle the call routing (ie. which
>numbers are locally available from each Office), but I'd like to be able to
>handle line availability as well.

Why use an AGI?  This seems to be easily done with the dialplan, 
unless I'm missing some additional sophistication that you're not 
mentioning.

>Any idea how this could be done?

TRIP (RFC2871 and RFC3219)   Not implemented in Asterisk yet - 
looking for programmers.  See my posts to the -dev list last month.

This is probably overkill for a two office situation, but imagine you 
have three hundred offices...

JT

>-wade
>
>
>
>
>>  -----Original Message-----
>>  From: asterisk-users-admin at lists.digium.com [mailto:asterisk-users-
>>  admin at lists.digium.com] On Behalf Of John Todd
>>  Sent: Thursday, August 07, 2003 3:51 PM
>>  To: asterisk-users at lists.digium.com
>>  Subject: RE: [Asterisk-Users] Sip Trunk config
>>
>>  And to answer Wade's question: to limit outbound calls on a
>>  particular path, you'd use a local db set routine.  In other words,
>>  every time a call is created to that particular SIP peer, you'd add 1
>>  to the counter, and every time a call was hung up out of that pool,
>>  you'd subtract one.
>>
>>  JT
>>
>>
>>  At 3:30 PM -0400 8/7/03, Patrick wrote:
>>  >
>>  >incominglimit is already implemented for SIP.  Just specify under the
>>  >endpoint how many incoming connections are allowed.
>>  >
>>  >For example,
>>  >
>>  >[cisco]
>>  >type=friend
>>  >username=cisco
>>  >secret=blah
>>  >nat=yes                        ; This phone may be natted
>>  >host=dynamic
>>  >canreinvite=no                 ; Cisco poops on reinvite sometimes
>>  >qualify=200                    ; Qualify peer is no more than 200ms away
>>  >defaultip=192.168.0.4
>>  >incominglimit=20               ; set limit to 20 voice channels
>>  >
>>  >
>>  >setting the limit to 0 (incominglimit=0) is unlimited.
>>  >
>>  >to view the current lines in use ---  sip show inuse from the cli.
>>  >
>>  >
>>  >Patrick
>>  >
>>  >
>>  >>  I've also run into the "how many lines" problem.
>>  >
>>  >>  Possibly something similar to incominglimit= and outgoinglimit= in
>  > >>  h323.conf
>  > >>  could be implemented in sip.conf?
>  > >
>  > >>  -wade
>  > >
>  > >>  -----Original Message-----
>  > >>  From: asterisk-users-admin at lists.digium.com [mailto:asterisk-users-
>>  >>  admin at lists.digium.com] On Behalf Of David Hindmarsh
>>  >>  Sent: Thursday, August 07, 2003 12:19 AM
>>  >>  To: asterisk-users at lists.digium.com
>>  >>  Subject: Re: [Asterisk-Users] Sip Trunk config
>>  >>
>>  >>  Thanks for that,
>>  >>
>>  >>  I was looking at the extensions.conf,  particularly the line in the
>  > >>  general
>>  >>  section which is
>>  >>
>>  >>  TRUNK=SIP/???????
>>  >>
>>  >>  Using this method would be easier.
>>  >>
>>  >>  How do you tell asterisk how many lines are available at the gateway
>>  >>
>>  >>
>>  >>  Dave
>>  >>  ----- Original Message -----
>>  >>  From: "Martin Pycko" <martinp at digium.com>
>>  >>  To: <asterisk-users at lists.digium.com>
>>  >>  Sent: Thursday, August 07, 2003 12:34 PM
>>  >>  Subject: Re: [Asterisk-Users] Sip Trunk config
>>  >>
>>  >>
>>  >>  > exten => _9X.,1,Dial,SIP/${EXTEN:1}@ip_of_the_gateway
>>  >>  >
>>  >>  > regards
>>  >>  > Martin
>>  >>  >
>>  >>  > On Thu, 7 Aug 2003, David Hindmarsh wrote:
>>  >>  >
>>  >>  > > Hi
>>  >>  > >
>>  >>  > > Is it possible to use a sip gateway as a trunk.
>>  >>  > >
>>  >>  > > If so,  how would I do this
>>  >>  > >
>>  >>  > > David Hindmarsh
>>  >>  > >
>>  >>  > > ----- Original Message -----
>>  >>  > > From: "Jamie Carl" <geek at jazz-inc.net>
>>  >>  > > To: <asterisk-users at lists.digium.com>
>>  >>  > > Sent: Thursday, August 07, 2003 12:14 PM
>>  >>  > > Subject: Re: [Asterisk-Users] X-Lite <-> Snom200
>>  >>  > >
>>  >>  > >
>>  >>  > > > Yes, over a LAN.  It does it with both g.711 and GSM which
>>  >>  > > > both used to work.  Havn't had a chance to have a REAL
>>  >>  > > > good look into it though.
>>  >>  > > >
>>  >>  > > > J
>>  >>  > > >
>>  >>  > > > On Wed, 06 Aug 2003 14:33:47 +0000
>>  >>  > > >   "WipeOut ." <wipeout at linuxmail.org> wrote:
>>  >>  > > > >*This message was transferred with a trial version of
>>  >>  > > > >CommuniGate(tm) Pro*
>>  >>  > > > >> *This message was transferred with a trial version of
>>  >>  > > > >>CommuniGate(tm) Pro*
>>  >>  > > > >> Dunno what I'm doing wrong here but I just did an
>>  >>  > > > >>upgrade to the latest
>>  >>  > > > >> version and now I get no audio at all!
>>  >>  > > > >> I havn't changed a single thing.  Is there anything
>>  >  > > > > >>special I need to do
>>  >  > > > > >> to get this to work again?
>>  >  > > > > >>
>>  >  > > > > >> I get a quick 'chirp' of audio, which you can tell is
>>  >  > > > > >>what I'm
>>  >  > > > > >> connecting to, (ie MOH), but then nothing.
>>  >>  > > > >>
>>  >>  > > > >>
>>  >>  > > > >> Regards,
>>  >>  > > > >>
>>  >>  > > > >> Jamie Carl
>>  >>  > > > >> Email:  geek at jazz-inc.net <mailto:egeek at jazz-inc.net>
>>  >>  > > > >> Phone:  +61 414 365 466
>>  >>  > > > >> Jabber: jazz at netmindz.net
>>  >>  > > > >>
>>  >>  > > > >
>>  >>  > > > >Are you connecting to * over a LAN?? I have experienced
>>  >>  > > > >the "chirp" when the phone was trying to use G.711 over a
>>  >>  > > > >dial up link so there was not enough bandwidth..
>>  >>  > > > >
>>  >>  > > > >
>>  >>  > > > >--
>>  >>  > > > >______________________________________________
>>  >>  > > > >http://www.linuxmail.org/
>>  >>  > > > >Now with e-mail forwarding for only US$5.95/yr
>>  >>  > > > >
>>  >>  > > > >Powered by Outblaze
>>  >  > > > > >_______________________________________________
>>  >>  > > > >Asterisk-Users mailing list
>>  >>  > > > >Asterisk-Users at lists.digium.com
>>  >>  > > > >http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >>  > > >
>>  >>  > > > Regards,
>>  >>  > > >
>>  >>  > > > Jamie Carl
>>  >>  > > > Jazz Inc.
>>  >>  > > > Email:  me at jazz-inc.net
>>  >>  > > > Web:    www.jazz-inc.net
>>  >>  > > > Phone:  +61-414-365-466
>>  >>  > > > Jabber: jazz at netmindz.net
>>  >>  > > > _______________________________________________
>>  >>  > > > Asterisk-Users mailing list
>>  >>  > > > Asterisk-Users at lists.digium.com
>>  >>  > > > http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >>  > > >
>>  >>  > >
>>  >>  > > _______________________________________________
>>  >>  > > Asterisk-Users mailing list
>>  >>  > > Asterisk-Users at lists.digium.com
>>  >>  > > http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >>  > >
>>  >>  >
>>  >>  > _______________________________________________
>>  >>  > Asterisk-Users mailing list
>>  >>  > Asterisk-Users at lists.digium.com
>>  >>  > http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >>  >
>>  >>
>>  >>  _______________________________________________
>>  >>  Asterisk-Users mailing list
>>  >>  Asterisk-Users at lists.digium.com
>>  >>  http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >
>>  >_______________________________________________
>  > >Asterisk-Users mailing list
>>  >Asterisk-Users at lists.digium.com
>>  >http://lists.digium.com/mailman/listinfo/asterisk-users
>>  >
>>  >_______________________________________________
>>  >Asterisk-Users mailing list
>>  >Asterisk-Users at lists.digium.com
>>  >http://lists.digium.com/mailman/listinfo/asterisk-users
>>
>>  _______________________________________________
>>  Asterisk-Users mailing list
>>  Asterisk-Users at lists.digium.com
>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>
>_______________________________________________
>Asterisk-Users mailing list
>Asterisk-Users at lists.digium.com
>http://lists.digium.com/mailman/listinfo/asterisk-users




More information about the asterisk-users mailing list