handle_response_invite: Received response: "Forbidden&a

Get help with installing, upgrading and running Asterisk.

Moderators: muppetmaster, Moderator, Support

handle_response_invite: Received response: "Forbidden&a

Postby MrM4x » Thu Sep 03, 2009 2:32 pm

I configured a really easy asterisk pbx.
Follow here my sip.conf:

[general]
context = default
bindport=5060
bindaddr=0.0.0.0
;srvlookup=yes
disallow=all
allow=alaw
;allow=gsm
;allow=ilbc
language=en
;nat=yes
rtptimeout=60
rtpholdtimeout=300

register => 5308812:YYYYYYY@sip.messagenet.it:5061/5308812

[700]
type=friend
callerid="Max00" <700>
username=700
secret=JJJJJJ
qualify=yes
host=dynamic
;context=internal

[701]
type=friend
callerid="Max01" <701>
username=701
secret=JJJJJJ
qualify=yes
host=dynamic
context=internal

[messagenet00]
type=friend
;auth=md5
username=5308812
fromuser=5308812
secret=YYYYYYY
host=sip.messagenet.it
port=5061
qualify=yes
insecure=very
nat=yes

Here my extension.conf:

general]

[globals]

max0 => 700
max1 => 701
luca0 => 702

[default]
include => internal
include => external

[internal]
exten => 700,1,dial(SIP/700)
exten => 701,1,dial(SIP/701)
exten => 702,1,dial(SIP/702)

[external]
exten => 5308812,1,Dial(SIP/700) ; my Messagenet internal number
exten => _XXX.,1,Dial(SIP/${EXTEN}@messagenet00)

If I try to call and speak between the two internal or I did an outcall throught the messagenet, there isn't problem; all works fine!

If I try to call the public number of messagenet, the internal phone 700 rings, as I defined: exten => 5308812,1,Dial(SIP/700)

All seems to be OK but when I hang-up (with hard or soft phone, same result) I can read on the CLI (verbose 9) this:

WARNING[8606]: chan_sip.c:12334 handle_response_invite: Received response: "Forbidden" from '<sip:02303127569@212.97.59.76:5061>;tag=as6f4dc9c4'
== Spawn extension (default, 5308812, 1) exited non-zero on 'SIP/5308812-09628e28'


and I lost the channel :(

I'm running Asterisk 1.4.21.2~dfsg-3 on Debian

Some ideas, maybe?

Thanks.


Max
MrM4x
Newsterisk
 
Posts: 2
Joined: Thu Sep 03, 2009 1:58 pm

Postby Dovid » Fri Sep 04, 2009 1:51 pm

In sip.conf under messagenet00 you do not have a context set for it. You need to have context=SomeContext (where SomeContext is the name of the context that you want the call to go to). I would suggest creating a new one so you can route the incoming calls from this carrier. You currently have nothing set up for that.
Dovid
Salt of the Asterisk
 
Posts: 1450
Joined: Sun Oct 23, 2005 5:28 am
Location: Lakewood, NJ, USA

Postby MrM4x » Sat Sep 05, 2009 9:39 pm

Hello and Thanks for your answers but if I don't define a context is applied the "default" context, defined in [general], I think... (isn't that?).
I think that this context is working because when I call the public number from my cel I can see in the CLI, that this call is redirected to my internal phone SIP/700 and the internal phone (SIP/700) is ringing:

-- Executing [5308812@default:1] Dial("SIP/5308812-093f6b70", "SIP/700") in new stack
-- Called 700
-- SIP/700-093faae8 is ringing
-- SIP/700-093faae8 answered SIP/5308812-093f6b70
-- Native bridging SIP/5308812-093f6b70 and SIP/700-093faae8
[Sep 6 05:24:50] WARNING[5368]: chan_sip.c:12334 handle_response_invite: Received response: "Forbidden" from '<sip:02303124256@212.97.59.76:5061>;tag=as4596241c'
== Spawn extension (default, 5308812, 1) exited non-zero on 'SIP/5308812-093f6b70'


The problem is when I answer with the SIP/700, in that time I can read in the CLI:

[Sep 6 05:24:50] WARNING[5368]: chan_sip.c:12334 handle_response_invite: Received response: "Forbidden" from '<sip:02303124256@212.97.59.76:5061>;tag=as4596241c'
== Spawn extension (default, 5308812, 1) exited non-zero on 'SIP/5308812-093f6b70'


I tried, as you tell me, with a dedicated context but the result is exactly the same :(
Every help/idea will be really appreciated.

Thanks.

Max
MrM4x
Newsterisk
 
Posts: 2
Joined: Thu Sep 03, 2009 1:58 pm

Postby Dovid » Tue Sep 08, 2009 1:44 pm

Max,
You are right. Can you do SIP debug from the Asterisk CLI, call in and then post the results here ?
Dovid
Salt of the Asterisk
 
Posts: 1450
Joined: Sun Oct 23, 2005 5:28 am
Location: Lakewood, NJ, USA


Return to Asterisk Support

Who is online

Users browsing this forum: No registered users and 27 guests