Incomming call problem

Hello! I configure Asterisk first time. And i’m sorry, that my english is not good =)

A have a following problem: there is a sip provider and there is asterisk server in our company. We make external calls via provider’s server.
Our asterisk connects to provider as a client. (We are inside NAT)

All is OK, when we make external call. So, if somebody calls from the outside, he has Request timeout error.

VoIP*CLI> sip show registry
Host                            Username       Refresh State                Reg.Time
qoopol.ru:5060                  tumoxa             105 Registered           Thu, 15 Nov 2007 07:56:42

sip.conf


[general]
.......
register => login:password@qoopol.ru
......
[out]
type=friend
host=qoopol.ru
username=login
secret=password

usereqphone=no
canrenvite=no
insecure=very
qualify=no
nat=yes
allowexternalinvites=yes
disallow=all
allow=all
context=in_call

Also I try configuration with [in] and [out] sections like this (with the same result):

[in]
type=user
context=in_call
host=qoopol.ru

In extensions.conf there is test code now:

[in_call]

exten => _.,1,Wait(1)                    ; Wait a second, just for fun
exten => _.,n,Answer                     ; Answer the line
exten => _.,n,Set(TIMEOUT(digit)=5)      ; Set Digit Timeout to 5 seconds
exten => _.,n,Set(TIMEOUT(response)=10)  ; Set Response Timeout to 10 seconds
exten => _.,n(restart),BackGround(demo-congrats) ; Play a congratulatory message
exten => _.,n(instruct),BackGround(demo-instruct)        ; Play some instructio$
exten => _.,n,WaitExten                  ; Wait for an extension to be dialed.

It works properly, when I call from internal number using soft-phone.

Debug messages look like

SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.16.2.100:5060;branch=z9hG4bK541c51ca;rport;received=89.18.244.34
From: <sip:login@qoopol.ru>;tag=as2f945ebb
To: <sip:login@qoopol.ru>;tag=as64119f31
Call-ID: 2614db42214796c24ab5fa0f083a70ad@127.0.1.1
CSeq: 135 REGISTER
User-Agent: Asterisk PBX SVN-trunk-r68118
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Expires: 120
Contact: <sip:s@172.16.2.100>;expires=120
Date: Wed, 14 Nov 2007 21:05:56 GMT
Content-Length: 0

So, it’s strange,that From equals To
Maybe, asterisk try to find user login@qoopol.ru? But it’s our login on provider’s server.

So… I don’t know, what’s wrong… Help me please! =)

Hi
plz study sip.conf
mention all the [genreal] parameters plz make all paramters as your asterisk behind nat. like nat=yes.
also in trype =peers & freind are diffrent so contex in both are ur out call context not in call contex.
but in [genreal] context=in-call

as you told out side caller faced problem request time out means it is NAT issue . so plz mention parameters in genreal which is deal with this like localnet,from domain, bindipaddr, port...,nat
 that will help. may take adivce from ur provide & brief them ur asterisk is behind nat.

Amit