Check if you have,

# IP authorization and user authentication
route[AUTH] {
...
        # user authenticated - remove auth header
        if(!is_method("REGISTER|PUBLISH"))
            consume_credentials();
...
}

This basically allows only REGISTER and PUBLISH to be authenticated by backend server (FreeSWITCH), so you have to add SUBSCRIBE (and all other methods that you wish to be authenticated by backend server) to this list.

Hope this helps.

--
Muhammad Shahzad Shafi
Tel: +49 176 99 83 10 85


On Wed, Oct 26, 2022 at 9:39 AM SparkleZou <sparklezou@126.com> wrote:
Hi Daniel,

Thanks!

Already configured on Freeswitch. 
/usr/local/freeswitch/conf/vars.xml
         <X-PRE-PROCESS cmd="set" data="internal_auth_calls=false"/>

/usr/local/freeswitch/conf/autoload_configs/acl.conf.xml    
       <node type="allow" cidr="10.120.100.180/24"/>

For the call INVITE message, it works fine. NO need auth.

But the SUBSCRIBER  message, seems different.

Strange.

BR,
Sparkle Zou


At 2022-10-25 16:17:11, "Daniel-Constantin Mierla" <miconda@gmail.com> wrote:

Hello,

you have to configure freeswitch to allow traffic from kamailio based on ip address, not with username/password.

Cheers,
Daniel

On 25.10.22 02:55, SparkleZou wrote:
Hi Sir/Madam,

I'm trying to set a Fresswitch as the Voicemail server.

I set the #!define WITH_VOICEMAIL in the kamailio.cfg file to enable the default VoiceMail configuration.

Set the voicemail server address as following :

voicemail.srv_ip = "10.120.100.179" desc "VoiceMail IP Address"
voicemail.srv_port = "5060" desc "VoiceMail Port"

And the kamailio server address is 10.120.100.180.

Here face the issue, the Subscribe message could NOT be authorized. The SUBSCRIBER message with token could NOT be forworded to Freeswitch. 





The log is also attached.

It's resllay strange. Please help check. Thanks!

BR,
Sparkle Zou

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
  Nov 7-10, 2022 (Europe Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
sr-users@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users