forum.milkfish.org

where fish meets bug

You are not logged in.

#1 2010-03-23 15:13:57

mrit
Member
Registered: 2008-02-26
Posts: 2

milkfish fails to convert contact address on a Thompson ST2030 fw2.69?

I'm a user of milkfish from more than one year from now. I used it from both sipura SPA3k and softphone like ekiga and even a hardphone that I had for test.
I'd never identified major issue with it until today (hence this topic smile ).

I bought some Thompson ST2030 hardphone and it's a hell to make them working with milkfish.
I made a lot of test with many different  config and providers  (with outgoing proxy  /with STUN / with voxalot / with pbxes.org / sipsorcery / 3starsnet).

The findings (up to now) are:
* direct connection (with STUN) are OK. However STUN may conflit with milkfish as  already reported within other threads.
* activating "SIP TRACING" in milkfish consumes a lot of time and in cascade generate a lot of traffic due to UDP retries.
* there are no twice the same behaviour depending on the provider (for some I can't make call, for other I don't receive call, and sometimes it's the sound that isn't ok). My dumb perception is that it is related to addressing.

I then executed the milkfish 's echo test for have some input for this community ( note that I made some cleaning such changing account id and mac addr ) :

This the call as seen from the Thompson ST2030

Code:

Sent to udp: 10.0.0.1:5060 00:00:03:39:332 (1215 bytes)

INVITE sip:echo@milkfish.org;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.0.0.138:5060;frontplane=z9hG4bK2474253136036986087-16125992
From: "bureau"<sip:myaccount-extension@pbxes.org:5060;user=phone>;tag=c0a80101-f61027
To: <sip:echo@milkfish.org;user=phone>
Call-ID: cc822c1-c0a80101-0-19@10.0.0.138
CSeq: 1 INVITE
Max-Forwards: 70
Supported: timer, P-Early-Media, replaces
Session-Expires: 1800
Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,INFO
Contact: <sip:myaccount-extension@10.0.0.138:5060;transport=udp;user=phone>
User-Agent: THOMSON ST2030 hw5 fw2.69 00-11-22-33-44-55
Allow-Events: refer,dialog,message-summary,check-sync,talk,hold
Content-Type: application/sdp
Content-Length: 483

v=0
o=myaccount-extension 16125992 16125992 IN IP4 10.0.0.138
s=-
c=IN IP4 10.0.0.138
t=0 0
m=audio 41000 RTP/AVP 8 0 18 4 119 9 103 116 120 96
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:4 G723/8000
a=rtpmap:119 AMR-WB/16000
a=rtpmap:9 G722/8000
a=rtpmap:103 L16/16000
a=rtpmap:116 iLBC/8000
a=fmtp:116 mode=20
a=rtpmap:120 iLBC/8000
a=fmtp:120 mode=30
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15
a=sendrecv


Recv from udp: 10.0.0.1:5060 00:00:03:39:490 (586 bytes)

SIP/2.0 100 trying -- your call is important to us
Via: SIP/2.0/UDP 10.0.0.138:5060;frontplane=z9hG4bK2474253136036986087-16125992
From: "bureau"<sip:myaccount-extension@pbxes.org:5060;user=phone>;tag=c0a80101-f61027
To: <sip:echo@milkfish.org;user=phone>
Call-ID: cc822c1-c0a80101-0-19@10.0.0.138
CSeq: 1 INVITE
Server: OpenSer 1.0.0 (boozy.milkfish.org)
Content-Length: 0
Warning: 392 10.0.0.1:5060 "Noisy feedback tells:  pid=9863
req_src_ip=10.0.0.138 req_src_port=5060
in_uri=sip:echo@milkfish.org;user=phone
out_uri=sip:echo@milkfish.org;user=phone via_cnt==1"



Recv from udp: 10.0.0.1:5060 00:00:03:39:580 (621 bytes)

SIP/2.0 486 BUSY - echotest finished - hangup now
Via: SIP/2.0/UDP 10.0.0.138:5060;frontplane=z9hG4bK2474253136036986087-16125992
From: "bureau"<sip:myaccount-extension@pbxes.org:5060;user=phone>;tag=c0a80101-f61027
To:
<sip:echo@milkfish.org;user=phone>;tag=1890e0293978c8125ad491bf64308dcf-b247
Call-ID: cc822c1-c0a80101-0-19@10.0.0.138
CSeq: 1 INVITE
Server: OpenSer (1.1.0-notls (i386/linux))
Content-Length: 0
Warning: 392 78.31.64.118:5060 "Noisy feedback tells:  pid=9813
req_src_ip=91.182.34.62 req_src_port=5060
in_uri=sip:echo@milkfish.org;user=phone
out_uri=sip:echo@milkfish.org;user=phone via_cnt==2"



Sent to udp: 10.0.0.1:5060 00:00:03:39:696 (509 bytes)

ACK sip:echo@milkfish.org;user=phone SIP/2.0
Via: SIP/2.0/UDP 10.0.0.138:5060;frontplane=z9hG4bK2474253136036986087-16125992
From: "bureau"<sip:myaccount-extension@pbxes.org:5060;user=phone>;tag=c0a80101-f61027
To:
<sip:echo@milkfish.org;user=phone>;tag=1890e0293978c8125ad491bf64308dcf-b247
Call-ID: cc822c1-c0a80101-0-19@10.0.0.138
CSeq: 1 ACK
Max-Forwards: 70
Allow-Events: refer,dialog,message-summary,check-sync,talk,hold
User-Agent: THOMSON ST2030 hw5 fw2.69 00-11-22-33-44-55
Content-Length: 0

The milkfish status

Code:

root@OpenWrt:~# milkfish_services status
The Milkfish Router Services
Checking the local Router Status...

SIP Transaction Statistics:
Current: 0 (0 waiting) Total: 34 (0 local)
Replied localy: 34
Completion status 6xx: 0, 5xx: 0, 4xx: 17, 3xx: 0,2xx: 17

NVRAM:
SIP_DOMAIN: mydomain.org
OPENSER_CFG: /var/openser/milkfish_openser.cfg

Processes (first receiver process per IP:port):
2       9863    receiver child=0 sock= 10.0.0.1:5060
3       9864    receiver child=0 sock= 91.182.34.62:5060

RTPproxy:
10.0.0.1  91.182.34.62

IP addresses:
LAN: 10.0.0.1
WAN: 91.182.34.62

SER Uptime:
Now: Sun Mar 21 18:46:20 2010
Up Since: Sun Mar 21 16:24:33 2010
Up time: 8507 [sec]

and echo test result

Code:

root@OpenWrt:~# milkfish_services echotest
The Milkfish Router Services
Starting Signaling Test Utility (http)...
Looking for your result...

Checking Echotest...
Starting Echotest...

 Source: 91.182.34.62:5060
 Received: 78.31.64.118:5060 - Sun Mar 21 18:25:58 2010
 INVITE echo sip:echo@milkfish.org;user=phone:5060
 From: myaccount-extension sip:myaccount-extension@pbxes.org:5060;user=phone;tag=c0a80101-f61027
 To: echo sip:echo@milkfish.org;user=phone;tag= null
 Call-Id: cc822c1-c0a80101-0-19@10.0.0.138
 CSeq: 1
 Contact:  sip:myaccount-extension@10.0.0.138:5060;transport=udp;user=phone
 User-Agent: THOMSON ST2030 hw5 fw2.69 00-11-22-33-44-55
 Content-Type: application/sdp
 Content Length: 480
 v=0
 o=myaccount-extension 16125992 16125992 IN IP4 10.0.0.138
 s=-
 c=IN IP4 91.182.34.62
 t=0 0
 m=audio 35004 RTP/AVP 8 0 18 4 119 9 103 116 120 96
 a=rtpmap:8 PCMA/8000
 a=rtpmap:0 PCMU/8000
 a=rtpmap:18 G729/8000
 a=fmtp:18 annexb=no
 a=rtpmap:4 G723/8000
 a=rtpmap:119 AMR-WB/16000
 a=rtpmap:9 G722/8000
 a=rtpmap:103 L16/16000
 a=rtpmap:116 iLBC/8000
 a=fmtp:116 mode=20
 a=rtpmap:120 iLBC/8000
 a=fmtp:120 mode=30
 a=rtpmap:96 telephone-event/8000
 a=fmtp:96 0-15
 a=sendrecv


Checking the From:-Header validity with a UAC Reverse-Lookup...

Echotest failed (partly).
Sunday 21st of March 2010 18:26:49
rev071230 - powered by sipwerk

If your results were found, you can now confirm if the following lines are
correct:

Source: external.wan.ip.address:5060
This is the source ip address the echotest sees. It needs to be the same as
your milkfish routers wan ip address.

From: yourphone sip:yourphone@external.wan.ip.address
The From-Header needs to have either the milkfish wan ip or the milkfish
fromdomain or your provider domain as its domain part.

Contact:  sip:yourphone@external.wan.ip.address
The Contact-Header needs to have the milkfish routers external wan ip address
in its domain part.

c=IN IP4 external.wan.ip.address
The c entry in the SDP body carries the external wan ip address for directing
media to your milkfish router.

m=audio wanport RTP/AVP codecs
The m entry in the SDP body carries the external wan port where your milkfish
RTPproxy is expecting the media.
root@OpenWrt:~#

The stuff that I find strange are:

* the From: that, while complete, is strangely formated
* the Contact : that contains the local IP address
* the SDP o entry that contain also the local IP address  (edit: only o entry is impacted - not c and o as I initialy wrote)

Seeing that I can understand that some messages from  sip servers may be lost.

I will someday execute the same test but from other [apparently functionals] user-agent to compare.
But until then, does anybody have an indication of the cause of the problem?

Last edited by mrit (2010-03-23 16:17:14)

Offline

 

#2 2010-03-23 17:24:19

fronce
Moderator
Registered: 2005-12-01
Posts: 227

Re: milkfish fails to convert contact address on a Thompson ST2030 fw2.69?

I got not Thomson here but I'd recommend to try basic first and approach your desired setup as you increase complexity.

Practically, this means that I suggest you to register the phones with local accounts on the milkfish first and try provider-less
calls first. In this way, we could exclude any incompatibility with the providers.

Maybe the Thomsons have an advanced menu in which you can adjust the use of the fancy addresses to simple addresses.
It may be that our regular expressions for the Contact header field fixing do not hit because of that.
The Contact needs to contain the external IP, you are right.

I do not know if the origin entry ("o=") in the SDP causes confusion elsewhere, but on the milkfish it has no effect on the routing
of the request.

Sorry for not offering THE solution here and now.


http://www.milkfish.org/audit/results/8681fef2421d2bcc-liner.png

Offline

 

#3 2010-03-24 13:28:04

mrit
Member
Registered: 2008-02-26
Posts: 2

Re: milkfish fails to convert contact address on a Thompson ST2030 fw2.69?

fronce wrote:

Practically, this means that I suggest you to register the phones with local accounts on the milkfish first and try provider-less
calls first. In this way, we could exclude any incompatibility with the providers.

This is an excellent proposal . I did the test and it performed OK. I mean that the two phones could call each others and the audio streams are well connected.
Actually it doesn't surprise me that much, because if the issue is related to addressing via "Contact" field, the fact that the internal IP  is used isn't a problem at all.


I tried to jump on your idea of regular expressions for the Contact header field and looked in the milkfish_openser.cfg in the hope of finding any tip regarding the problem.
Unfortunately I have to to confess that I'm not sure to understand fully the script (even though it is quite clear and structured) . More precisely I don't see where the contact is re-written except during a REGISTER operation to external sip providers (fix_nated_contact() ?).

BTW, I looked at the settings inside the thompson but no avail. There is a lot of switches, but regarding this issue the only possibility is to use "compact header" instead of standard ones. I tried it but it doesn't change anything sad


Sorry for not offering THE solution here and now.

Don't be sorry for that. It's already great that you provide your advices.
Those help me to track down the problem.

Solution(s) would be on a next step.
Hopefully, if there is really a  problem and that it's not too specific to those phone, it could help the project in a all.
(It would give me the  impression that I put a small stone on the construction hmm )

Offline

 

#4 2010-09-02 09:42:37

ShoreLeave
Member
From: US
Registered: 2010-09-02
Posts: 4

Re: milkfish fails to convert contact address on a Thompson ST2030 fw2.69?

It works like a charm. I am deeply grateful for your tutorial.


Programming is an expensive course. Keep me in school by availing my services.
research paper help | writing services

Offline

 

Board footer

Migration enabled by Chacmool. Powered by FluxBB
© Copyright 2002–2008 FluxBB


Copyright © 2005-2010 by The Milkfish Project. All rights reserved.
Logos and trademarks are the property of their respective owners.
This website is licensed under the GNU Free Documentation License.
The software promoted on this website is licensed under the GNU General Public License. Please note that this software is under development
and comes with absolutely no warranty, to the extend permitted by applicable law. Definition of Open Source.