I had forgotten to cc the list
---------- Forwarded message ----------
From: Arne Van Theemsche <arnevt(a)gmail.com>
Date: 22-sep-2006 9:06
Subject: Re: [Users] mediaproxy working, but not if asterisk is involved
To: daniel(a)voice-system.ro
the problem is that I don't even see the "reply received"... So for some
reason the asterisk reply isn't passed through to the onreply_route. My
theory is that asterisk doesn't respect the reply parameters somewhere, but
it isn't clear to me where
arne
2006/9/22, Daniel-Constantin Mierla <daniel(a)voice-system.ro>ro>:
Do you get "using mediaproxy" message in the logs? If not, that the
search() matches, I cannot sot right now what is wrong with the
expression. But you can move t_on_reply("1") into
if*method=="INVITE")
statement and replace the search condition with if (status =~
"(183)|(2[0-9][0-9])").
See:
http://voip-info.org/wiki/view/OpenSER+And+Mediaproxy
Cheers,
Daniel
On 09/21/06 21:46, Arne Van Theemsche wrote:
below is the transaction of the failed mediaproxy
invite. I allready
could tell that replies go through openser, but I don't see the reason
why ser doesn't see them as replies (and use the mediaproxy function).
as you can see, the invite from <ip client> to <ip asterisk> (through
<ip OPENSER>, which is also ip of mediaproxy) goes in one direction
good (the ip in the SDP is changed from <ip client> to <ip openser>,
but the return path en the OK (with it's SDP) is not changed
I did a tcpdump with a call between 2 clients, where the proxy works,
and the only difference I see is that in the reply of asterisk, there
is no rinstance field in the contact header
thanks
arne
U <ip client>:5060 -> <ip OPENSER>:5060
INVITE sip:701@<sip domain>;transport=UDP SIP/2.0..From: "arne"
<sip:1002@<sip domain>>;tag=514a90c3-13c4-7a70a-1de331c0-5e4f..To:
"701"< sip:701@sipgat
e.evonet.be <http://e.evonet.be>>..Call-ID:
1064dc44-514a90c3-13c4-7a70a-1de331be-529@<ip
<mailto: 1064dc44-514a90c3-13c4-7a70a-1de331be-529@%3Cip>
client>..CSeq: 1 INVITE..Via: SIP/2.0/UDP <ip
client>:5060;rport;branch=z9hG4bK-7a70a-1d
e331c2-69dc..Max-Forwards: 70..Supported:
replaces,100rel,timer..Allow: INVITE, ACK, BYE, REFER, NOTIFY, CANCEL,
OPTIONS, INFO, PRACK..User-Agent: Swissvoice IP1
0 SP v1.0.1 (Build 3) 3.0.5.1..Allow-Events: talk, hold,
conference..Contact: "arne" <sip:1002@<ip
client>:5060;transport=UDP>..Session-Expires: 1800..Content-
Type: application/sdp..Content-Length: 246....v=0..o=rtp/1 501514
501514 IN IP4 <ip client>..s=-..c=IN IP4 <ip client>..t=0 0..m=audio
50000 RTP/AVP 18 0 8..
a=fmtp:18 annexb=yes..a=ptime:40..a=SilenceSupp:on..a=rtpmap:18
g729/8000..a=rtpmap:0 pcmu/8000..a=rtpmap:8 pcma/8000..a=sendrecv..
#
U <ip OPENSER>:5060 -> <ip asterisk>:5060
INVITE sip:701@<sip domain>;transport=UDP SIP/2.0..Record-Route:
<sip:<ip OPENSER>;lr=on;ftag=514a90c3-13c4-7a70a-1de331c0-5e4f>..From:
"arne" < sip:1002@si
pgate.evonet.be
<http://pgate.evonet.be>>;tag=514a90c3-13c4-7a70a-1de331c0-5e4f..To:
"701"<sip:701@<sip domain>>..Call-ID:
1064dc44-514a90c3-13c4-7a70a-1de331be-529@<ip
<mailto:1064dc44-514a90c3-13c4-7a70a-1de331be-529@%3Cip> client>..C
Seq: 1 INVITE..Via: SIP/2.0/UDP <ip OPENSER>;branch=0..Via:
SIP/2.0/UDP <ip
client>:5060;rport=5060;branch=z9hG4bK-7a70a-1de331c2-69dc..Max-Forwards:
69..Supp
orted: replaces,100rel,timer..Allow: INVITE, ACK, BYE, REFER,
NOTIFY, CANCEL, OPTIONS, INFO, PRACK..User-Agent: Swissvoice IP10 SP
v1.0.1 (Build 3) 3.0.5.1..Allo
w-Events: talk, hold, conference..Contact: "arne" <sip:1002@<ip
client>:5060;transport=UDP>..Session-Expires: 1800..Content-Type:
application/sdp..Content-Leng
th: 246....v=0..o=rtp/1 501514 501514 IN IP4 <ip client>..s=-..c=IN
IP4 <ip OPENSER>..t=0 0..m=audio 60106 RTP/AVP 18 0 8..a=fmtp:18
annexb=yes..a=ptime:40..a
=SilenceSupp:on..a=rtpmap:18 g729/8000..a=rtpmap:0
pcmu/8000..a=rtpmap:8 pcma/8000..a=sendrecv..
#
U <ip asterisk>:5060 -> <ip OPENSER>:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP <ip
OPENSER>;branch=0;received=<ip OPENSER>..Via: SIP/2.0/UDP <ip
client>:5060;rport=5060;branch=z9hG4bK-7a70a-1de331c2-
69dc..From: "arne" <sip:1002@<sip
domain>>;tag=514a90c3-13c4-7a70a-1de331c0-5e4f..To:
"701"<sip:701@<sip
domain>>..Call-ID: 1064dc44-514a90c3-13c4-7a70
a-1de331be-529@<ip <mailto:a-1de331be-529@%3Cip> client>..CSeq: 1
INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS,
BYE, REFER, SUBSCRIBE, NOTIFY..Contact: <sip:701@
<ip asterisk>>..Content-Length: 0....
#
U <ip OPENSER>:5060 -> <ip client>:5060
SIP/2.0 100 Trying..Via: SIP/2.0/UDP <ip
client>:5060;rport=5060;branch=z9hG4bK-7a70a-1de331c2-69dc..From:
"arne" <sip:1002@<sip domain>>;tag=514a90c3-13c
4-7a70a-1de331c0-5e4f..To: "701"<sip:701@<sip domain>>..Call-ID:
1064dc44-514a90c3-13c4-7a70a-1de331be-529@<ip
<mailto:1064dc44-514a90c3-13c4-7a70a-1de331be-529@%3Cip>
client>..CSeq: 1 INVITE..User-Agent: Asteri
sk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY..Contact: <sip:701@<ip asterisk>>..Content-Length: 0....
#
U <ip asterisk>:5060 -> <ip OPENSER>:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP <ip OPENSER>;branch=0;received=<ip
OPENSER>..Via: SIP/2.0/UDP <ip
client>:5060;rport=5060;branch=z9hG4bK-7a70a-1de331c2-69dc
..Record-Route: <sip:<ip
OPENSER>;lr=on;ftag=514a90c3-13c4-7a70a-1de331c0-5e4f>..From: "arne"
<sip:1002@<sip domain>>;tag=514a90c3-13c4-7a70a-1de331c0-5e4f
..To: "701"<sip:701@<sip domain>>;tag=as60ebd3fc..Call-ID:
1064dc44-514a90c3-13c4-7a70a-1de331be-529@<ip
<mailto:1064dc44-514a90c3-13c4-7a70a-1de331be-529@%3Cip>
client>..CSeq: 1 INVITE..User-Agent: Asterisk PBX
..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
NOTIFY..Contact: <sip:701@<ip asterisk>>..Content-Type:
application/sdp..Content-Length: 188....v=
0..o=root 26276 26276 IN IP4 <ip asterisk>..s=session..c=IN IP4 <ip
asterisk>..t=0 0..m=audio 13434 RTP/AVP 0 8..a=rtpmap:0
PCMU/8000..a=rtpmap:8 PCMA/8000..a=
silenceSupp:off - - - -..
#
U <ip OPENSER>:5060 -> <ip client>:5060
SIP/2.0 200 OK..Via: SIP/2.0/UDP <ip
client>:5060;rport=5060;branch=z9hG4bK-7a70a-1de331c2-69dc..Record-Route:
<sip:<ip
OPENSER>;lr=on;ftag=514a90c3-13c4-7a70
a-1de331c0-5e4f>..From: "arne" <sip:1002@<sip
domain>>;tag=514a90c3-13c4-7a70a-1de331c0-5e4f..To:
"701"<sip:701@<sip
domain>>;tag=as60ebd3fc..Call-ID:
1064dc44-514a90c3-13c4-7a70a-1de331be-529@<ip
<mailto: 1064dc44-514a90c3-13c4-7a70a-1de331be-529@%3Cip>
client>..CSeq: 1 INVITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK,
CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NO
TIFY..Contact: <sip:701@<ip asterisk>>..Content-Type:
application/sdp..Content-Length: 188....v=0..o=root 26276 26276 IN IP4
<ip asterisk>..s=session..c=IN IP4
<ip asterisk>..t=0 0..m=audio 13434 RTP/AVP 0 8..a=rtpmap:0
PCMU/8000..a=rtpmap:8 PCMA/8000..a=silenceSupp:off - - - -..
#
2006/9/21, Daniel-Constantin Mierla <daniel(a)voice-system.ro
<mailto:daniel@voice-system.ro>>:
Hello,
watch the network traffic with ngrep on your sip server. You can
see the
call flow which may help to identify the issue. You can paste it
to the
list and someone may give you hints.
Cheers,
Daniel
On 09/21/06 12:28, Arne Van Theemsche wrote:
> hi
>
> my users subscribe with openser, en asterisk is used as
connectivity
> to pstn
>
> i am now installing a mediaproxy, for all users, so every call
goes
> via a mediaproxy.
>
> I'm doing this as follows (relevant statements only)
>
> in route
>
> #I installed the t_on_reply here to be sure that every
reply
> gets parsed, but normally in the INVITE
section should be enough?
> t_on_reply("1");
>
> if (method==INVITE) {
> use_media_proxy();
> }
>
>
> onreply_route[1] {
> log(-3,"reply received");
> if (!search("^Content-Length:[ ]*0")) {
> log(-3,"using mediaproxy");
> use_media_proxy();
> };
> }
>
>
> the weird is, for all local users, this works fine, but as soon as
asterisk
is involved, the reply doesn't get triggered (not
seeing the
> "reply received" either, only when disconnecting the call). The
call
get's
established fine, asterisk is sending media to the
mediaproxy,
but the SDP towards the calling phone is not
modified (since the
onreply isn't triggered)
am I missing something here?
thanks
Arne
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users(a)openser.org <mailto:Users@openser.org>
http://openser.org/cgi-bin/mailman/listinfo/users