Mariña Varela Senín
2005-Apr-05 06:32 UTC
[Asterisk-Users] VoIP network configuration using Asterisk and SIP
Hallo,
I am trying to configure a VoIP network using two routers Cisco 2600,
each one connected to an Asterisk PBX; there is also one softelephone
connected to each PBX.
----> Figure:
-------------- ----------- ---------
--------- ------------ -------------
softphone ------- asterisk A ------- router A ----- router B ----
asterisk B ------- softphone
-------------- ----------- ---------
--------- ------------ -------------
----> Interfaces:
AsteriskA ---> fastEthernet ---> RouterA
RouterA ---> E1 ----> RouterB
RouterB --> fastEthernet --> AsteriskB
----> O.S:
Asterisk A runs on Linux Ubuntu
Asterisk B runs on Windows XP
----> IP addresses:
AsteriskA (192.168.1.2) --- (192.168.1.1) Router A
Router A (192.168.2.1) --- (192.168.2.2) Router B
Router B (192.168.3.1) --- (192.168.3.2) Asterisk B
----> Softphones
In Linux we use a Kphone
In Windows we use X-lite
----> Configuration of the Routers.
_________________________
Router A:
_________________________
hostname RouterA
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$JPk1$rv8t.miyvT6VlxmGYUcIw0
!
clock timezone GMT 0
no network-clock-participate slot 1
no network-clock-participate wic 0
no aaa new-model
ip subnet-zero
ip cef
!
!
no ftp-server write-enable
!
!
voice service voip
sip
bind all source-interface FastEthernet0/0
!
!
controller E1 0/0
channel-group 0 timeslots 1-31
!
!
interface FastEthernet0/0
ip address 192.168.1.1 255.255.255.0
ip rip send version 1 2
ip rip receive version 1 2
duplex auto
speed auto
!
interface Serial0/0:0
ip address 192.168.2.1 255.255.255.0
ip rip send version 1 2
ip rip receive version 1 2
encapsulation ppp
ip tcp header-compression iphc-format
fair-queue 64 256 47
ip rtp header-compression iphc-format
ip rtp compression-connections 30
ip rsvp bandwidth 1488 64
!
router rip
version 2
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
!
ip classless
ip http server
!
!
dial-peer voice 1 voip
destination-pattern 06815678
session protocol sipv2
session target ipv4:192.168.2.2
session transport udp
codec g711ulaw
!
sip-ua
sip-server ipv4:192.168.1.2
!
_________________________
Router B:
_________________________
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RouterB
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$VpOE$LTlD1CJRtmaLA9uBnS6Z0.
!
clock timezone GMT 0
no network-clock-participate slot 1
no network-clock-participate wic 0
no aaa new-model
ip subnet-zero
ip cef
!
!
no ftp-server write-enable
!
!
voice service voip
sip
bind all source-interface FastEthernet0/0
!
!
controller E1 0/0
channel-group 0 timeslots 1-31
!
!
interface FastEthernet0/0
ip address 192.168.3.1 255.255.255.0
ip rip send version 1 2
ip rip receive version 1 2
duplex auto
speed auto
!
interface Serial0/0:0
ip address 192.168.2.2 255.255.255.0
ip rip send version 1 2
ip rip receive version 1 2
encapsulation ppp
ip tcp header-compression iphc-format
fair-queue 64 256 47
ip rtp header-compression iphc-format
ip rtp compression-connections 30
ip rsvp bandwidth 1488 64
!
router rip
version 2
network 192.168.1.0
network 192.168.2.0
network 192.168.3.0
!
ip classless
ip http server
!
!
dial-peer voice 1 voip
destination-pattern 06811234
session protocol sipv2
session target ipv4:192.168.2.1
session transport udp
dtmf-relay rtp-nte
codec g711ulaw
no vad
!
sip-ua
retry invite 3
retry response 3
retry bye 3
retry cancel 3
timers trying 1000
sip-server ipv4:192.168.3.2
!
----> Configuration of the Asterisk
________________________
Asterisk A:
________________________
-- sip.conf
[general]
context = default
port = 5060
binaddr = 0.0.0.0
disallow = all
allow = ulaw
maxexpirey = 1500
defaultexpirey = 160
nat = no
[kphone]
type = friend
context = local-phone
username = kphone
host = dynamic
dtmfmode = inband
nat = no
disallow = all
allow = ulaw
callerid = "ubuntu" <06811234>
[192.168.1.1]
context = incoming
type = friend
host = 192.168.1.1
dtmfmode = rfc2833
disallow = all
allow = ulaw
callerid = "externa" <06815678>
-- extensions.conf
[general]
static = yes
writeprotect = no
[default]
exten => _.,1,Congestion
[incoming]
include => lan-phones
[local-phones]
include => lan-phones
include => outbound
[outbound]
exten => 06815678,1,Dial(SIP/${EXTEN}@192.168.1.1)
exten => 06815678,2,Congestion
[lan-phones]
exten => 06811234,1,Wait(2)
exten => 06811234,2,Playback(vm-goodbye)
exten => 06811234,3,Hangup
________________________
Asterisk B:
________________________
-- sip.conf
[general]
context = default
port = 5060
binaddr = 0.0.0.0
disallow = all
allow = ulaw
nat = no
[xlite]
type = friend
context = local-phone
username = xlite
host = dynamic
dtmfmode = inband
nat = no
careinvite = no
disallow = all
allow = ulaw
[192.168.3.1]
context = incoming
type = friend
host = 192.168.3.1
dtmfmode = rfc2833
disallow = all
allow = ulaw
-- extensions.conf
[general]
static = yes
writeprotect = no
[default]
exten => _.,1,Congestion
[incoming]
include => lan-phones
[local-phones]
include => lan-phones
include => outbound
[outbound]
exten => 06811234,1,Dial(SIP/${EXTEN}@192.168.3.1)
exten => 06811234,2,Congestion
[lan-phones]
exten => 06815678,1,Wait(2)
exten => 06815678,2,Playback(vm-goodbye)
exten => 06815678,3,Hangup
********************************************************************************************
The problem is the following:
- All internal calls, go
- When we try to call from one point to the network to the another it
doesn't go
For example, we try to call from the Kphone of linux, to the X-lite of Asterisk
We dial: 06815678 and it doesn't go
If we debug in Router A the CCSIP information we have:
-----------------------------------------------------------
Mar 1 02:14:18.822: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match not found
on carrier id
*Mar 1 02:14:18.822: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match
not found on Incoming called number: 06815678
*Mar 1 02:14:18.826: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match
not found on destination pattern: 06811234
.
.
.
.
.
.
.
*Mar 1 02:15:03.207:
Disconnect Cause (CC) : 3
Disconnect Cause (SIP) : 404
-----------------------------------------------------------
I have been working a whole week with these, but I don't find the
mistake. If anyone could help me, I'll be very grateful.
Thanks in advance.
Moises Silva
2005-Apr-05 06:54 UTC
[Asterisk-Users] VoIP network configuration using Asterisk and SIP
Hi. I have no time to read the whole configuration of each device, but first, i guess you have to be sure that each PBX is able to reach the other networks, may be a simple ping can tell you this. After that, i think you have to make sure that no firewall is blocking the 5060 port for the SIP calls. An finally, could you please post the Asterisk console output ?? Also you can try to make a direct IP-IP-CALL, is pretty much likely that your phones allow you to do that, try it to see what happend. Good Look. - Moy On Apr 5, 2005 1:32 PM, Mari?a Varela Sen?n <marinhavs@gmail.com> wrote:> Hallo, > > I am trying to configure a VoIP network using two routers Cisco 2600, > each one connected to an Asterisk PBX; there is also one softelephone > connected to each PBX. > > ----> Figure: > -------------- ----------- --------- > --------- ------------ ------------- > softphone ------- asterisk A ------- router A ----- router B ---- > asterisk B ------- softphone > -------------- ----------- --------- > --------- ------------ ------------- > > ----> Interfaces: > AsteriskA ---> fastEthernet ---> RouterA > RouterA ---> E1 ----> RouterB > RouterB --> fastEthernet --> AsteriskB > > ----> O.S: > > Asterisk A runs on Linux Ubuntu > Asterisk B runs on Windows XP > > ----> IP addresses: > > AsteriskA (192.168.1.2) --- (192.168.1.1) Router A > Router A (192.168.2.1) --- (192.168.2.2) Router B > Router B (192.168.3.1) --- (192.168.3.2) Asterisk B > > ----> Softphones > > In Linux we use a Kphone > In Windows we use X-lite > > ----> Configuration of the Routers. > > _________________________ > > Router A: > _________________________ > > hostname RouterA > ! > boot-start-marker > boot-end-marker > ! > enable secret 5 $1$JPk1$rv8t.miyvT6VlxmGYUcIw0 > ! > clock timezone GMT 0 > no network-clock-participate slot 1 > no network-clock-participate wic 0 > no aaa new-model > ip subnet-zero > ip cef > ! > ! > no ftp-server write-enable > ! > ! > voice service voip > sip > bind all source-interface FastEthernet0/0 > ! > ! > controller E1 0/0 > channel-group 0 timeslots 1-31 > ! > ! > interface FastEthernet0/0 > ip address 192.168.1.1 255.255.255.0 > ip rip send version 1 2 > ip rip receive version 1 2 > duplex auto > speed auto > ! > interface Serial0/0:0 > ip address 192.168.2.1 255.255.255.0 > ip rip send version 1 2 > ip rip receive version 1 2 > encapsulation ppp > ip tcp header-compression iphc-format > fair-queue 64 256 47 > ip rtp header-compression iphc-format > ip rtp compression-connections 30 > ip rsvp bandwidth 1488 64 > ! > router rip > version 2 > network 192.168.1.0 > network 192.168.2.0 > network 192.168.3.0 > ! > ip classless > ip http server > ! > ! > dial-peer voice 1 voip > destination-pattern 06815678 > session protocol sipv2 > session target ipv4:192.168.2.2 > session transport udp > codec g711ulaw > ! > sip-ua > sip-server ipv4:192.168.1.2 > ! > > _________________________ > > Router B: > _________________________ > > service timestamps debug datetime msec > service timestamps log datetime msec > no service password-encryption > ! > hostname RouterB > ! > boot-start-marker > boot-end-marker > ! > enable secret 5 $1$VpOE$LTlD1CJRtmaLA9uBnS6Z0. > ! > clock timezone GMT 0 > no network-clock-participate slot 1 > no network-clock-participate wic 0 > no aaa new-model > ip subnet-zero > ip cef > ! > ! > no ftp-server write-enable > ! > ! > voice service voip > sip > bind all source-interface FastEthernet0/0 > ! > ! > controller E1 0/0 > channel-group 0 timeslots 1-31 > ! > ! > interface FastEthernet0/0 > ip address 192.168.3.1 255.255.255.0 > ip rip send version 1 2 > ip rip receive version 1 2 > duplex auto > speed auto > ! > interface Serial0/0:0 > ip address 192.168.2.2 255.255.255.0 > ip rip send version 1 2 > ip rip receive version 1 2 > encapsulation ppp > ip tcp header-compression iphc-format > fair-queue 64 256 47 > ip rtp header-compression iphc-format > ip rtp compression-connections 30 > ip rsvp bandwidth 1488 64 > ! > router rip > version 2 > network 192.168.1.0 > network 192.168.2.0 > network 192.168.3.0 > ! > ip classless > ip http server > ! > ! > dial-peer voice 1 voip > destination-pattern 06811234 > session protocol sipv2 > session target ipv4:192.168.2.1 > session transport udp > dtmf-relay rtp-nte > codec g711ulaw > no vad > ! > sip-ua > retry invite 3 > retry response 3 > retry bye 3 > retry cancel 3 > timers trying 1000 > sip-server ipv4:192.168.3.2 > ! > > ----> Configuration of the Asterisk > > ________________________ > > Asterisk A: > ________________________ > > -- sip.conf > > [general] > context = default > port = 5060 > binaddr = 0.0.0.0 > disallow = all > allow = ulaw > maxexpirey = 1500 > defaultexpirey = 160 > nat = no > > [kphone] > type = friend > context = local-phone > username = kphone > host = dynamic > dtmfmode = inband > nat = no > disallow = all > allow = ulaw > callerid = "ubuntu" <06811234> > > [192.168.1.1] > context = incoming > type = friend > host = 192.168.1.1 > dtmfmode = rfc2833 > disallow = all > allow = ulaw > callerid = "externa" <06815678> > > -- extensions.conf > > [general] > static = yes > writeprotect = no > > [default] > exten => _.,1,Congestion > > [incoming] > include => lan-phones > > [local-phones] > include => lan-phones > include => outbound > > [outbound] > exten => 06815678,1,Dial(SIP/${EXTEN}@192.168.1.1) > exten => 06815678,2,Congestion > > [lan-phones] > exten => 06811234,1,Wait(2) > exten => 06811234,2,Playback(vm-goodbye) > exten => 06811234,3,Hangup > > ________________________ > > Asterisk B: > ________________________ > > -- sip.conf > > [general] > context = default > port = 5060 > binaddr = 0.0.0.0 > disallow = all > allow = ulaw > nat = no > > [xlite] > type = friend > context = local-phone > username = xlite > host = dynamic > dtmfmode = inband > nat = no > careinvite = no > disallow = all > allow = ulaw > > [192.168.3.1] > context = incoming > type = friend > host = 192.168.3.1 > dtmfmode = rfc2833 > disallow = all > allow = ulaw > > -- extensions.conf > > [general] > static = yes > writeprotect = no > > [default] > exten => _.,1,Congestion > > [incoming] > include => lan-phones > > [local-phones] > include => lan-phones > include => outbound > > [outbound] > exten => 06811234,1,Dial(SIP/${EXTEN}@192.168.3.1) > exten => 06811234,2,Congestion > > [lan-phones] > exten => 06815678,1,Wait(2) > exten => 06815678,2,Playback(vm-goodbye) > exten => 06815678,3,Hangup > > ******************************************************************************************** > The problem is the following: > > - All internal calls, go > - When we try to call from one point to the network to the another it doesn't go > > For example, we try to call from the Kphone of linux, to the X-lite of Asterisk > > We dial: 06815678 and it doesn't go > > If we debug in Router A the CCSIP information we have: > > ----------------------------------------------------------- > Mar 1 02:14:18.822: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match not found > on carrier id > *Mar 1 02:14:18.822: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match > not found on Incoming called number: 06815678 > *Mar 1 02:14:18.826: CCSIP-SPI-CONTROL: sipSPIMatchSrcIpGroup: Match > not found on destination pattern: 06811234 > . > . > . > . > . > . > . > *Mar 1 02:15:03.207: > Disconnect Cause (CC) : 3 > Disconnect Cause (SIP) : 404 > ----------------------------------------------------------- > > I have been working a whole week with these, but I don't find the > mistake. If anyone could help me, I'll be very grateful. > > Thanks in advance. > _______________________________________________ > 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 >