Oneway sip. problem with Nat or SIP? ERROR: BAD! BAD! BAD!

When connecting to an * box from internet using SIP I have only one way communication.
IAX works fine. SIP LAN hardphones work fine too.
Router firewall is disabled. OS firewall is disabled too.
Only communication from * to WAN SIP is not working.
What the heck is going on?
Is it possible to blame that 5060 is not the connected port as sip show peers notes but 27222 or something?

Hi

Have you defined the localnet and externip correctly ?

This just sounds like a NAT issue

no, that’s not the problem.
Or perhaps is it? ( I’m using extenhost not externip )

When connecting the following error occured:

chan_sip.c 11408: sipsock_read: We could NOT get the channel lock for SIP/555-34903! chan_sip.c 11409: SIP MESSAGE JUST IGNORED:BYE chan_sip.c 11410: BAD! BAD! BAD!

I’ve tested asterisk with externip. Same problem.
From SJ, Nat type=Port restricted cone nat.
The following error: SIP/2.0 405 Method Not Allowed when calling from 511 to 512


08:28:49 DEBUG     
2007-02-14 06:28:49.157 UDP EXTERNIP:5060->LOCAL
MESSAGE sip:511@MYREMOTEWANIP:20930 SIP/2.0
Via: SIP/2.0/UDP EXTERNIP:5060;branch=z9hG4bK0c45439b;rport
From: <sip:512@EXTERNHOST>;tag=as3fb1e7ff
To: "filippos"<sip:511@EXTERNHOST>;tag=362658411047
Contact: <sip:512@EXTERNIP>
Call-ID: 0A5A8A79-4764-4978-87E9-A65D9946BDCC@MYREMOTEWANIP
CSeq: 102 MESSAGE
User-Agent: i-call.gr
Max-Forwards: 70
Content-Type: text/plain
Content-Length: 35

Caller is . I.d. is "511" <511>
08:28:49 DEBUG     
2007-02-14 06:28:49.157 UDP LOCAL->EXTERNIP:5060
SIP/2.0 405 Method Not Allowed
Via: SIP/2.0/UDP EXTERNIP:5060;rport=5060;received=EXTERNIP;branch=z9hG4bK0c45439b
Content-Length: 0
Allow: INVITE, ACK, CANCEL, BYE, REFER, NOTIFY
Call-ID: 0A5A8A79-4764-4978-87E9-A65D9946BDCC@MYREMOTEWANIP
CSeq: 102 MESSAGE
From: <sip:512@EXTERNHOST>;tag=as3fb1e7ff
Server: SJphone/1.60.289a (SJ Labs)
LOCAL -> REMOTE message
SIP/2.0 405 Method Not Allowed

08:28:49 INFO      Decremented: 1 kind is Server non-INVITE state is: 260
08:28:53 DEBUG     
2007-02-14 06:28:53.424 UDP LOCAL->EXTERNIP:5060
OPTIONS sip:EXTERNHOST:5060 SIP/2.0
Via: SIP/2.0/UDP MYREMOTELOCALIP;rport;branch=z9hG4bK0a0000f00000001045d2ac250000324300000055
Content-Length: 0
Call-ID: 7D66FD39-4E23-49BA-87A1-200EE6BDEC97@MYREMOTELOCALIP
CSeq: 11 OPTIONS
From: <sip:511@EXTERNHOST>;tag=3647104731
Max-Forwards: 70
To: <sip:EXTERNHOST:5060>


08:28:53 DEBUG     
2007-02-14 06:28:53.484 UDP EXTERNIP:5060->LOCAL
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP MYREMOTELOCALIP;branch=z9hG4bK0a0000f00000001045d2ac250000324300000055;received=MYREMOTEWANIP;rport=20930
From: <sip:511@EXTERNHOST>;tag=3647104731
To: <sip:EXTERNHOST:5060>;tag=as008ab92d
Call-ID: 7D66FD39-4E23-49BA-87A1-200EE6BDEC97@MYREMOTELOCALIP
CSeq: 11 OPTIONS
User-Agent: i-call.gr
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Accept: application/sdp
Content-Length: 0

ok
It was nat problem. rtp was not natted to asterisk.
But this is risky, opening so many ports.
Is there another way?

Was the same problem occured with asterisk 1.0?
When I used 1.0, I had not natted rtp but sip worked or not. Maybe I don’t remember well.

And the sip errors? what’s that bad! bad!?