[Asterisk-Users] Questing regardning dialplans on a Cisco 5350

Harold Workman hworkman at cytelcom.com
Wed Jul 14 09:57:31 MST 2004


The [0-9]  Means that the first digit can be any number between 0 and 9.
This means ANYTHING will be transferred. What you are doing is creating two
dial peers with the same matched digits.  What you would really want to do
is lets say your DNIS is 2815551200 - 2815551299  you can create a few dial
peers which looks like this



dial-peer voice 1 pots
description allow DID calling to the Asterisk.  If not here, you will get a
second dialtone
 application session
 incoming called-number [0-9]T
 direct-inward-dial
 no register e164

dial-peer voice 2 pots
 preference 1
 application session
 destination-pattern [0-9]T
 no digit-strip
 port 2/0:23
 no register e164

dial-peer voice 3 voip
destination-pattern 28155512T    ( or destination-pattern 28155512..)
 progress_ind setup enable 3
 progress_ind progress enable 8
 session protocol sipv2
 session target ipv4:xxx.xxx.xxx.xxx
 dtmf-relay rtp-nte
 playout-delay minimum low
 no vad



Remember that cisco is different than Asterisk in the handling of calls.
Cisco takes the longest matched destination pattern or called-number and
attempts to connect with that dial peer  first.  The [0-9]T is actually only
matching 1 digit, the first digit.  And the 28155512T is actually matching 8
digits which means if a call came in as 2815551234 it would match more
digits to dial peer voice 3.




-----------------------
Harold Workman
CCNA, CCNP
Cytel Communications
hworkman at cytelcom.com
Ph. 281-449-4000 x3098


asterisk-users-admin at lists.digium.com wrote:
> The call is inbound on the pots dial-peer, so you should use incoming
> called-number, as opposed to destination-pattern.
>
> dial-peer voice 1 pots
>  incoming-called number [0-9]T
>  no digit-strip
>  direct-inward-dial
>  port 3/0:D
>
> I'm not familiar with the [0-9] syntax, but if it works, ok.  I
> usually use "."
> Also, you can specify the sip destination directly in the dial-peer,
> which makes using sip with the cisco's more flexible unless you're
> using a separate sip proxy.
>
> session protocol sipv2
> session target ipv4:5.5.5.5
>
> -g
>
>
>
>
> On Wed, 2004-07-14 at 07:27, micke at party.pp.se wrote:
>>
>> Hi.
>>
>>
>> If I use a Cisco as a PSTN termination GW and need to route all
>> incoming isdn calls to my asterisk and all outgoing calls from
>> asterisk via the cisco out to pstn, how do I do that ?
>>
>>
>> in the cisco I have this:
>>
>> dial-peer voice 1 pots
>>  destination-pattern [0-9]T
>>  no digit-strip
>>  direct-inward-dial
>>  port 3/0:D
>> !
>> dial-peer voice 50 voip
>>  destination-pattern [0-9]
>>  voice-class codec 1
>>  session protocol sipv2
>>  session target sip-server
>>  no vad
>>  dtmf-relay rtp-nte
>> !
>>
>>
>> -------
>>
>> But theese to dialplans seem to interrupt each other.
>>
>> When an incoming call from PSTN goes through this the pattern can be
>> matched by the first, and then be routed ot on the PSTN again,
>> creating a loop.
>>
>> How do I do this in the smartest and easiest way ?
>>
>> /Mike
>>
>> _______________________________________________
>> Asterisk-Users mailing list
>> Asterisk-Users at lists.digium.com
>> http://lists.digium.com/mailman/listinfo/asterisk-users
>> To UNSUBSCRIBE or update options visit:
>>    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
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users





More information about the asterisk-users mailing list