Octal IP address: Asterisk bug?


#1

I observe the following behaviour:

A SIP phone sends the following REGISTER to Asterisk:

IP, Src: 130.198.11.120 (130.198.11.120), Dst: 192.168.0.4 (192.168.0.4)
UDP, Src: 5060 (5060), Dst: 5060 (5060)
Session Initiation Protocol
Request-Line: REGISTER sip:130.198.21.215 SIP/2.0
Via: SIP/2.0/UDP 130.198.011.120:5060;…

The IP header shows 130.198.11.120, the Via-field is 130.198.011.120.

Asterisk replies as follows:

IP, Src: 192.168.0.4 (192.168.0.4), Dst: 130.198.9.120 (130.198.9.120)
UDP, Src: 5060 (5060), Dst: 5060 (5060)
Session Initiation Protocol
Status-Line: SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 130.198.011.120:5060;…

The IP header shows 130.198.9.120, the Via-field is 130.198.011.120.

As the IP address is WRONG (9 instead of 11), communication is impossible.

I guess Asterisk has a bug to interpret ASCII “011” as octal “11” = 9!!

What do you suggest?


#2

Check the bug tracker and if not present submit a bug report. The bug tracker is here:

voip-info.org/wiki/view/Asterisk+bug+tracker