Failure with clean installation - receive 603 declined from PBX

Hi,

Today I installed version 2.9.0 and created 1 extension with my outbound routes and trunks. Unfortunately outbound call does not work.
My phone receives a “DECLINED” message from Asterisk and I don’t understand why.

Could anyone guide me about the failure please ?
I get the following output on Asterisk console:

router*CLI> 

<--- SIP read from UDP:192.168.254.5:5060 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-89e3a4df
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 101 INVITE
Max-Forwards: 70
Contact: Home <sip:[email protected]:5060>
Expires: 240
User-Agent: Linksys/SPA3102-5.1.10(GW)
Content-Length: 304
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp

v=0
o=- 56213 56213 IN IP4 192.168.254.5
s=-
c=IN IP4 192.168.254.5
t=0 0
m=audio 16416 RTP/AVP 18 0 8 100 101
a=rtpmap:18 G729a/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
<------------->
--- (14 headers 15 lines) ---
  == Using UDPTL TOS bits 184
  == Using UDPTL CoS mark 5
Sending to 192.168.254.5:5060 (no NAT)
Using INVITE request as basis request - [email protected]
Found peer '995' for '995' from 192.168.254.5:5060

<--- Reliably Transmitting (no NAT) to 192.168.254.5:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-89e3a4df;received=192.168.254.5
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>;tag=as205d6115
Call-ID: [email protected]
CSeq: 101 INVITE
Server: FPBX-2.9.0(1.8.4.4)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="20387cf5"
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '[email protected]' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.254.5:5060 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-89e3a4df
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>;tag=as205d6115
Call-ID: [email protected]
CSeq: 101 ACK
Max-Forwards: 70
Contact: Home <sip:[email protected]:5060>
User-Agent: Linksys/SPA3102-5.1.10(GW)
Content-Length: 0

<------------->
--- (10 headers 0 lines) ---

<--- SIP read from UDP:192.168.254.5:5060 --->
INVITE sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-61b9ae2f
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
Max-Forwards: 70
Authorization: Digest username="995",realm="asterisk",nonce="20387cf5",uri="sip:[email protected]",algorithm=MD5,response="a57f766d866d5072a2b63e994a6dbf35"
Contact: Home <sip:[email protected]:5060>
Expires: 240
User-Agent: Linksys/SPA3102-5.1.10(GW)
Content-Length: 304
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: x-sipura, replaces
Content-Type: application/sdp

v=0
o=- 56213 56213 IN IP4 192.168.254.5
s=-
c=IN IP4 192.168.254.5
t=0 0
m=audio 16416 RTP/AVP 18 0 8 100 101
a=rtpmap:18 G729a/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:100 NSE/8000
a=fmtp:100 192-193
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:30
a=sendrecv
<------------->
--- (15 headers 15 lines) ---
Sending to 192.168.254.5:5060 (no NAT)
Using INVITE request as basis request - [email protected]
Found peer '995' for '995' from 192.168.254.5:5060
  == Using SIP RTP TOS bits 184
  == Using SIP RTP CoS mark 5
Found RTP audio format 18
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 100
Found RTP audio format 101
Found audio description format G729a for ID 18
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format NSE for ID 100
Found audio description format telephone-event for ID 101
Capabilities: us - 0x8 (alaw), peer - audio=0x10c (ulaw|alaw|g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8 (alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
Peer audio RTP is at port 192.168.254.5:16416
Looking for 3616246 in from-internal (domain 192.168.254.254)
list_route: hop: <sip:[email protected]:5060>

<--- Transmitting (no NAT) to 192.168.254.5:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-61b9ae2f;received=192.168.254.5
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>
Call-ID: [email protected]
CSeq: 102 INVITE
Server: FPBX-2.9.0(1.8.4.4)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Contact: <sip:[email protected]:5060>
Content-Length: 0


<------------>
    -- Executing [3616246@from-internal:1] Macro("SIP/995-0000000e", "user-callerid,LIMIT,") in new stack
    -- Executing [s@macro-user-callerid:1] Set("SIP/995-0000000e", "AMPUSER=995") in new stack
    -- Executing [s@macro-user-callerid:2] GotoIf("SIP/995-0000000e", "0?report") in new stack
    -- Executing [s@macro-user-callerid:3] ExecIf("SIP/995-0000000e", "1?Set(REALCALLERIDNUM=995)") in new stack
    -- Executing [s@macro-user-callerid:4] Set("SIP/995-0000000e", "AMPUSER=995") in new stack
    -- Executing [s@macro-user-callerid:5] Set("SIP/995-0000000e", "AMPUSERCIDNAME=Ev Giris") in new stack
    -- Executing [s@macro-user-callerid:6] GotoIf("SIP/995-0000000e", "0?report") in new stack
    -- Executing [s@macro-user-callerid:7] Set("SIP/995-0000000e", "AMPUSERCID=995") in new stack
    -- Executing [s@macro-user-callerid:8] Set("SIP/995-0000000e", "CALLERID(all)="Ev Giris" <995>") in new stack
    -- Executing [s@macro-user-callerid:9] GotoIf("SIP/995-0000000e", "0?limit") in new stack
    -- Executing [s@macro-user-callerid:10] ExecIf("SIP/995-0000000e", "1?Set(GROUP(concurrency_limit)=995)") in new stack
    -- Executing [s@macro-user-callerid:11] GotoIf("SIP/995-0000000e", "1?continue") in new stack
    -- Goto (macro-user-callerid,s,24)
    -- Executing [s@macro-user-callerid:24] Set("SIP/995-0000000e", "CALLERID(number)=995") in new stack
    -- Executing [s@macro-user-callerid:25] Set("SIP/995-0000000e", "CALLERID(name)=Ev Giris") in new stack
    -- Executing [s@macro-user-callerid:26] Set("SIP/995-0000000e", "CHANNEL(language)=en") in new stack
    -- Executing [3616246@from-internal:2] Set("SIP/995-0000000e", "MOHCLASS=default") in new stack
    -- Executing [3616246@from-internal:3] Set("SIP/995-0000000e", "_NODEST=") in new stack
    -- Executing [3616246@from-internal:4] Macro("SIP/995-0000000e", "record-enable,995,OUT,") in new stack
    -- Executing [s@macro-record-enable:1] GotoIf("SIP/995-0000000e", "1?check") in new stack
    -- Goto (macro-record-enable,s,4)
    -- Executing [s@macro-record-enable:4] ExecIf("SIP/995-0000000e", "0?MacroExit()") in new stack
    -- Executing [s@macro-record-enable:5] GotoIf("SIP/995-0000000e", "0?Group:OUT") in new stack
    -- Goto (macro-record-enable,s,14)
    -- Executing [s@macro-record-enable:14] GotoIf("SIP/995-0000000e", "0?IN") in new stack
    -- Executing [s@macro-record-enable:15] ExecIf("SIP/995-0000000e", "1?MacroExit()") in new stack
    -- Executing [3616246@from-internal:5] Macro("SIP/995-0000000e", "dialout-trunk,2,3616246,") in new stack
    -- Executing [s@macro-dialout-trunk:1] Set("SIP/995-0000000e", "DIAL_TRUNK=2") in new stack
 == Spawn extension (macro-dialout-trunk, s, 2) exited non-zero on 'SIP/995-0000000e' in macro 'dialout-trunk'
  == Spawn extension (from-internal, 3616246, 5) exited non-zero on 'SIP/995-0000000e'
    -- Executing [h@from-internal:1] Hangup("SIP/995-0000000e", "") in new stack
  == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/995-0000000e'
Scheduling destruction of SIP dialog '[email protected]' in 6400 ms (Method: INVITE)

<--- Reliably Transmitting (no NAT) to 192.168.254.5:5060 --->
SIP/2.0 603 Declined
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-61b9ae2f;received=192.168.254.5
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>;tag=as2aaa4f08
Call-ID: [email protected]
CSeq: 102 INVITE
Server: FPBX-2.9.0(1.8.4.4)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
Content-Length: 0


<------------>

<--- SIP read from UDP:192.168.254.5:5060 --->
ACK sip:[email protected] SIP/2.0
Via: SIP/2.0/UDP 192.168.254.5:5060;branch=z9hG4bK-61b9ae2f
From: Home <sip:[email protected]>;tag=18185e19f7db1ecfo0
To: <sip:[email protected]>;tag=as2aaa4f08
Call-ID: [email protected]
CSeq: 102 ACK
Max-Forwards: 70
Authorization: Digest username="995",realm="asterisk",nonce="20387cf5",uri="sip:[email protected]",algorithm=MD5,response="a57f766d866d5092a2b63e994a6dbf35"
Contact: Home <sip:[email protected]:5060>
User-Agent: Linksys/SPA3102-5.1.10(GW)
Content-Length: 0

You have the DND button pressed on the phone perhaps?

no DND is not pressed because the called party is not an internal phone.
calling party is an extension of the PBX (995)
called party should be reached through a registered trunk according to the outbound route.

But the console output doesn’t say what happens to the call. why it is declined ?

what can I do ?

Ok, the far end is declining the call. This usually means the authentication portion matched but something in the DSP is not likes.

Invalid CODEC will do this. I would only try the invite with a single CODEC.

As I pointed out, this is also the message a phone sends back to the PBX when the DND button is pushed.

But I don’t see a message going out to the far end.
How do you come to that conclusion ?

If you check the logs I’ve sent, there is no SIP message out to the trunk.
It seems to me that Asterisk is declining the call without initiating to the far end. But why ?

Please let me know if I have missed something.

I think you answered this but are the phone and PBX on the same net? I see the to and from are both the. 254 address makes me now think I missed a NAT issue. Is the network stuff set in SIP settings module?

Ok; the server has 2 IP interfaces:

  1. ppp interface connected to internet
  2. eth interface connected to LAN

calling extension is on the eth interface. The destination will be reached through SIP trunk which is on internet.

So, there is no NAT because the server is accessible through both interfaces.

where shall I set SIP settings module ? and what is the correct setting ?

thanks.

Both networks need to be listed in the localnet settings and the outside IP of the NAT device needs to be in externip.

See SIP settings module.

which both networks ?

There is only one local network.
Outside IP of the NAT device is external IP address of the FreePBX server. (ppp0)

Actually there is no NAT between FreePBX’s external IP and my ISP’s SIP server.

I don’t believe this is a NAT (or even Network) issue since I get a “DECLINE” from asterisk. It doesn’t even send any INVITE outside to the trunk.

Problem is: why does Asterisk decline this call ?

Hi,

I’m desperately looking for help.
What else can I do ?

Since this is a new installation with very basic setup (1 extension , 1 trunk) I don’t understand why it doesn’t really work.

Hi,

is there no troubleshooting method for such problems ?

btw, I just realized that I might have leftover config files in /etc/asterisk from the previous installation while installing the new one. Would they be overwritten by the new installation ?
If not, would they affect proper working of new version ?

Please advise.

thanks

Sure there is troubleshooting but I can’t tech it in a forum. It’s intuition and experience. You have to role up your sleeves and dig in.

I’ve been using forums for several personal needs.
I’ve learnt very much from these forums but Freepbx and Asterisk forums are not really helping.

There is a log output that’ve pasted here in my post. Nobody is commenting on it.
It obviously shows that Asterisk is declining the call and not creating the outbound leg of the call. But yet you keep telling me to check the network settings. How come it can be about network.

Also, this is a simple setup. I just installed a new version with zero configuration. Then I created 1 extension and 1 trunk.
if this simple setup doesn’t work, then nothing would work.

And lastly, SkykingOH,
Are you the only one on this forum ?
Is there no one else that could try to help ?
I’m trying to install a simple ip pbx for home use. It’s been several weeks with NO solution.

Of course I am not the only person in the forum.

You said the SIP peer is not an extension it’s a PBX so it is not clear what device you are trying to talk to.

Your log shows a 603 message, it is not useful.

You also say that the device is not on the LAN. NAT problems often manifest themselves as 603 errors, that is why I keep saying network.

Second, I also told you the a CODEC mismatch will do the same thing.

I am sure if you connect a softphone on the same LAN it will work fine.

First of all, I’m trying to tell you that there can not be any NAT issue because the outside leg of the call should be initiated through the ppp0 interface of the server and that interface has a real public IP address. There is no NAT on that interface.

About the remote peer, that is a softswitch of my ISP. My previous installation of FreePBX is working with that SIP peer with no issues at all.
Also, II’m saying that Asterisk is not sending any SIP messages to the outbound trunk. So it can not be about NAT, CODECs or anything outside the Asterisk.
This is obviously an Asterisk failure (either from a configuration problem or a bug)

You’re saying that the log is not useful. How can I make it more useful ?

Also, from my previous posts, I have some unasnwered questions:
I might have leftover config files in /etc/asterisk from the previous installation while installing the new one. Would they be overwritten by the new installation ?
If not, would they affect proper working of new version ?

I have no idea how you installed the system so I can’t answer the leftover file issue.

FreePBX has to be sending out the invite or the remote end would not send the 603.

NAT also means letting Asterisk know about attached networks. localnet and externip have to be right. Is the ppp0 interface set for externip?

Also CODEC issues will cause the 604 decline.

I’m saying that FreePBX is sendiing the decline message. It’s not the remote end. FreePBX is not sending anything out.

Iwould like to delete the files at /etc/asterisk and try again. How can I install fresh /etc/asterisk files ?
(without installing freepbx again)

anyone care to answer ?

I’ve been tryingto build up this home pbx for several weeks.
I’d appreciate any help…

just an answer to :

Iwould like to delete the files at /etc/asterisk and try again. How can I install fresh /etc/asterisk files ?
(without installing freepbx again)

ridiculuous !

this is a community for help but there is no community to help.

sad…