Why not just have the Asterisk server act as a SIP/H323 gateway instead of the cisco router? You can then send incoming calls to registered Asterisk users via the cisco router and outgoing calls from Asterisk users to the PSTN via the cisco router. You can still use your same config below, but send the VoIP sessions through Asterisk and let it parse out where the calls need to go and send it to the cisco if you want to terminate traffic. On Tuesday 30 November 2004 01:35 pm, Jan Baggen wrote:> I have 2610 XM with 1 Fastethernet and VIC2-2BRI. Dialin and dialout over > pots is ok. Also inbound pots calls get redirected to Asterisk y.y.y.y > So far so good. > > But I want to setup VOIP sessions with local carrier. I added dial-peer > 40 for this. Session target x.x.x.x But calls will always get routed to > the pstn peers 50 and 60. Peer x.x.x.x is never contacted or tried. > > My situation: > PSTN -> CISCO -> ASTERISK OK > ASTERISK -> CISCO -> PSTN OK > ASTERISK -> CISCO -> VOIP NOT OK (only needs outbound calls) > > > SIP01#sh dial-peer voice summary > dial-peer hunt 0 > TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET > STAT PORT > 10 pots up up 0 down 1/0/0 > 20 pots up up 0 down 1/0/1 > 30 voip up up 2012345.. 0 syst > ipv4:y.y.y.y:5060 > 40 voip up up .+ 0 syst > ipv4:x.x.x.x:5060 > 50 pots up up .+ 5 up 1/0/0 > 60 pots up up .+ 5 up 1/0/1 > > > > dial-peer voice 10 pots > description INBOUND CALLS PSTN BRI0 > incoming called-number 2012345.. > no digit-strip > direct-inward-dial > port 1/0/0 > ! > dial-peer voice 20 pots > description INBOUND CALLS PSTN BRI1 > incoming called-number 2012345.. > no digit-strip > direct-inward-dial > port 1/0/1 > ! > dial-peer voice 30 voip > description INBOUND CALLS VOIP ASTERISK > destination-pattern 2051860.. > session protocol sipv2 > session target ipv4:y.y.y.y:5060 > session transport udp > dtmf-relay sip-notify > codec g711alaw > no vad > ! > dial-peer voice 40 voip > description OUTBOUND CALLS VOIP CARRIER > destination-pattern .+ > session protocol sipv2 > session target ipv4:x.x.x.x:5060 > session transport tcp > dtmf-relay sip-notify > codec g711alaw > no vad > ! > dial-peer voice 50 pots > tone ringback alert-no-PI > description OUTBOUND CALLS PSTN BRI0 > preference 5 > destination-pattern .+ > no digit-strip > port 1/0/0 > ! > dial-peer voice 60 pots > tone ringback alert-no-PI > description OUTBOUND CALLS PSTN BRI1 > preference 5 > destination-pattern .+ > no digit-strip > port 1/0/1 > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@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-- Brian Wilkins Software Engineer brian@hcc.net Heritage Communications Corporation Melbourne, FL USA 32935 321.308.4000 x33 http://www.hcc.net
I have 2610 XM with 1 Fastethernet and VIC2-2BRI. Dialin and dialout over pots is ok. Also inbound pots calls get redirected to Asterisk y.y.y.y So far so good. But I want to setup VOIP sessions with local carrier. I added dial-peer 40 for this. Session target x.x.x.x But calls will always get routed to the pstn peers 50 and 60. Peer x.x.x.x is never contacted or tried. My situation: PSTN -> CISCO -> ASTERISK OK ASTERISK -> CISCO -> PSTN OK ASTERISK -> CISCO -> VOIP NOT OK (only needs outbound calls) SIP01#sh dial-peer voice summary dial-peer hunt 0 TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 10 pots up up 0 down 1/0/0 20 pots up up 0 down 1/0/1 30 voip up up 2012345.. 0 syst ipv4:y.y.y.y:5060 40 voip up up .+ 0 syst ipv4:x.x.x.x:5060 50 pots up up .+ 5 up 1/0/0 60 pots up up .+ 5 up 1/0/1 dial-peer voice 10 pots description INBOUND CALLS PSTN BRI0 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/0 ! dial-peer voice 20 pots description INBOUND CALLS PSTN BRI1 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/1 ! dial-peer voice 30 voip description INBOUND CALLS VOIP ASTERISK destination-pattern 2051860.. session protocol sipv2 session target ipv4:y.y.y.y:5060 session transport udp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 40 voip description OUTBOUND CALLS VOIP CARRIER destination-pattern .+ session protocol sipv2 session target ipv4:x.x.x.x:5060 session transport tcp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 50 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI0 preference 5 destination-pattern .+ no digit-strip port 1/0/0 ! dial-peer voice 60 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI1 preference 5 destination-pattern .+ no digit-strip port 1/0/1
I think you may be disappointed. Cisco cannot 'hair-pin' VoIP calls. My last attempt at this was with the 12.2T series, so it may work with newer IOS releases, but I wouldn't be surprised if not. If you cannot send the VoIP calls directly from Asterisk, I suggest trying a more specific Destination-Pattern on Dial-Peer 40, and/or using Answer-Address to identify the calling numbers to be linked to this peer. Dan -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Jan Baggen Sent: Tuesday, November 30, 2004 5:36 AM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] cisco dial-peer voip I have 2610 XM with 1 Fastethernet and VIC2-2BRI. Dialin and dialout over pots is ok. Also inbound pots calls get redirected to Asterisk y.y.y.y So far so good. But I want to setup VOIP sessions with local carrier. I added dial-peer 40 for this. Session target x.x.x.x But calls will always get routed to the pstn peers 50 and 60. Peer x.x.x.x is never contacted or tried. My situation: PSTN -> CISCO -> ASTERISK OK ASTERISK -> CISCO -> PSTN OK ASTERISK -> CISCO -> VOIP NOT OK (only needs outbound calls) SIP01#sh dial-peer voice summary dial-peer hunt 0 TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 10 pots up up 0 down 1/0/0 20 pots up up 0 down 1/0/1 30 voip up up 2012345.. 0 syst ipv4:y.y.y.y:5060 40 voip up up .+ 0 syst ipv4:x.x.x.x:5060 50 pots up up .+ 5 up 1/0/0 60 pots up up .+ 5 up 1/0/1 dial-peer voice 10 pots description INBOUND CALLS PSTN BRI0 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/0 ! dial-peer voice 20 pots description INBOUND CALLS PSTN BRI1 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/1 ! dial-peer voice 30 voip description INBOUND CALLS VOIP ASTERISK destination-pattern 2051860.. session protocol sipv2 session target ipv4:y.y.y.y:5060 session transport udp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 40 voip description OUTBOUND CALLS VOIP CARRIER destination-pattern .+ session protocol sipv2 session target ipv4:x.x.x.x:5060 session transport tcp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 50 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI0 preference 5 destination-pattern .+ no digit-strip port 1/0/0 ! dial-peer voice 60 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI1 preference 5 destination-pattern .+ no digit-strip port 1/0/1 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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
You have 3 dial-peers (40,50,60) all with the same destination-pattern .+ (that means all calls) Think it first tries dial-peer 40 because it has preference 0... And then peers 50 (or) 60 (both preference 5) ... It uses the second preference because the peer 40 just doesn't work.... And that sounds logically because you have "session transport tcp" ... And asterisk doesn't support that... Use "session transport udp" Regards, Niels -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Jan Baggen Sent: Tuesday, November 30, 2004 2:36 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] cisco dial-peer voip I have 2610 XM with 1 Fastethernet and VIC2-2BRI. Dialin and dialout over pots is ok. Also inbound pots calls get redirected to Asterisk y.y.y.y So far so good. But I want to setup VOIP sessions with local carrier. I added dial-peer 40 for this. Session target x.x.x.x But calls will always get routed to the pstn peers 50 and 60. Peer x.x.x.x is never contacted or tried. My situation: PSTN -> CISCO -> ASTERISK OK ASTERISK -> CISCO -> PSTN OK ASTERISK -> CISCO -> VOIP NOT OK (only needs outbound calls) SIP01#sh dial-peer voice summary dial-peer hunt 0 TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 10 pots up up 0 down 1/0/0 20 pots up up 0 down 1/0/1 30 voip up up 2012345.. 0 syst ipv4:y.y.y.y:5060 40 voip up up .+ 0 syst ipv4:x.x.x.x:5060 50 pots up up .+ 5 up 1/0/0 60 pots up up .+ 5 up 1/0/1 dial-peer voice 10 pots description INBOUND CALLS PSTN BRI0 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/0 ! dial-peer voice 20 pots description INBOUND CALLS PSTN BRI1 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/1 ! dial-peer voice 30 voip description INBOUND CALLS VOIP ASTERISK destination-pattern 2051860.. session protocol sipv2 session target ipv4:y.y.y.y:5060 session transport udp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 40 voip description OUTBOUND CALLS VOIP CARRIER destination-pattern .+ session protocol sipv2 session target ipv4:x.x.x.x:5060 session transport tcp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 50 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI0 preference 5 destination-pattern .+ no digit-strip port 1/0/0 ! dial-peer voice 60 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI1 preference 5 destination-pattern .+ no digit-strip port 1/0/1 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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
What software version do u've, just 12.3T, support IP2IP feature. I suggest you to use * instead -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of niels@wxn.nl Sent: Tuesday, November 30, 2004 10:53 AM To: asterisk-users@lists.digium.com Subject: RE: [Asterisk-Users] cisco dial-peer voip You have 3 dial-peers (40,50,60) all with the same destination-pattern .+ (that means all calls) Think it first tries dial-peer 40 because it has preference 0... And then peers 50 (or) 60 (both preference 5) ... It uses the second preference because the peer 40 just doesn't work.... And that sounds logically because you have "session transport tcp" ... And asterisk doesn't support that... Use "session transport udp" Regards, Niels -----Original Message----- From: asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of Jan Baggen Sent: Tuesday, November 30, 2004 2:36 PM To: asterisk-users@lists.digium.com Subject: [Asterisk-Users] cisco dial-peer voip I have 2610 XM with 1 Fastethernet and VIC2-2BRI. Dialin and dialout over pots is ok. Also inbound pots calls get redirected to Asterisk y.y.y.y So far so good. But I want to setup VOIP sessions with local carrier. I added dial-peer 40 for this. Session target x.x.x.x But calls will always get routed to the pstn peers 50 and 60. Peer x.x.x.x is never contacted or tried. My situation: PSTN -> CISCO -> ASTERISK OK ASTERISK -> CISCO -> PSTN OK ASTERISK -> CISCO -> VOIP NOT OK (only needs outbound calls) SIP01#sh dial-peer voice summary dial-peer hunt 0 TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT 10 pots up up 0 down 1/0/0 20 pots up up 0 down 1/0/1 30 voip up up 2012345.. 0 syst ipv4:y.y.y.y:5060 40 voip up up .+ 0 syst ipv4:x.x.x.x:5060 50 pots up up .+ 5 up 1/0/0 60 pots up up .+ 5 up 1/0/1 dial-peer voice 10 pots description INBOUND CALLS PSTN BRI0 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/0 ! dial-peer voice 20 pots description INBOUND CALLS PSTN BRI1 incoming called-number 2012345.. no digit-strip direct-inward-dial port 1/0/1 ! dial-peer voice 30 voip description INBOUND CALLS VOIP ASTERISK destination-pattern 2051860.. session protocol sipv2 session target ipv4:y.y.y.y:5060 session transport udp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 40 voip description OUTBOUND CALLS VOIP CARRIER destination-pattern .+ session protocol sipv2 session target ipv4:x.x.x.x:5060 session transport tcp dtmf-relay sip-notify codec g711alaw no vad ! dial-peer voice 50 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI0 preference 5 destination-pattern .+ no digit-strip port 1/0/0 ! dial-peer voice 60 pots tone ringback alert-no-PI description OUTBOUND CALLS PSTN BRI1 preference 5 destination-pattern .+ no digit-strip port 1/0/1 _______________________________________________ Asterisk-Users mailing list Asterisk-Users@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@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
> What software version do u've, just 12.3T, support IP2IP feature. > I suggest you to use * insteadip2ip did the trick! The dial-peer is now matched! But got 302 back from Cisco gateway on Asterisk: -- Called 084012345678901@y.y.y.y -- Got SIP response 302 "Moved Temporarily" back from y.y.y.y -- Now forwarding SIP/user-3e76 to 'Local/084012345678901@default' (thanks to SIP/y.y.y.y-6068) No packets are sent to the VOIP gateway x.x.x.x (x.x.x.x is on local LAN and tcpdump has seen no packets at all) dial-peer voice 40 voip destination-pattern .+ redirect ip2ip session protocol sipv2 session target ipv4:x.x.x.x:5060 session transport udp codec g711alaw no vad