[Sipsak] Problem with From header

Nils Ohlmeier nils at sipsak.org
Wed Feb 1 20:42:08 CET 2006


Hi Klaus,

On Wednesday 01 February 2006 19:24, Klaus Darilion wrote:
> Nils Ohlmeier wrote:
> > I agree with you that this behavior of sipsak is a little bit
> > problematic. For a REGISTER it is clear that you need only one account
> > (except for third party registration). But for all the other tests like
> > INVITE's, MESSAGE's, OPTIONS etc. you would need a second account for the
> > From. Now you could just try to use the same account for From and To. But
> > I fear that this would lead to problems in many setups as well.
> >
> > But to solve your Problem: you could try the option -c which set the From
> > uri to the given value. I added that option recently to have more
> > reasonable sender for the short messages. So you could just set it to the
> > same value as the destination URI if that works for your setup.
>
> Hi Nils!
>
> Using the -c option will be fine. Nevertheless, IMO the default Form:
> should be sip:sipsak at localIP, not sip:sipsak at proxyIP.

sorry I overlooked that at first time, but you simply use the -H option wrong. 
If the detection of the local IP fails you should specify the local hostname 
via the -H option, so 213.239.207.29 in your example (at least thats the 
public IP).

Hope this helps
  Nils

> regards
> klaus
>
> > Greetings
> >   Nils
> >
> > On Monday 30 January 2006 12:32, Klaus Darilion wrote:
> >>Hi Nils!
> >>
> >>I tested the new version 0.9.6 and observed a strange behaviour (which I
> >>guess was also in older versions).
> >>
> >>I use sipsak to test the availability of my sip proxy:
> >>sipsak -H nic.at43.at -s sip:monitor at nic.at43.at -a geheim -U -M -d -x 10
> >>-v
> >>
> >>sipsak REGISTERs at the SIP proxy correctly. But then, when sending the
> >>MESSAGE to itself, it puts the uri "sip:sipsak at proxyIP" into the From
> >>header. As the domainpart of the from header is the IP Address of the
> >>SIP proxy, the SIP proxy tries to challenge sip:sipsak at proxyIP which of
> >>course fails as the user is sip:monitor at ....
> >>
> >>IMO sipsak should either use the local IP address in the From header of
> >>the MESSAGE request, an invalid domain (sip:sipsak at invalid) or again the
> >>  specified SIP user (in this case sip:monitor at nic.at43.at).
> >>
> >>Following the ngrep dump:
> >>
> >>regards
> >>klaus
> >>
> >>
> >>U 2006/01/30 12:24:09.380394 213.239.207.29:34365 -> 83.136.32.160:5060
> >>REGISTER sip:nic.at43.at SIP/2.0.
> >>Via: SIP/2.0/UDP 83.136.32.160:34365;branch=z9hG4bK.28894c42;rport;alias.
> >>From: sip:monitor at nic.at43.at;tag=30b15874.
> >>To: sip:monitor at nic.at43.at.
> >>Call-ID: 816928884 at 83.136.32.160.
> >>CSeq: 1 REGISTER.
> >>Content-Length: 0.
> >>Max-Forwards: 70.
> >>User-Agent: sipsak 0.9.6.
> >>Expires: 10.
> >>Contact: sip:monitor at 83.136.32.160:34365.
> >>.
> >>
> >>#
> >>U 2006/01/30 12:24:09.396609 83.136.32.160:5060 -> 213.239.207.29:34365
> >>SIP/2.0 401 Unauthorized.
> >>Via: SIP/2.0/UDP
> >>83.136.32.160:34365;branch=z9hG4bK.28894c42;rport=34365;alias;received=21
> >>3. 239.207.29. From: sip:monitor at nic.at43.at;tag=30b15874.
> >>To: sip:monitor at nic.at43.at;tag=89c3783a68908612c9b98ed35a45b840.b0ac.
> >>Call-ID: 816928884 at 83.136.32.160.
> >>CSeq: 1 REGISTER.
> >>WWW-Authenticate: Digest realm="nic.at43.at",
> >>nonce="43ddf885690c70035ced10ab3e47f0d10e072f02".
> >>Server: OpenSer (1.0.0-tls (i386/linux)).
> >>Content-Length: 0.
> >>.
> >>
> >>#
> >>U 2006/01/30 12:24:09.427709 213.239.207.29:34365 -> 83.136.32.160:5060
> >>REGISTER sip:nic.at43.at SIP/2.0.
> >>Authorization: Digest username="monitor", uri="sip:nic.at43.at",
> >>algorithm=MD5, realm="nic.at43.at",
> >>nonce="43ddf885690c70035ced10ab3e47f0d10e072f02",
> >>response="632f87d8da904da2184ce542a54f70ac".
> >>Via: SIP/2.0/UDP 83.136.32.160:34365;branch=z9hG4bK.6aa08c90;rport;alias.
> >>From: sip:monitor at nic.at43.at;tag=30b15874.
> >>To: sip:monitor at nic.at43.at.
> >>Call-ID: 816928884 at 83.136.32.160.
> >>CSeq: 2 REGISTER.
> >>Content-Length: 0.
> >>Max-Forwards: 70.
> >>User-Agent: sipsak 0.9.6.
> >>Expires: 10.
> >>Contact: sip:monitor at 83.136.32.160:34365.
> >>.
> >>
> >>#
> >>U 2006/01/30 12:24:09.487909 83.136.32.160:5060 -> 213.239.207.29:34365
> >>SIP/2.0 200 OK.
> >>Via: SIP/2.0/UDP
> >>83.136.32.160:34365;branch=z9hG4bK.6aa08c90;rport=34365;alias;received=21
> >>3. 239.207.29. From: sip:monitor at nic.at43.at;tag=30b15874.
> >>To: sip:monitor at nic.at43.at;tag=89c3783a68908612c9b98ed35a45b840.b0fd.
> >>Call-ID: 816928884 at 83.136.32.160.
> >>CSeq: 2 REGISTER.
> >>Contact:
> >><sip:monitor at 83.136.32.160:34365>;expires=60;received="sip:213.239.207.29
> >>:3 4365". Server: OpenSer (1.0.0-tls (i386/linux)).
> >>Content-Length: 0.
> >>.
> >>
> >>#
> >>U 2006/01/30 12:24:09.503556 213.239.207.29:34365 -> 83.136.32.160:5060
> >>MESSAGE sip:monitor at nic.at43.at SIP/2.0.
> >>Via: SIP/2.0/UDP 83.136.32.160:34365;branch=z9hG4bK.06831f65;rport;alias.
> >>To: sip:monitor at nic.at43.at.
> >>Call-ID: 1229319844 at 83.136.32.160.
> >>CSeq: 3 MESSAGE.
> >>Content-Type: text/plain.
> >>Max-Forwards: 70.
> >>User-Agent: sipsak 0.9.6.
> >>From: sip:sipsak at 83.136.32.160:34365;tag=4945eea4.
> >>
> >>           ^^^^^^^^^^^^^^^^^^^^ -> Problem
> >>
> >>Content-Length: 42.
> >>.
> >>test message from SIPsak for user monitor.
> >>#
> >>U 2006/01/30 12:24:09.519179 83.136.32.160:5060 -> 213.239.207.29:34365
> >>SIP/2.0 407 Proxy Authentication Required.
> >>Via: SIP/2.0/UDP
> >>83.136.32.160:34365;branch=z9hG4bK.06831f65;rport=34365;alias;received=21
> >>3. 239.207.29. To:
> >>sip:monitor at nic.at43.at;tag=89c3783a68908612c9b98ed35a45b840.80b1.
> >> Call-ID: 1229319844 at 83.136.32.160.
> >>CSeq: 3 MESSAGE.
> >>From: sip:sipsak at 83.136.32.160:34365;tag=4945eea4.
> >>Proxy-Authenticate: Digest realm="83.136.32.160",
> >>nonce="43ddf885690c70035ced10ab3e47f0d10e072f02".
> >>Server: OpenSer (1.0.0-tls (i386/linux)).
> >>Content-Length: 0.
> >>.
> >>
> >>#
> >>U 2006/01/30 12:24:09.531573 213.239.207.29:34365 -> 83.136.32.160:5060
> >>MESSAGE sip:monitor at nic.at43.at SIP/2.0.
> >>Proxy-Authorization: Digest username="monitor",
> >>uri="sip:monitor at nic.at43.at", algorithm=MD5, realm="83.136.32.160",
> >>nonce="43ddf885690c70035ced10ab3e47f0d10e072f02",
> >>response="8981a652aa6088ff017b7600c3a7dd18".
> >>Via: SIP/2.0/UDP 83.136.32.160:34365;branch=z9hG4bK.76b422f0;rport;alias.
> >>To: sip:monitor at nic.at43.at.
> >>Call-ID: 1229319844 at 83.136.32.160.
> >>CSeq: 4 MESSAGE.
> >>Content-Type: text/plain.
> >>Max-Forwards: 70.
> >>User-Agent: sipsak 0.9.6.
> >>From: sip:sipsak at 83.136.32.160:34365;tag=4945eea4.
> >>Content-Length: 42.
> >>.
> >>test message from SIPsak for user monitor.
> >>#
> >>U 2006/01/30 12:24:12.547728 83.136.32.160:5060 -> 213.239.207.29:34365
> >>SIP/2.0 407 Proxy Authentication Required.
> >>Via: SIP/2.0/UDP
> >>83.136.32.160:34365;branch=z9hG4bK.76b422f0;rport=34365;alias;received=21
> >>3. 239.207.29. To:
> >>sip:monitor at nic.at43.at;tag=89c3783a68908612c9b98ed35a45b840.0af9.
> >> Call-ID: 1229319844 at 83.136.32.160.
> >>CSeq: 4 MESSAGE.
> >>From: sip:sipsak at 83.136.32.160:34365;tag=4945eea4.
> >>Proxy-Authenticate: Digest realm="83.136.32.160",
> >>nonce="43ddf8887c1c819420889db63615a22751711f4d".
> >>Server: OpenSer (1.0.0-tls (i386/linux)).
> >>Content-Length: 0.
> >>.
> >>
> >>_______________________________________________
> >>Sipsak mailing list
> >>Sipsak at lists.sipsak.org
> >>http://lists.sipsak.org/mailman/listinfo/sipsak


More information about the Sipsak mailing list