Fxs won't sip my zap!?!?

When I try to dial out from my TDM01 fxs card, I get the following:

Rocket*CLI>
– Starting simple switch on ‘Zap/1-1’
– Executing [98@outgoing:1] Answer(“Zap/1-1”, “”) in new stack
– Executing [98@outgoing:2] BackGround(“Zap/1-1”, “enter-ext-of-person”) in new stack
– <Zap/1-1> Playing ‘enter-ext-of-person’ (language ‘en’)
– Executing [98@outgoing:3] WaitExten(“Zap/1-1”, “15”) in new stack
== CDR updated on Zap/1-1
– Executing [104@outgoing:1] Dial(“Zap/1-1”, “SIP/104@192.168.11.5”) in new stack

Note that it’s dialing out on “Zap/1-1”… however, my extensions.conf file tells it to:

[out_link]
exten => _1XX,1,Dial(SIP/${EXTEN}@192.168.11.5)
exten => _1XX,2,Congestion()
exten => _1XX,102,Congestion()
exten => _1XX,n,hangup
exten => i,1,Playback(pbx-invalid)
exten => i,n,hangup
exten => t,1,Playback(vm-goodbye)
exten => t,n,hangup

[outgoing]
exten => _9X,1,Answer()
exten => _9X,n,Background(enter-ext-of-person)
exten => _9X,n,WaitExten(15)
exten => _9X,n,Goto(out_link,s,1)
exten => _9X,n,hangup
include => out_link

;*********************************
; my zapata.conf is:
[channels]
context=outgoing
signalling=fxo_ks
echocancel=yes
echocancelwhenbridged=yes
channel => 1

So why is the “Zap/1-1” getting inserted there?? It doesn’t make sense that I’d be sending a SIP command to the fxs phone line…

edit: re-read your dial plan…
i dont have an answer now really,

but in the cli do “show channels” as its doing this.
I dont think it is connecting to the zap channel physically, it just looks like it. Someone else know why it does that?

It definitely appears to be confused about where and how to process the connection. When I first dial 104, it displays what I showed above, then just sits there doing nothing. After a period of time, it appears to time out on whatever it was waiting for, and then it sends the normal first INVITE to the ethernet!! The resulting communication is:

Audio is at 192.168.11.6 port 19426
Adding codec 0x2 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 192.168.11.5:5060:
INVITE sip:104@192.168.11.5 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.6:5060;branch=z9hG4bK64495b20;rport
From: “asterisk” sip:asterisk@192.168.11.6;tag=as5b512fd6
To: sip:104@192.168.11.5
Contact: sip:asterisk@192.168.11.6
Call-ID: 403e7c84035a4ae4034a91154b707874@192.168.11.6
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 03 Jan 2008 21:33:06 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 237

v=0
o=root 3691 3691 IN IP4 192.168.11.6
s=session
c=IN IP4 192.168.11.6
t=0 0
m=audio 19426 RTP/AVP 3 101
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv


-- Called 104@192.168.11.5

Rocket*CLI>
<— SIP read from 192.168.11.5:5060 —>
SIP/2.0 407 Proxy Authentication Required
Via: SIP/2.0/UDP 192.168.11.6:5060;branch=z9hG4bK64495b20;received=192.168.11.6;rport=5060
From: “asterisk” sip:asterisk@192.168.11.6;tag=as5b512fd6
To: sip:104@192.168.11.5;tag=as3cfe47f4
Call-ID: 403e7c84035a4ae4034a91154b707874@192.168.11.6
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Proxy-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="774ea929"
Content-Length: 0

<------------->
— (11 headers 0 lines) —
Transmitting (no NAT) to 192.168.11.5:5060:
ACK sip:104@192.168.11.5 SIP/2.0
Via: SIP/2.0/UDP 192.168.11.6:5060;branch=z9hG4bK64495b20;rport
From: “asterisk” sip:asterisk@192.168.11.6;tag=as5b512fd6
To: sip:104@192.168.11.5;tag=as3cfe47f4
Contact: sip:asterisk@192.168.11.6
Call-ID: 403e7c84035a4ae4034a91154b707874@192.168.11.6
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


[Jan 3 14:33:06] NOTICE[3721]: chan_sip.c:12164 handle_response_invite: Failed to authenticate on INVITE to ‘“asterisk” sip:asterisk@192.168.11.6;tag=as5b512fd6’
– SIP/192.168.11.5-081e97e0 is circuit-busy
== Everyone is busy/congested at this time (1:0/1/0)
– Executing [104@outgoing:2] Congestion(“Zap/1-1”, “”) in new stack
Really destroying SIP dialog ‘403e7c84035a4ae4034a91154b707874@192.168.11.6’ Method: INVITE

//******************************************
but, basically, it has timed out at this point, and just stops processing… very strange…

exten => _1XX,1,Dial(SIP/${EXTEN}@192.168.11.5)

what is 192.168.11.5?
Is that another asterisk box that the SIP phones are on? I havent seen it done like this before…we just build IAX connection between remote servers…

try ‘sip show peers’ curious what the status is at least.
Can you call from 104 to the phone you were dialing from?

Aye, I have two machines, connected by ethernet;

192.168.11.5 - FXO (TDM01) (rocket)
192.168.11.6 - FXS (TDM10) (mhub)

If I call in from the outside line (via the FXO) I get a ring on the FXS phone line. However, when the phone is answered, voice from phone->pstn is fine, voice from pstn->phone is not received. That’s a separate problem that I’m still trying to diagnose!!

If I call out from the phone line (FXS), I get the situation that is described here.

I’ve never used IAX before, is it easier to configure?? I’m using SIP because we have past experience with it (when we had external FXO/FXS boxes), but this situation does appear to be fairly different.

//*************************************
oops, I forgot to answer your other question about peers:

On the FXS:
Rocket*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
mhub/mhub 192.168.11.5 5060 Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]

On the FXO:
hub26*CLI> sip show peers
Name/username Host Dyn Nat ACL Port Status
rocket/mhub 192.168.11.6 5060 Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]

In fact, this probably describes my problem, but I don’t know what it’s telling me. On the FXS side, I have a friend ‘mhub’, which is of course the FXO. However, when I initially had the username for mhub set to ‘mhub’, it failed authentication when I dialed in from pstn - because rocket was expecting its own name for some reason!! So I changed the mhub username to rocket, and that got me past authentication, but I have the other problem described above.

Alot of your one way audio is probably due to the sip trunking between the asterisk servers.

IAX2 does this by just using one port. It either works or doesnt work, you wont get the 1 way audio problems.

We got asterisks setup like this all over and works great.

voip-info.org/wiki/index.php … al+servers
Check that out that will get you started on it.

(nevermind this post)

[quote=“Dan Miller”]hmmm… I still have to register/authenticate, even with iax…
Can I just turn that off?? We always have a well-defined, static network, I know who everyone is, all the time, I don’t need to waste effort on this…[/quote]

“So I changed the mhub username to rocket, and that got me past authentication, but I have the other problem described above.”

So is the Sip phone 104 working?
you fixed that problem i thought you said…

your phones use sip. connection between your asterisk servers use iax.
Knowing if your phones are still working, and which ones aren’t helps in debugging. Without the authorization you would not know without calling each one.

Nay, my phones are plain old analog phones, which plug into Digium FXO(phone line)/FXS (phone) cards, and use Zaptel drivers (which seem to work fine).

The only reason I was using SIP in Asterisk is because I had past experience with it, but my past experience (which used external hardware) wasn’t transferring very well. So I’m trying to convert to IAX, as you suggested, but it’ll take a little more work before I understand what I’m doing!!

Fortunately, the link that you provided seems to have many good examples, hopefully they’ll eventually work with my hardware!!!

Mah Heero!!!

Our system is working great with IAX!! Thanks for the tip, IAX is significantly easier to set up than SIP…

Have a nice weekend…

[quote=“Dan Miller”]Mah Heero!!!

Our system is working great with IAX!! Thanks for the tip, IAX is significantly easier to set up than SIP…

Have a nice weekend…[/quote]

Yep glad to help out.

Ahh you got analag phones connected to your Digium. You should have mentioned that at the beginning :smiley: