Hi Ricky
I should have seen how you handle NAT in kamaiilo.conf but you can also edit sip.conf in Asterisk and  try to put Nat=yes
Rgds,

On Wed, Oct 29, 2008 at 6:39 PM, Ricky Gutierrez <xserverlinux@yahoo.com> wrote:
Hi luzano thank you for your help and time, this it is my full ngrep.
                 I have asterisk, mediaproxy and openser together in the same pc

I have the doubt that when a incoming call  from the PSTN by asterisk, sends it to an extension of openser, to which I do not request authentication to him within invites, I believe that there it is where I have problems with mediaproxy

that it leaves you want to see of the openser.cfg, or everything?

regards ..
interface: any
filter: (ip) and ( port 5060 )
#
U +0.063740 192.168.10.1:5070 -> 192.168.10.1:5060
INVITE sip:113@192.168.10.1 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>
Contact: <sip:asterisk@192.168.10.1:5070>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 29 Oct 2008 16:26:18 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 238

v=0
o=root 9850 9850 IN IP4 192.168.10.1
s=session
c=IN IP4 192.168.10.1
t=0 0
m=audio 14750 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

#
U +0.004203 192.168.10.1:5060 -> 192.168.10.1:5070

SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

Server: OpenSER (1.3.2-notls (i386/linux))
Content-Length: 0


#
U +0.000275 192.168.10.1:5060 -> 192.168.10.30:5062
INVITE sip:113@192.168.10.30:5062;transport=udp SIP/2.0
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
Via: SIP/2.0/UDP 192.168.10.1;branch=z9hG4bK7ce3.dd78e5e3.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>
Contact: <sip:asterisk@192.168.10.1:5070>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE
User-Agent: Asterisk PBX
Max-Forwards: 69
Date: Wed, 29 Oct 2008 16:26:18 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Type: application/sdp
Content-Length: 238

P-hint: route(3)|setflag7,forcerport,fix_contact
P-hint: inbound->inbound
P-hint: Route[6]: mediaproxy

v=0
o=root 9850 9850 IN IP4 192.168.10.1
s=session

c=IN IP4 192.168.1.64
t=0 0
m=audio 35058 RTP/AVP 0 101

a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

#
U +0.026845 192.168.10.30:5062 -> 192.168.10.1:5060

SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.10.1;branch=z9hG4bK7ce3.dd78e5e3.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

User-Agent: Grandstream GXP2020 1.1.6.16
Content-Length: 0


#
U +0.009886 192.168.10.30:5062 -> 192.168.10.1:5060
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.10.1;branch=z9hG4bK7ce3.dd78e5e3.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

User-Agent: Grandstream GXP2020 1.1.6.16
Contact: <sip:113@192.168.10.30:5062;transport=udp>

Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Length: 0


#
U +0.000169 192.168.10.1:5060 -> 192.168.10.1:5070
SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

User-Agent: Grandstream GXP2020 1.1.6.16
Contact: <sip:113@192.168.10.30:5062;transport=udp>

Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Length: 0
P-hint: Onreply-route - fixcontact


#
U +0.000140 190.184.35.4:5060 -> 192.168.1.64:5064
OPTIONS sip:130@192.168.1.64:5064 SIP/2.0
Via: SIP/2.0/UDP 190.184.35.4:5060;branch=z9hG4bK715ee282;rport
From: "asterisk" <sip:asterisk@190.184.35.4>;tag=as35db6300
To: <sip:130@192.168.1.64:5064>
Contact: <sip:asterisk@190.184.35.4>
Call-ID: 16e287fc2b24afb97eb1759952eff3d3@190.184.35.4
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 29 Oct 2008 16:26:18 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


#
U +0.000017 190.184.35.4:5060 -> 192.168.10.19:5064
OPTIONS sip:130@192.168.1.64:5064 SIP/2.0
Via: SIP/2.0/UDP 190.184.35.4:5060;branch=z9hG4bK715ee282;rport
From: "asterisk" <sip:asterisk@190.184.35.4>;tag=as35db6300
To: <sip:130@192.168.1.64:5064>
Contact: <sip:asterisk@190.184.35.4>
Call-ID: 16e287fc2b24afb97eb1759952eff3d3@190.184.35.4
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Wed, 29 Oct 2008 16:26:18 GMT

Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


#
U +0.008208 192.168.10.19:5064 -> 190.184.35.4:5060
SIP/2.0 200 OK
To: <sip:130@192.168.1.64:5064>;tag=9611a90af8ab9321i1
From: "asterisk" <sip:asterisk@190.184.35.4>;tag=as35db6300
Call-ID: 16e287fc2b24afb97eb1759952eff3d3@190.184.35.4
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 190.184.35.4:5060;branch=z9hG4bK715ee282
Server: Linksys/SPA942-5.2.8
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces


#
U +0.000014 192.168.1.64:5064 -> 190.184.35.4:5060
SIP/2.0 200 OK
To: <sip:130@192.168.1.64:5064>;tag=9611a90af8ab9321i1
From: "asterisk" <sip:asterisk@190.184.35.4>;tag=as35db6300
Call-ID: 16e287fc2b24afb97eb1759952eff3d3@190.184.35.4
CSeq: 102 OPTIONS
Via: SIP/2.0/UDP 190.184.35.4:5060;branch=z9hG4bK715ee282
Server: Linksys/SPA942-5.2.8
Content-Length: 0
Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS, REFER
Supported: replaces


#
U +0.956449 192.168.10.19:5064 -> 190.184.35.4:5060
NOTIFY sip:190.184.35.4 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.19:5064;branch=z9hG4bK-5ade1219
From: <sip:130@190.184.35.4>;tag=7c3557f6145bd125o1
To: <sip:190.184.35.4>
Call-ID: ce8ea9b2-baee4a99@192.168.10.19
CSeq: 12 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0


#
U +0.000027 192.168.1.64:5064 -> 190.184.35.4:5060
NOTIFY sip:190.184.35.4 SIP/2.0
Via: SIP/2.0/UDP 192.168.10.19:5064;branch=z9hG4bK-5ade1219
From: <sip:130@190.184.35.4>;tag=7c3557f6145bd125o1
To: <sip:190.184.35.4>
Call-ID: ce8ea9b2-baee4a99@192.168.10.19
CSeq: 12 NOTIFY
Max-Forwards: 70
Event: keep-alive
User-Agent: Linksys/SPA942-5.2.8
Content-Length: 0


#
U +0.156145 190.184.35.4:5060 -> 192.168.1.64:5064
SIP/2.0 489 Bad event
Via: SIP/2.0/UDP 192.168.10.19:5064;branch=z9hG4bK-5ade1219;received=192.168.1.64
From: <sip:130@190.184.35.4>;tag=7c3557f6145bd125o1
To: <sip:190.184.35.4>;tag=as2002c003
Call-ID: ce8ea9b2-baee4a99@192.168.10.19
CSeq: 12 NOTIFY

User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


#
U +0.000017 190.184.35.4:5060 -> 192.168.10.19:5064
SIP/2.0 489 Bad event
Via: SIP/2.0/UDP 192.168.10.19:5064;branch=z9hG4bK-5ade1219;received=192.168.1.64
From: <sip:130@190.184.35.4>;tag=7c3557f6145bd125o1
To: <sip:190.184.35.4>;tag=as2002c003
Call-ID: ce8ea9b2-baee4a99@192.168.10.19
CSeq: 12 NOTIFY

User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0


#
U +5.895003 192.168.10.30:5062 -> 192.168.10.1:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.1;branch=z9hG4bK7ce3.dd78e5e3.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

User-Agent: Grandstream GXP2020 1.1.6.16
Contact: <sip:113@192.168.10.30:5062;transport=udp>

Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Type: application/sdp
Supported: replaces, timer
Content-Length: 212

v=0
o=113 8000 8000 IN IP4 192.168.10.30

s=SIP Call
c=IN IP4 192.168.10.30
t=0 0
m=audio 5004 RTP/AVP 0 101

a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

#
U +0.001400 192.168.10.1:5060 -> 192.168.10.1:5070
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3716ee27;rport=5070
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 INVITE

User-Agent: Grandstream GXP2020 1.1.6.16
Contact: <sip:113@192.168.10.30:5062;transport=udp>

Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE,UPDATE,PRACK,MESSAGE
Content-Type: application/sdp
Supported: replaces, timer
Content-Length: 212
P-hint: Onreply-route - fixcontact
P-hint: onreply_route|usemediaproxy

v=0
o=113 8000 8000 IN IP4 192.168.10.30

s=SIP Call
c=IN IP4 192.168.1.64
t=0 0
m=audio 35058 RTP/AVP 0 101

a=sendrecv
a=rtpmap:0 PCMU/8000
a=ptime:20
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11

#
U +0.000557 192.168.10.1:5070 -> 192.168.10.1:5060
ACK sip:113@192.168.10.30:5062;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3f155ae6;rport
Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Contact: <sip:asterisk@192.168.10.1:5070>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0


#
U +0.000215 192.168.10.1:5060 -> 192.168.10.30:5062
ACK sip:113@192.168.10.30:5062;transport=udp SIP/2.0
Record-Route: <sip:192.168.10.1;lr=on;ftag=as30de9085;nat=yes>
Via: SIP/2.0/UDP 192.168.10.1;branch=z9hG4bK7ce3.dd78e5e3.2
Via: SIP/2.0/UDP 192.168.10.1:5070;branch=z9hG4bK3f155ae6;rport=5070
From: "asterisk" <sip:asterisk@192.168.10.1:5070>;tag=as30de9085
To: <sip:113@192.168.10.1>;tag=21c220c2e075d838
Contact: <sip:asterisk@192.168.10.1:5070>
Call-ID: 373456b8787e65d9764158381c9da273@192.168.10.1
CSeq: 102 ACK
User-Agent: Asterisk PBX
Max-Forwards: 69
Content-Length: 0
P-hint: LR|fixcontact,setflag6


#
U +0.886545 192.168.10.28:5060 -> 192.168.10.1:5060



From: luzango mfupe <luzango.mfupe@gmail.com>Sent: Wednesday, October 29, 2008 5:12:29 AM
Subject: Re: [Kamailio-Users] I don't have asterisk audio to openser - mediaproxy


Hi Ricky,
Where is your Kamailio config?? is this your full ngrep capture??
Rgds,
Luzango.
 





--
Luzango Mfupe
TUUNE MOBILE
Tel:0128440528/0123825710
Tshwane-RSA

"...Ships are safe in harbor, but they were never meant to stay there......."