[SR-Users] Kamailio PSTN with User/Pass authentication

Infinicalls Infinicalls infinicalls at gmail.com
Wed Sep 23 17:20:58 CEST 2015


Hi,
 Thanks very much both of you. But I get this following error :

#service kamailio restart
 * Not starting Kamailio SIP Server: invalid configuration file!
 *
 *  0(39013) ERROR: <core> [cfg.y:3282]: yyparse(): misused command uac_auth
 0(39013) : <core> [cfg.y:3426]: yyerror_at(): parse error in config
file /usr/local/etc/kamailio/kamailio.cfg, line 332, column 22:
Command cannot be used in the block

ERROR: bad config file (1 errors)
 0(39013) INFO: <core> [sctp_core.c:48]: sctp_core_destroy(): SCTP API
not initialized

regards
Ganesh Kumar



On 9/23/15, Barthel Marco (CI/AFU1) <Marco.Barthel at de.bosch.com> wrote:
> That's what we used:
>
>
>
>
> modparam("uac","auth_realm_avp","$avp(s:auth_realm_avp)")
> modparam("uac","auth_username_avp","$avp(s:auth_username_avp)")
> modparam("uac","auth_password_avp","$avp(s:auth_password_avp)")
>
>
>
> route[HANDLE_PROXY_AUTH_RESPONSE_M]
> {
>     if ($T_reply_code == "407")  # there's also 401
>     {
>         $avp(s:auth_realm_avp) = "whichever realm is used";
>         $avp(s:auth_username_avp) = "someuser";
>         $avp(s:auth_password_avp) = "somesecret";
>
>         if (uac_auth())
>         {
>             xlog("L_INFO", "$var(tan)[HANDLE_PROXY_AUTH_RESPONSE_M] did
> auth. Relaying to new destination. from=$fu, callee-selected-by=$ou,
> uri=$ru");
>             route(RELAY_ROUTE_C);  # doing the relay here
>             exit;
>         }
>         else
>         {
>             xlog("L_INFO", "$var(tan)[HANDLE_PROXY_AUTH_RESPONSE_M] no
> matching realm found. realm=$ar");
>         }
>     }
> }
>
>
>
> failure_route[STD_FAILURE_ROUTE]
> {
>     # ...
>     route(HANDLE_PROXY_AUTH_RESPONSE_M);
>     # ...
>
> }
>
> Mit freundlichen Grüßen / Best regards
>
>  Marco Barthel
>
> Robert Bosch GmbH
>  (CI/AFU1)
> Postfach 30 02 20
> 70442 Stuttgart
> GERMANY
> www.bosch.com
>
> Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
> Aufsichtsratsvorsitzender: Franz Fehrenbach; Geschäftsführung: Dr. Volkmar
> Denner,
> Dr. Stefan Asenkerschbaumer, Dr. Rolf Bulander, Dr. Stefan Hartung, Dr.
> Markus Heyn, Dr. Dirk Hoheisel,
> Christoph Kübel, Uwe Raschke, Dr. Werner Struth, Peter Tyroller
>
>
>> -----Original Message-----
>> From: sr-users [mailto:sr-users-bounces at lists.sip-router.org] On Behalf
>> Of
>> Infinicalls Infinicalls
>> Sent: Montag, 21. September 2015 17:09
>> To: Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org>
>> Subject: [SR-Users] Kamailio PSTN with User/Pass authentication
>>
>> Hi,
>>  I am trying to add PSTN gw for terminating my calls. I have changed the
>> IP in the
>> kamailio.cfg file, but this provider wants digest auth and so I need to
>> pass
>> api/pass to them. Can somebody guide me how and where to add the
>> username+pass to the config file.
>>
>> thanks
>>
>> regards
>> Ganesh Kuamr
>>
>> _______________________________________________
>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>> sr-
>> users at lists.sip-router.org
>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>



More information about the sr-users mailing list