Summary:ASTERISK-03831: Asterisk fails to properly authenticate the call from multi-fxs gateway
Reporter:Vahan Yerkanian (vahan)Labels:
Date Opened:2005-04-01 08:37:38.000-0600Date Closed:2011-06-07 14:10:38
Versions:Frequency of
Environment:Attachments:( 0) addpac-call.txt
( 1) addpac-register.txt
( 2) sip.conf
( 3) sip.conf.static
( 4) sipura-call.txt
( 5) sipura-register.txt
Description:Asterisk fails to properly authenticate the call made from one of the multiport fxs gateway. I'm attaching the debugs for both gateway register and the failed call. Note that in the call's debug Asterisk erroneously detects the call coming from a different peer registered from a different FXS port of the same gateway. I tried to trace the call-id, branch and tag values for those two ports/peers, but both had unique values...


This is the 8FXS-port AddPac VoiceFinder 1100 Gateway. (http://www.addpac.com/english/AP1100.html)
Comments:By: Kevin P. Fleming (kpfleming) 2005-04-01 09:44:57.000-0600

Your multi-port gateway is registering all its ports using the same IP address and port number combination. While in an ideal situation Asterisk would work properly with this arrangement, currently it does not do so unless the circumstances are just right.

There may be a workaround by setting up your sip.conf properly, but it's hard to tell since you haven't included any configuration information. Please post the relevant parts of your sip.conf file.

By: Kevin P. Fleming (kpfleming) 2005-04-01 09:48:22.000-0600

Also, once again you posted this bug as 'major' contrary to the bug reporting guidelines. This is not a 'major' bug in Asterisk, as there are likely configuration workarounds for this poorly-behaving gateway.

By: Vahan Yerkanian (vahan) 2005-04-01 09:58:27.000-0600

uploaded my sip.conf from the stable version, also uploaded register and call debugs for spa-2100, which uses the same ip and port for both fxs ports, and works flawlessly...

By: Olle Johansson (oej) 2005-04-01 10:20:22.000-0600

Hey, come on. Since you are using a db we can't check the matching.

Do you have defined "user"'s for both ports?

By: Kevin P. Fleming (kpfleming) 2005-04-01 10:29:10.000-0600

OK, my first reaction is that if this works with an SPA-2100 but not with the AddPac,the fault does not lie with Asterisk. I'm willing to be proven wrong, but this will require adequate information from you.

What I would suggest first is for you to put together the simplest possible Asterisk configuration that still replicates the problem. No sipfriends, nothing fancy, just a plain a sip.conf with type=friend entries for the gateway's ports. Once you can replicate the problem using that configuration, post a complete trace include 'sip debug', 'set verbose 255' and 'set debug 255', along with the failing sip.conf file.

By: Vahan Yerkanian (vahan) 2005-04-01 11:16:34.000-0600

My apologies, i'm losing hair at fast pace due this stuff.
Yes, indeed db has username/password for both of the ports.

By: Vahan Yerkanian (vahan) 2005-04-04 02:52:56

side note: adding insecure=very fixed the bug (even with sipfriends), as it disables asterisk's auth check on each INVITE.

By: Olle Johansson (oej) 2005-04-04 03:06:49

Configuration error.

By: Olle Johansson (oej) 2005-04-04 03:07:01