407 Proxy Authentication Required on BYE

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
dstu
Posts: 72
Joined: Mon Feb 06, 2006 3:56 am

407 Proxy Authentication Required on BYE

Post by dstu »

1. Brekeke Product Name and Version:
Brekeke SIP Server , Version 3.2.4.3 Advanced

2. Java version:
1.7.0_40

3. OS type and the version:
Linux 3.2.0-4-686-pae (Debian)

4. UA (phone), gateway or other hardware/software involved:
Asterisk

5. Your problem:
I'm using The Brekeke proxy for through Registration. Asterisk registers to the Brekeke and I use the following rule to register to the ITSP (keyyo):
--------------------------
Matching Patterns
$request = ^REGISTER
To = sip:(33175XXXXXX)@
Deploy Patterns
To = sip:%1@keyyo.net
---------------------------

Then, I use this rule to route the incoming calls to another server in my LAN:
--------------------------
Matching Patterns
$request = ^INVITE
$addr = xx.xxx.xx[1-4]..{1,3}
To = sip:(331.{8})@
Deploy Patterns
To = sip:%1@ivr1
$session = failover sip:%1@ivr2 sip:%1@ivr3
---------------------------

The problem is that when the ITSP sends a call to the registered number, if my IVR is the one that ends the call, they reject the BYE and send a "407 Proxy Authentication Required" request.

In the next BYE, I send it, but the username we send is empty, so it's rejected again:

Code: Select all

Proxy-Authorization: Digest username="",realm="keyyo.net",nonce="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",uri="sip:33177YYYYYYYY@ZZ.ZZ.ZZ.ZZ:5060",response="NNNNNNNNNNNNNNNNNNNNNN",algorithm=MD5,cnonce="SSSSSSS",qop=auth,nc=00000001.
How can I fix that?

Thanks,

David
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

> The problem is that when the ITSP sends a call to the registered number, if my IVR is the one that ends the call, they reject the BYE and send a "407 Proxy Authentication Required" request.


Are you using Asterisk as IVR?
Does it send BYE to the ITSP through the Brekeke?
And then the ITSP rejected the BYE with "407"? Is it correct?
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

> The problem is that when the ITSP sends a call to the registered number, if my IVR is the one that ends the call, they reject the BYE and send a "407 Proxy Authentication Required" request.


Are you using Asterisk as IVR?
Does it send BYE to the ITSP through the Brekeke?
And then the ITSP rejected the BYE with "407"? Is it correct?
dstu
Posts: 72
Joined: Mon Feb 06, 2006 3:56 am

Post by dstu »

Tata wrote: Are you using Asterisk as IVR?
Does it send BYE to the ITSP through the Brekeke?
No. Asterisk sends the REGISTERs that the Brekeke forwards. The IVR is a separate machine that gets the incoming calls and sends the BYE.
Tata wrote: And then the ITSP rejected the BYE with "407"? Is it correct?
Yes. That's exactly what happens
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

Since the ITSP returned "407" to request a credential, the IVR should retries BYE with the credential.

but.. it seems the IVR doesn't know the username/password because the REGISTER was generated by the Asterisk.

so is it possible to forward a call through Asterisk?
I mean that Brekeke forwards ITSP's incoming call to the Asterisk (instead of the IVR directly) and then the Asterisk forwards the call to the IVR. If so, the Asterisk might handle "407".

Are you using the Asterisk for registration purpose only?
dstu
Posts: 72
Joined: Mon Feb 06, 2006 3:56 am

Post by dstu »

Tata wrote:Since the ITSP returned "407" to request a credential, the IVR should retries BYE with the credential.

but.. it seems the IVR doesn't know the username/password because the REGISTER was generated by the Asterisk.

so is it possible to forward a call through Asterisk?
I mean that Brekeke forwards ITSP's incoming call to the Asterisk (instead of the IVR directly) and then the Asterisk forwards the call to the IVR. If so, the Asterisk might handle "407".

Are you using the Asterisk for registration purpose only?
You're absolutely right. I tried that and then I also tried from the Asterisk to the ITSP directly. Regardless of the username I sent in the digest, it kept insisting on sending 407s to my BYEs.

I gave up on this provider. Their support was answering me things I told them. I think they do that on purpose to limit asterisk connections.

Thanks for your advice.

David
Tata
Posts: 223
Joined: Sun Jan 27, 2008 1:03 pm

Post by Tata »

I think Asterisk supports BYE's authentication.

Does the Asterisk retries BYE with the Proxy-Authorization: or Authorization: header?
Post Reply