[Asterisk-Users] SIP -> PSTN calls not connecting properly

Ronan Mullally ronan at iol.ie
Fri Jun 23 06:04:43 MST 2006


Hi,

I've got a problem with my asterisk set up which has been going on for a
while (months).  I'm currently running 1.2.7.1 on a gentoo box with the
topology below:


                     +-----+
       PSTN ---------+  *  +------------- Service Provider
       (wctdm400p)   +-+-+-+     IAX
                       | |
                       | |
                 FXS --+ +-- SIP (cisco 7940)


I can make calls from the FXS port to the PSTN or my IAX service provider
without any problems.

I can make calls from my SIP phone to my IAX service provider, also without
any problems.

I can receive calls to the FXS port and SIP phone without any problems.

However, when I call from my SIP phone to the PSTN my calls die, repeatedly,
after 2-3 minutes.  The display on the phone shows 'Session Progress (in
183)' for the duration of the call, rather than 'Connected', so it looks
like the SIP phone is not recognising call connection on the PSTN.

Output from the console is as follows:

    -- Executing Dial("SIP/ronan-5e0e", "Zap/4/xxxxxxxxxxx") in new stack
    -- Called 4/xxxxxxxxxxx
    -- Hungup 'Zap/4-1'
  == Spawn extension (default, xxxxxxxxxxx, 1) exited non-zero on 'SIP/ronan-5e0e'

A packet trace from the * box shows:

 ...

 16.758516  192.168.2.9 -> 192.168.2.30 UDP Source port: 12230  Destination port: 31042
 16.758595 192.168.2.30 -> 192.168.2.9  UDP Source port: 31042  Destination port: 12230
 16.778540  192.168.2.9 -> 192.168.2.30 UDP Source port: 12230  Destination port: 31042
 16.779004 192.168.2.30 -> 192.168.2.9  UDP Source port: 31042  Destination port: 12230
 16.790884 192.168.2.30 -> 192.168.2.9  SIP Request: CANCEL sip:xxxxxxxxxxx at 192.168.2.9;user=phone
 16.791266  192.168.2.9 -> 192.168.2.30 SIP Status: 487 Request Terminated
 16.791477  192.168.2.9 -> 192.168.2.30 SIP Status: 200 OK

(192.168.2.9 is the * box, .30 is the phone)

This has been going on for some time, but I've put up with it as the
majority of my calls are short so it's not a big issue.  As a result I'm
unsure when the problem started, so I've no idea what change I made to the
config that caused it.  I'm fairly sure the change is on asterisk as I've
not touched the config on the 7940 in a long time.

My zaptel.conf, zapata.conf and sip.conf files are below, any suggestions or
clue transfer would be much appreciated.


-Ronan

# zaptel.conf
loadzone=uk
defaultzone=uk
fxsks=4
fxoks=1-3

# zapata.conf
[channels]
group = 0
context = incoming-POTS
signalling = fxs_ks
rxgain=10.0
txgain=6.0
echocancel=yes
echocancelwhenbridged=no
echotraining=300
immediate=no
busydetect=no
busycount=5
answeronpolarityswitch=yes
hanguponpolarityswitch=yes
callprogress=yes
callwaiting=yes
relaxdtmf=no
progzone=uk
useincomingcalleridonzaptransfer = yes
usecallerid=no
callerid=asreceived
cidsignalling=v23
cidstart=polarity
ukcallerid=yes
channel => 4

# sip.conf
[general]
allow=ulaw
allow=alaw
allow=gsm
allow=g723.1
context=incoming
recordhistory=yes
port=5060
bindaddr=0.0.0.0
srvlookup=yes
tos=lowdelay
defaultexpirey=120
nat=no
localnet=192.168.0.0/255.255.252.0

[ronan]
regextension=ronan
regcontext=4L
mailbox=100 at default
callerid=Ronan Mullally <100>
restrictcid=no
callgroup=1,2
pickupgroup=1,2
host=dynamic
language=en
type=friend
context=default
username=ronan
secret=xxxxxxxxx
fromdomain=4L.ie
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=g723.1
qualify=100
accountcode=ronan



More information about the asterisk-users mailing list