[Freeswitch-users] SIP/2.0 407 Proxy Authentication Required

Shehzad Pankhawala shehzad.pankhawala at ecosmob.com
Tue Aug 12 13:02:48 EDT 2008


Hi all,

As H323 is not currently supported, I need to configure freeswitch to 
route calls to Yate2 to process my H323 calls and vice versa.

For that I created the gateway in sip_profiles/external.xml
<profile name="yate">
    <gateways>
        <gateway name="192.168.1.23">
            <param name="realm" value="192.168.1.23"/>
            <param name="extension" value="1001"/>
        </gateway>
    </gateways>
    <settings>
        <param name="debug" value="1"/>
        <param name="rfc2833-pt" value="101"/>
        <param name="sip-port" value="5060"/>
        <param name="dialplan" value="XML"/>
        <param name="dtmf-duration" value="100"/>
        <param name="codec-prefs" value="$${default_codecs}"/>
        <param name="codec-ms" value="20"/>
        <param name="use-rtp-timer" value="true"/>
        <param name="rtp-timer-name" value="soft"/>
        <param name="rtp-ip" value="auto"/>
        <param name="sip-ip" value="auto"/>
        <param name="accept-blind-reg" value="true"/>
        <param name="nonce-ttl" value="60"/>
        <param name="auth-calls" value="false"/>
    </settings>
 </profile>
_______________________________

Note xxx.23 is IP of yate and xxx.22 is ip of freeswitch

I have also created the user in directory

<include>
    <user id="4444" mailbox="4444">
        <params>
            <param name="password" value="1234"/>
            <param name="vm-password" value="4444"/>
        </params>
        <variables>
            <variable name="accountcode" value="4444"/>
            <variable name="user_context" value="default"/>
            <variable name="effective_caller_id_name" value="4444"/>
            <variable name="effective_caller_id_number" value="4444"/>
        </variables>
      </user>
</include>



______________________________________________

Now for the same freeswitch user I have created Yate Line on Yate server 
in accfile.conf (just like gateway in freeswitch)
[MyFS]
enabled=yes
protocol=sip
username=4444
description=FS account
interval=600
formats=alaw,mulaw,gsm
authname=4444
password=1234
number=4444
domain=192.168.1.22
registrar=192.168.1.22

To route calls from Yate to freeswitch I have created the folowing 
regexroute.conf entry of Yate server
^1001$=sip/sip:1001;line=MyFS;
;this means that calls dialed to 1001 will be routed to 1001 Freeswitch 
server.


Then I dial from user registerd on Yate to 1001 The call is not 
processed of freeswitch at all,
but while i put ngrep on port 5060  on server Freeswitch I found the 
following sequences of SIP messages:
___________________________________________
U 192.168.1.23:5060 -> 192.168.1.22:5060
INVITE sip:1001 at 192.168.1.22 SIP/2.0.
Max-Forwards: 19.
Via: SIP/2.0/UDP 192.168.1.23:5060;rport;branch=z9hG4bK1888370697.
From: "4444" <sip:4444 at 192.168.1.23>;tag=735360950.
To: <sip:1001 at 192.168.1.22>.
Call-ID: 1932110763 at 192.168.1.23.
CSeq: 25 INVITE.
User-Agent: YATE/2.0.0.
Contact: <sip:4444 at 192.168.1.23:5060>.
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO.
Content-Type: application/sdp.
Content-Length: 264.
.
v=0.
o=yate 1218557236 1218557236 IN IP4 192.168.1.23.
s=SIP Call.
c=IN IP4 192.168.1.23.
t=0 0.
m=audio 19990 RTP/AVP 98 8 0 101.
a=rtpmap:98 ILBC/8000.
a=fmtp:98 mode=30.
a=rtpmap:8 PCMA/8000.
a=rtpmap:0 PCMU/8000.
a=rtpmap:101 telephone-event/8000.
a=ptime:30.

#
U 192.168.1.22:5060 -> 192.168.1.23:5060
SIP/2.0 100 Trying.
Via: SIP/2.0/UDP 192.168.1.23:5060;rport=5060;branch=z9hG4bK1888370697.
From: "4444" <sip:4444 at 192.168.1.23>;tag=735360950.
To: <sip:1001 at 192.168.1.22>.
Call-ID: 1932110763 at 192.168.1.23.
CSeq: 25 INVITE.
User-Agent: FreeSWITCH-mod_sofia/1.0.1-hacked.
Content-Length: 0.
.

#
U 192.168.1.22:5060 -> 192.168.1.23:5060
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 192.168.1.23:5060;rport=5060;branch=z9hG4bK1888370697.
From: "4444" <sip:4444 at 192.168.1.23>;tag=735360950.
To: <sip:1001 at 192.168.1.22>;tag=4ayXjppg3X9Fe.
Call-ID: 1932110763 at 192.168.1.23.
CSeq: 25 INVITE.
User-Agent: FreeSWITCH-mod_sofia/1.0.1-hacked.
Accept: application/sdp.
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, PRACK, MESSAGE, SUBSCRIBE, 
NOTIFY, REFER, UPDATE, REGISTER, INFO, PUBLISH.
Supported: 100rel, timer, precondition, path, replaces.
Allow-Events: talk, presence, dialog, call-info, sla, 
include-session-description, presence.winfo, message-summary.
Proxy-Authenticate: Digest realm="192.168.1.22", 
nonce="ebe08c45-0762-435e-9986-28064ed91b10", algorithm=MD5, qop="auth".
Content-Length: 0.
.

#
U 192.168.1.23:5060 -> 192.168.1.22:5060
ACK sip:1001 at 192.168.1.22 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.23:5060;rport;branch=z9hG4bK1888370697.
From: "4444" <sip:4444 at 192.168.1.23>;tag=735360950.
To: <sip:1001 at 192.168.1.22>;tag=4ayXjppg3X9Fe.
Call-ID: 1932110763 at 192.168.1.23.
CSeq: 25 ACK.
Max-Forwards: 19.
Contact: <sip:4444 at 192.168.1.23:5060>.
User-Agent: YATE/2.0.0.
Content-Length: 0.
.
________________________________________________________



Means calls are coming on freeswitch server, but even there is no 
process on freeswitch console.
Why the calls are not processed on freeswitch, and displayed "SIP/2.0 
407 Proxy Authentication Required."

Is there any clue, mis-configured or any other solution, please reply.

Thanks,
Shehzad






More information about the Freeswitch-users mailing list