SIP phones can make outbound calls - ZAP can't

Hi

Picture this

  1. Asterisk server on Atcom IP02
  2. A SIP phone successfully registered and able to navigate dialplan - including dialling a SIP connected trunk, an IAX2 connected trunk, a ZAP connected trunk, and the ZAP phone connected directly to the box.
  3. An analog phone on the ZAP/1 port that can only navigate part of the dial plan - even though it uses the same context as the SIP phone. Dialling the SIP phone extension, okay. Outbound on the ZAP trunk, ok. Outbound on the SIP trunk and the IAX2 trunks, NOT OK.
sip.conf: (usernames and passwords changed)
======

[general]
registerattempts=0
registertimeout=20
register => mynumber:mypassword@myprovider.url/mynumber

[myprovider]
type=friend
username=mynumber
fromuser=mynumber
secret=mypassword
host=myprovider.url
context=trunk_SIP
dtmfmode=rfc2833
diallow=all
allow=ilbc
allow=gsm
allow=alaw
allow=ulaw
canreinvite=no
insecure=very

[1000]
type=friend
context=phones
host=dynamic
secret=password
iax.conf:
======
[general]
autokill = yes
disallow = all
allow = undefined,ulaw,alaw,gsm,g729
trunk = yes
register => myothernumber:mypassword@myiaxprovider.url

[myothernumber]
type = friend
username = myothernumber
trunk = yes
context = trunk_IAX
host = myiaxprovider.url
secret = mypassword
auth = md5
disallow = all
allow = gsm
allow = alaw
allow = ulaw
extensions.conf:
============
[globals]

[general]
autofallthrough=yes

[default]
exten => s,1,Verbose(1|Unrouted call handler)
exten => s,n,Answer()
exten => s,n,Wait(1)
exten => s,n,Playback(tt-weasels)
exten => s,n,Hangup()

[incoming]

[internal]
exten => 500,1,Verbose(1|Echo test application)
exten => 500,n,Answer()
exten => 500,n,Wait(1)
exten => 500,n,Playback(tt-weasels)
exten => 500,n,Hangup()

exten => 501,1,Dial(Zap/1)

exten => 502,1,Dial(SIP/1000)

;! choose one to test
;! exten => _09X.,1,Dial(ZAP/2/${EXTEN})
;! exten => _09X.,1,Dial(SIP/${EXTEN}@myprovider)
exten => _09X.,1,Dial(IAX2/myiaxnumber/${EXTEN})

[phones]
include => internal
include => external
[external]


[trunk_ZAP]
exten => s,1,Dial(ZAP/1)

[trunk_IAX]
exten => myiaxnumber,1,Dial(SIP/1000)

[trunk_SIP]
exten => mynumber,1,Dial(ZAP/1)

Here is the output from the console for the unsuccessful call (identifying info deleted):

Really destroying SIP dialog '128af7f958b5f309517419b669c3cdff@202.180.76.163' Method: OPTIONS
    -- Starting simple switch on 'Zap/1-1'
    -- Executing [mycallednumber@phones:1] Dial("Zap/1-1", "IAX2/myiaxnumber/mycallednumber") in new stack
    -- Called myiaxnumber/mycallednumber
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: NEW
   Timestamp: 00018ms  SCall: 01024  DCall: 00000 [202.180.76.163:4569]
   VERSION         : 2
   CALLED NUMBER   : mycallednumber
   CODEC_PREFS     : (ulaw|gsm|alaw)
   CALLING NUMBER  :
   CALLING PRESNTN : 0
   CALLING TYPEOFN : 0
   CALLING TRANSIT : 0
   CALLING NAME    :
   LANGUAGE        : en
   USERNAME        : myiaxnumber
   FORMAT          : 4
   CAPABILITY      : 57358
   ADSICPE         : 2
   DATE TIME       : 2009-11-14  21:50:24

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00018ms  SCall: 01550  DCall: 01024 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: AUTHREQ
   Timestamp: 00007ms  SCall: 01550  DCall: 01024 [202.180.76.163:4569]
   AUTHMETHODS     : 2
   CHALLENGE       : 149571486
   USERNAME        : myiaxnumber
IP04*CLI>
Tx-Frame Retry[000] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: AUTHREP
   Timestamp: 00121ms  SCall: 01024  DCall: 01550 [202.180.76.163:4569]
   MD5 RESULT      : b966d6f5ab44e5c67c6d2e330dfefaa6

Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: ACK
   Timestamp: 00121ms  SCall: 01550  DCall: 01024 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 001 ISeqno: 002 Type: IAX     Subclass: ACCEPT
   Timestamp: 00108ms  SCall: 01550  DCall: 01024 [202.180.76.163:4569]
   FORMAT          : 2
IP04*CLI>
    -- Call accepted by 202.180.76.163 (format gsm)
    -- Format for call is gsm
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: ACK
   Timestamp: 00108ms  SCall: 01024  DCall: 01550 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 002 ISeqno: 002 Type: IAX     Subclass: HANGUP
   Timestamp: 00119ms  SCall: 01550  DCall: 01024 [202.180.76.163:4569]
   CAUSE CODE      : 16
IP04*CLI>
Tx-Frame Retry[-01] -- OSeqno: 002 ISeqno: 003 Type: IAX     Subclass: ACK
   Timestamp: 00119ms  SCall: 01024  DCall: 01550 [202.180.76.163:4569]
    -- Hungup 'IAX2/myiaxnumber-1024'
    -- No one is available to answer at this time (1:0/0/0)
  == Auto fallthrough, channel 'Zap/1-1' status is 'NOANSWER'
    -- Hungup 'Zap/1-1'
Tx-Frame Retry[000] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: REGREQ
   Timestamp: 00016ms  SCall: 00934  DCall: 00000 [202.180.76.163:4569]
   USERNAME        : myiaxnumber
   REFRESH         : 60

Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00016ms  SCall: 08703  DCall: 00934 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: REGACK
   Timestamp: 00002ms  SCall: 08703  DCall: 00934 [202.180.76.163:4569]
   USERNAME        : myiaxnumber
   DATE TIME       : 2009-11-14  21:50:30
   REFRESH         : 60
   APPARENT ADDRES : IPV4 111.69.28.1:4569
   MESSAGE COUNT   : 0
   CALLING NUMBER  : myiaxnumber
   CALLING NAME    : xxxxxxxxxxxx
IP04*CLI>
Tx-Frame Retry[-01] -- OSeqno: 001 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00002ms  SCall: 00934  DCall: 08703 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 000 Type: IAX     Subclass: POKE
   Timestamp: 00016ms  SCall: 13975  DCall: 00000 [202.180.76.163:4569]
Rx-Frame Retry[ No] -- OSeqno: 000 ISeqno: 001 Type: IAX     Subclass: ACK
   Timestamp: 00110ms  SCall: 13975  DCall: 00001 [202.180.76.163:4569]
Really destroying SIP dialog '1c6642d119046bc114f98e863cc422ea@202.180.76.163' Method: OPTIONS
IP04*CLI> exit

Can anyone help me with this?

You haven’t included the zapata.conf file. However, your extensions.conf either has a redundant zap_trunk context, or it is not true that the zaptel line uses the same context as the internal SIP extension.

Also note that you shouldn’t be using zaptel for new installs; it has been replaced by dahdi.

Thanks for your reply

I have two ZAP ports. A ZAP trunk, and a ZAP phone.

[trunkgroups]
[channels]
usecallerid=yes
hidecallerid=no
usecallingpres=yes
echocancel=yes
echocancelwhenbridged=yes
busydetect=yes
busycount=5
immediate=no

context=phones
signalling = fxo_ks
channel => 1

context=trunk_ZAP
signalling=fxs_ks
channel => 2
~

I am running 1.4.21.2