Re: [SR-Users] Additional Param Check in ConsumeCredential Auth

2019-01-20 Thread YASIN CANER
Hello

you can use load_credentials. After Auth is done , defined columns load to avp. 
and you can use it.


http://kamailio.org/docs/modules/5.2.x/modules/auth_db.html#auth_db.p.load_credentials

Yasin CANER


From: sr-users  on behalf of Mojtaba 

Sent: Monday, January 21, 2019 10:06 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Additional Param Check in ConsumeCredential Auth

Hello Prabhat,
Would you look at this function pv_www_authenticate in auth module? It seems it 
would be useful for you
You could use the email as authentication parameter too,
With Regards.Mojtaba


On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar 
mailto:prabhat.ku...@myoperator.co>> wrote:
Hi,

I want to check additional param in Auth module. For. ex., other than username 
and secret , i want to validate user by its email address. How can i do that?

Regards,

Prabhat Kumar

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


--
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Additional Param Check in ConsumeCredential Auth

2019-01-20 Thread Mojtaba
Hello Prabhat,
Would you look at this function pv_www_authenticate in auth module? It
seems it would be useful for you
You could use the email as authentication parameter too,
With Regards.Mojtaba


On Mon, Jan 21, 2019 at 10:08 AM Prabhat Kumar 
wrote:

> Hi,
>
> I want to check additional param in Auth module. For. ex., other than
> username and secret , i want to validate user by its email address. How can
> i do that?
>
> Regards,
>
> Prabhat Kumar
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
--Mojtaba Esfandiari.S
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Additional Param Check in ConsumeCredential Auth

2019-01-20 Thread Prabhat Kumar
Hi,

I want to check additional param in Auth module. For. ex., other than
username and secret , i want to validate user by its email address. How can
i do that?

Regards,

Prabhat Kumar
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Radius Accounting with Kamailio 5.1 (On-line Charging)

2019-01-20 Thread YASIN CANER
Hello,

After setting servers conf file , you should see radius requests on tcpdump 
because of UDP. In addition ,have a look log files if there is a hint.

FreeRadius conf files.

https://github.com/FreeRADIUS/freeradius-client/tree/master/etc



Yasin CANER
[https://avatars1.githubusercontent.com/u/2430370?s=400&v=4]

freeradius-client/etc at master · FreeRADIUS/freeradius-client · 
GitHub
You signed in with another tab or window. Reload to refresh your session. You 
signed out in another tab or window. Reload to refresh your session.
github.com




From: sr-users  on behalf of Yazar Lwin 

Sent: Monday, January 21, 2019 6:21 AM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Radius Accounting with Kamailio 5.1 (On-line Charging)

Hello,

I enabled acc_radius module and acc module as well.  I also followed the 
acc_radius module config as below. CDR are populated in Siremis. But can't 
initiated radius accounting.

# - acc params -
/* what special events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
 * if you enable this parameter, be sure the enable "append_fromtag"
 * in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
#acc_radius acc params--
modparam("acc_radius", "radius_config", "/etc/radiusclient/radiusclient.conf")
modparam("acc_radius", "radius_flag", 1)
modparam("acc_radius", "radius_missed_flag", 2)
modparam("acc_radius", "service_type", 15)
modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]); email=$avp(s:email)")
modparam("acc_radius", "rad_time_mode", 1)


On Sat, Jan 19, 2019 at 7:52 PM YASIN CANER 
mailto:caner_y...@hotmail.com>> wrote:
Hello

Radius accounting working with acc module.  When you set acc flag , it try to 
send radius request to configured server. Dont forget the  configure 
radiusclient configuration. Ypu can find it on internet. Here is a document , 
it is old but helps

https://www.kamailio.org/docs/openser-radius-1.0.x.html

Good luck

Yasin CANER

iPhone’umdan gönderildi

Yazar Lwin mailto:yarzarl...@gmail.com>> şunları yazdı 
(19 Oca 2019 14:36):

Hi All,

I've Kamailio 5.1 running with Mysql as local DB.
I've configured Siremis as well. I completed accounting configuration as per 
the instruction. Now I can see the accounting list, CDR list and as well as 
missed calls in Siremis But I can't integrate with free radius server to 
trigger the accounting, just like Diameter transaction in IMS. Kindly advise 
which doc I should check.
I would like to enable Radius server as an online charging.

Best regards
Yazar
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Radius Accounting with Kamailio 5.1 (On-line Charging)

2019-01-20 Thread Yazar Lwin
Hello,

I enabled acc_radius module and acc module as well.  I also followed the
acc_radius module config as below. CDR are populated in Siremis. But can't
initiated radius accounting.

# - acc params -
/* what special events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_ack", 0)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
 * if you enable this parameter, be sure the enable "append_fromtag"
 * in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "log_flag", FLT_ACC)
modparam("acc", "log_missed_flag", FLT_ACCMISSED)
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;src_ip=$si;"
"dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
#acc_radius acc params--
modparam("acc_radius", "radius_config",
"/etc/radiusclient/radiusclient.conf")
modparam("acc_radius", "radius_flag", 1)
modparam("acc_radius", "radius_missed_flag", 2)
modparam("acc_radius", "service_type", 15)
modparam("acc_radius", "radius_extra", "via=$hdr(Via[*]);
email=$avp(s:email)")
modparam("acc_radius", "rad_time_mode", 1)


On Sat, Jan 19, 2019 at 7:52 PM YASIN CANER  wrote:

> Hello
>
> Radius accounting working with acc module.  When you set acc flag , it try
> to send radius request to configured server. Dont forget the  configure
> radiusclient configuration. Ypu can find it on internet. Here is a document
> , it is old but helps
>
> https://www.kamailio.org/docs/openser-radius-1.0.x.html
>
> Good luck
>
> Yasin CANER
>
> iPhone’umdan gönderildi
>
> Yazar Lwin  şunları yazdı (19 Oca 2019 14:36):
>
> Hi All,
>
> I've Kamailio 5.1 running with Mysql as local DB.
> I've configured Siremis as well. I completed accounting configuration as
> per the instruction. Now I can see the accounting list, CDR list and as
> well as missed calls in Siremis But I can't integrate with free radius
> server to trigger the accounting, just like Diameter transaction in IMS.
> Kindly advise which doc I should check.
> I would like to enable Radius server as an online charging.
>
> Best regards
> Yazar
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dynamic UAC Registration

2019-01-20 Thread Joel Serrano
I’m not sure if I’m missing the important point here, but can you just set
the realm to whatever the carrier expects in the uacreg table?

I think I use it that way and we have different realms for different
carriers...

https://www.kamailio.org/docs/modules/5.2.x/modules/uac.html#idm1047648852

Or the problem is that you don’t know the realm in advance?


On Sun, Jan 20, 2019 at 12:03 Mack Hendricks  wrote:

> I’m using the dRouting module.  Is there a way to store the realm using
> this module?
>
> Also, I don’t think I know the realm until the first time I send a
> Register or Invite to the carrier.  I could guess the realm, but we want to
> make sure we handle edge cases where the name of the realm is different
> then the domain name of the carrier.
>
> Sent from my iPhone
>
> On Jan 20, 2019, at 2:22 PM, Brandon Armstead  wrote:
>
> I suspect you could check $rd or $du ?  Although I don’t quite understand
> why you won’t know the realm to begin with based on the selection?
>
> On Sun, Jan 20, 2019 at 03:59 Mack Hendricks  wrote:
>
>> Hey All,
>>
>> So, I want to use the UAC module to handle Digest Auth to upstream
>> carriers.  But, I don’t know which carrier will be selected until another
>> module (dRouting in this case) tells the logic which carrier to use.
>>
>> I can see in the logs that the uac_auth function can capture the Auth
>> Realm.  But, I need to access it from the Kamailio script so that I can
>> lookup the credentials for that realm and then call uac_auth.  I’ve tried
>> getting the info from $ar, but that gives me the realm of the inbound
>> request versus the realm of the upstream carrier.  Also, I’ve tried
>> using $T_rpl($ar), but that returns 0.  Here’s my logic from the Kamailio
>> file:
>>
>>
>> if(t_check_status("401|407")) {
>> $var(reply_realm) = $T_rpl($ar);
>> $var(query)="select auth_username,auth_password from
>> uacreg where realm='" + $var(reply_realm) + "'";
>> sql_xquery("cb","$var(query)","rb");
>> xlog("L_DEBUG","[MANAGE_FAILURE: Proxy Auth]: The query
>> is $var(query) auth realm is $var(reply_realm) and the user name is
>> $xavp(rb=>auth_username)");
>> $avp(auser) = $xavp(rb=>auth_username);
>> $avp(apass) = $xavp(rb=>auth_password);
>> uac_auth();
>> t_relay();
>> exit;`
>> }
>>
>>
>> A snippet of the log file is below:
>>
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
>> l=1616 a=63 n=assign
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
>> l=1617 a=63 n=assign
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
>> l=1618 a=24 n=uac_auth
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth.c:409]: uac_auth(): picked reply is 0x7f900cb7eaf0, code 407
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth.c:225]: get_autenticate_hdr(): looking for header "Proxy-Authenticate"
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth.c:429]: uac_auth(): header found; body=
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth_hdr.c:209]: parse_authenticate_body(): ="sip.flowroute.com"
>> state=2
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth_hdr.c:209]: parse_authenticate_body():
>> ="XERJMlxESAbDNCK3INmBfoET1GGxpcyr" state=3
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth_hdr.c:209]: parse_authenticate_body(): ="auth" state=1
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
>> [auth.c:449]: uac_auth(): no credential for realm "sip.flowroute.com"
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
>> l=1619 a=24 n=t_relay
>>
>>
>> Thanks in advance for any help
>>
>> Mack Hendricks
>> dSIPRouter
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Sent from Gmail Mobile
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dynamic UAC Registration

2019-01-20 Thread Mack Hendricks
I’m using the dRouting module.  Is there a way to store the realm using this 
module?

Also, I don’t think I know the realm until the first time I send a Register or 
Invite to the carrier.  I could guess the realm, but we want to make sure we 
handle edge cases where the name of the realm is different then the domain name 
of the carrier.  

Sent from my iPhone

> On Jan 20, 2019, at 2:22 PM, Brandon Armstead  wrote:
> 
> I suspect you could check $rd or $du ?  Although I don’t quite understand why 
> you won’t know the realm to begin with based on the selection? 
> 
>> On Sun, Jan 20, 2019 at 03:59 Mack Hendricks  wrote:
>> Hey All,
>> 
>> So, I want to use the UAC module to handle Digest Auth to upstream carriers. 
>>  But, I don’t know which carrier will be selected until another module 
>> (dRouting in this case) tells the logic which carrier to use.
>> 
>> I can see in the logs that the uac_auth function can capture the Auth Realm. 
>>  But, I need to access it from the Kamailio script so that I can lookup the 
>> credentials for that realm and then call uac_auth.  I’ve tried getting the 
>> info from $ar, but that gives me the realm of the inbound request versus the 
>> realm of the upstream carrier.  Also, I’ve tried using $T_rpl($ar), but that 
>> returns 0.  Here’s my logic from the Kamailio file:
>> 
>> 
>> if(t_check_status("401|407")) {
>> $var(reply_realm) = $T_rpl($ar);
>> $var(query)="select auth_username,auth_password from uacreg 
>> where realm='" + $var(reply_realm) + "'";
>> sql_xquery("cb","$var(query)","rb");
>> xlog("L_DEBUG","[MANAGE_FAILURE: Proxy Auth]: The query is 
>> $var(query) auth realm is $var(reply_realm) and the user name is 
>> $xavp(rb=>auth_username)");
>> $avp(auser) = $xavp(rb=>auth_username);
>> $avp(apass) = $xavp(rb=>auth_password);
>> uac_auth();
>> t_relay();
>> exit;`
>> }
>> 
>> 
>> A snippet of the log file is below:
>> 
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1616 
>> a=63 n=assign
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1617 
>> a=63 n=assign
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1618 
>> a=24 n=uac_auth
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth.c:409]: uac_auth(): picked reply is 0x7f900cb7eaf0, code 407
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth.c:225]: get_autenticate_hdr(): looking for header "Proxy-Authenticate"
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth.c:429]: uac_auth(): header found; body=> realm="sip.flowroute.com", nonce="XERJMlxESAbDNCK3INmBfoET1GGxpcyr", 
>> qop="auth">
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth_hdr.c:209]: parse_authenticate_body(): ="sip.flowroute.com" 
>> state=2
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth_hdr.c:209]: parse_authenticate_body(): 
>> ="XERJMlxESAbDNCK3INmBfoET1GGxpcyr" state=3
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth_hdr.c:209]: parse_authenticate_body(): ="auth" state=1
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
>> [auth.c:449]: uac_auth(): no credential for realm "sip.flowroute.com"
>> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
>> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1619 
>> a=24 n=t_relay
>> 
>> 
>> Thanks in advance for any help
>> 
>> Mack Hendricks
>> dSIPRouter
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> -- 
> Sent from Gmail Mobile
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Dynamic UAC Registration

2019-01-20 Thread Brandon Armstead
I suspect you could check $rd or $du ?  Although I don’t quite understand
why you won’t know the realm to begin with based on the selection?

On Sun, Jan 20, 2019 at 03:59 Mack Hendricks  wrote:

> Hey All,
>
> So, I want to use the UAC module to handle Digest Auth to upstream
> carriers.  But, I don’t know which carrier will be selected until another
> module (dRouting in this case) tells the logic which carrier to use.
>
> I can see in the logs that the uac_auth function can capture the Auth
> Realm.  But, I need to access it from the Kamailio script so that I can
> lookup the credentials for that realm and then call uac_auth.  I’ve tried
> getting the info from $ar, but that gives me the realm of the inbound
> request versus the realm of the upstream carrier.  Also, I’ve tried
> using $T_rpl($ar), but that returns 0.  Here’s my logic from the Kamailio
> file:
>
>
> if(t_check_status("401|407")) {
> $var(reply_realm) = $T_rpl($ar);
> $var(query)="select auth_username,auth_password from
> uacreg where realm='" + $var(reply_realm) + "'";
> sql_xquery("cb","$var(query)","rb");
> xlog("L_DEBUG","[MANAGE_FAILURE: Proxy Auth]: The query is
> $var(query) auth realm is $var(reply_realm) and the user name is
> $xavp(rb=>auth_username)");
> $avp(auser) = $xavp(rb=>auth_username);
> $avp(apass) = $xavp(rb=>auth_password);
> uac_auth();
> t_relay();
> exit;`
> }
>
>
> A snippet of the log file is below:
>
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1616 a=63 n=assign
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1617 a=63 n=assign
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1618 a=24 n=uac_auth
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:409]: uac_auth(): picked reply is 0x7f900cb7eaf0, code 407
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:225]: get_autenticate_hdr(): looking for header "Proxy-Authenticate"
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:429]: uac_auth(): header found; body=
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body(): ="sip.flowroute.com"
> state=2
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body():
> ="XERJMlxESAbDNCK3INmBfoET1GGxpcyr" state=3
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body(): ="auth" state=1
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:449]: uac_auth(): no credential for realm "sip.flowroute.com"
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1619 a=24 n=t_relay
>
>
> Thanks in advance for any help
>
> Mack Hendricks
> dSIPRouter
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Sent from Gmail Mobile
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-20 Thread Sergey Safarov
Hello Henning
description is added at
https://www.kamailio.org/wiki/start#installation_using_docker

Sergey

вс, 20 янв. 2019 г. в 18:46, Henning Westerholt :

> Am Freitag, 18. Januar 2019, 12:08:11 CET schrieb Sergey Safarov:
> > kamailio is debian based. If you know debian then for you may be more
> easy
> > extend this image.
> > This primary dist that is supported by kamailio team.
> >
> > kamailio-ci is Alpine dist based. Alpine dist allow create more thin and
> > secure docker images.
> > Please check kamailio images sizes
> > 1)
> >
> https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio/tags
> > 2)
> >
> https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio-ci/t
> > ags
> >
> > and vulnerabilities
> > 1) https://hub.docker.com/_/debian/scans/library/debian/9.6
> > 2) https://hub.docker.com/_/alpine/scans/library/alpine/3.8
>
> Hi Sergey,
>
> thank you for the info. Would it make sense to add it to the docker info
> page,
> or if this is not possible, somewhere in the kamailio wiki?
>
> Best regards,
>
> Henning
>
> --
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
> Kamailio security assessment - https://skalatan.de/de/assessment
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Problem with ghost dialogs

2019-01-20 Thread Daniel-Constantin Mierla
Hello,

following up as I got some time to look at the code and the cleanup was
done only for state 1 (no replies), your rpc output shows it was state 2
(1xx replies). I pushed a patch for it with the commit:

  -
https://github.com/kamailio/kamailio/commit/8fd514f9bb9e819fa6e5880dc229955cafd72494

I will backport it to 5.2 and 5.1, but maybe you have a chance to test
it before.

Cheers,
Daniel

On 18.01.19 10:06, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> they should not stay that long, there are some parameters related to
> it, see:
>
>   -
> https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.early_timeout
>
> Does it happen that you have the sip trace for this call?
>
> Cheers,
> Daniel
>
> On 17.01.19 20:25, Cyrille Demaret wrote:
>>
>> Hi,
>>
>>  
>>
>> I’m running Kamailio 5.1.4 and I have some problem with some random
>> dialogs sometimes staying in early state and never ends until I
>> restart Kamailio.
>>
>>  
>>
>> According to the init_ts, this dialog is there since 11/01/2019.
>>
>>  
>>
>>   * Do you have an idea how I can diagnose this problem?
>>   * Is there a way to kill these dialogs? I have tried with
>> “dlg.end_dlg” but It seems it’s not possible to kill dialogs in
>> early states.
>>
>>  
>>
>> {
>>
>>     h_entry: 3382
>>
>>     h_id: 4069
>>
>>     call-id: d6e6de79-7d55-486f-889f-01b05c003411
>>
>>     from_uri: sip:0037...@mydomain.com
>>
>>     to_uri: sip:1...@mydomain.com
>>
>>     state: 2
>>
>>     start_ts: 0
>>
>>     init_ts: 1547195739
>>
>>     timeout: 0
>>
>>     lifetime: 43200
>>
>>     dflags: 1536
>>
>>     sflags: 0
>>
>>     iflags: 0
>>
>>     caller: {
>>
>>     tag: a909d6fa-cee9-44ac-ad76-3697fcd5cb0e
>>
>>     contact:
>> sip:asterisk@192.168.102.20:5080;alias=192.168.102.20~5080~1
>>
>>     cseq: 7362
>>
>>     route_set:
>>
>> socket: udp:192.168.102.10:5060
>>
>>     }
>>
>>     callee: {
>>
>>     tag:
>>
>> contact:
>>
>> cseq:
>>
>> route_set:
>>
>> socket:
>>
>> }
>>
>>     profiles: {
>>
>>     {
>>
>>     caller: sip:0037...@mydomain.com
>>
>>     }
>>
>>     {
>>
>>     callee: sip:1...@mydomain.com
>>
>>     }
>>
>>     }
>>
>>     variables: {
>>
>>     }
>>
>> }
>>
>>  
>>
>> Thank you for your help.
>>
>>  
>>
>> Best regards,
>>
>>  
>>
>> Cyrille
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> 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 World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
> Washington, DC, USA -- www.asipto.com

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Mysql

2019-01-20 Thread Henning Westerholt
Am Samstag, 19. Januar 2019, 10:05:49 CET schrieb Nicolas Breuer:
> Hello,
> 
> Any updates on this issue ?
> Still the same error on the last version of Kamailio

Hello Nicolas,

have you tried to execute the command from mysql client as suggested from 
Tyler? Do you see the same error there, do you get a result back from the 
function?

If you can't get rid of this somehow, you could ignore it. It is only a 
warning after all, that shows that the DB interface don't know about the 
result code from the stored procedure and default to DB1_STRING type.

Best regards,

Henning

> De : sr-users  De la part de Tyler
> Preder Envoyé : mardi 13 novembre 2018 14:07
> À : Kamailio (SER) - Users Mailing List 
> Objet : Re: [SR-Users] Mysql
> 
> Just as a check, if you run the commands from the within Mysql do they
> complete successfully?
 
> 
> > delete FROM sip_trace where time_stamp < now() - INTERVAL 2 MONTH;
> > 
> >  OPTIMIZE TABLE sip_trace;
> 
> 
> 
> Tyler
> 
> From: sr-users
> mailto:sr-users-bounces@lists.kamailio
> .org>> On Behalf Of Nicolas Breuer Sent: Thursday, November 8, 2018 9:42 AM
> To: mico...@gmail.com; Kamailio (SER) - Users
> Mailing List
> mailto:sr-users@lists.kamailio.org>> Subject:
> Re: [SR-Users] Mysql
> 
> Hello Daniel,
> 
> Still the same error ☹
> 
> Nov  8 12:41:30 proxy1 /usr/sbin/kamailio[16889]: WARNING: db_mysql
> [km_res.c:142]: db_mysql_get_columns(): unhandled data type column
> (Msg_text) type id (250), use DB1_STRING as default 
> 
> De : Daniel-Constantin Mierla mailto:mico...@gmail.com>>
> Envoyé : lundi 5 novembre 2018 12:39
> À : Nicolas Breuer
> mailto:nicolas.bre...@belcenter.biz>>;
> Kamailio (SER) - Users Mailing List
> mailto:sr-users@lists.kamailio.org>> Objet :
> Re: [SR-Users] Mysql
> 
> 
> You do not need the response from the sql procedure, try with:
> 
> sql_query("cb","call Traces_Clean()");
> Cheers,
> Daniel
> On 05.11.18 12:22, Nicolas Breuer wrote:
> modparam("rtimer", "timer", "name=cleantrace;interval=86400;mode=1;")
> modparam("rtimer", "exec", "timer=cleantrace;route=Clean_Traces")
> 
> route[Clean_Traces] {
> xlog("L_NOTICE", "Cleaning Traces" );
> sql_query("cb","call Traces_Clean()","rb");
> }
> 
> De : Daniel-Constantin Mierla 
> Envoyé : lundi 5 novembre 2018 12:16
> À : Nicolas Breuer
> ;
> Kamailio (SER) - Users Mailing List
>  Objet :
> Re: [SR-Users] Mysql
> 
> 
> How is launched by the rtimer module? Paste the route block here if you want
> further assistance.
 
> The c code for using sip_trace table in the siptrace module is not the one
> printing the log message, so we need to see the config part that creates
> it.
 
> Cheers,
> Daniel
> 
> On 05.11.18 12:04, Nicolas Breuer wrote:
> It’s a stored sql procedure launched by the rtimer module.
> 
> 
> De : Daniel-Constantin Mierla 
> Envoyé : lundi 5 novembre 2018 11:57
> À : Nicolas Breuer
> ;
> Kamailio (SER) - Users Mailing List
>  Objet :
> Re: [SR-Users] Mysql
> 
> 
> Hello,
> 
> how do you execute that sql statement?
> 
> Cheers,
> Daniel
> 
> On 05.11.18 10:40, Nicolas Breuer wrote:
> Hello,
> 
> We see the error when this procedure is executed :
> 
> BEGIN
>   delete FROM sip_trace where time_stamp < now() - INTERVAL 2 MONTH;
>   OPTIMIZE TABLE sip_trace;
> END $$
> 
> De : Daniel-Constantin Mierla 
> Envoyé : lundi 5 novembre 2018 09:45
> À : Nicolas Breuer
> ;
> Kamailio (SER) - Users Mailing List
>  Objet :
> Re: [SR-Users] Mysql
> 
> 
> There is no column "Msg_text" there, are you sure it is about this table?
> 
> Cheers,
> Daniel
> 
> On 05.11.18 09:37, Nicolas Breuer wrote:
> 
> 
> 
> 
> +
> | sip_trace | CREATE TABLE `sip_trace` (
> 
>   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
>   `time_stamp` datetime NOT NULL DEFAULT '1900-01-01 00:00:01',
>   `time_us` int(10) unsigned NOT NULL DEFAULT '0',
>   `callid` varchar(255) NOT NULL DEFAULT '',
>   `traced_user` varchar(128) NOT NULL DEFAULT '',
>   `msg` mediumtext NOT NULL,
>   `method` varchar(50) NOT NULL DEFAULT '',
>   `status` varchar(128) NOT NULL DEFAULT '',
>   `fromip` varchar(50) NOT NULL DEFAULT '',
>   `toip` varchar(50) NOT NULL DEFAULT '',
>   `fromtag` varchar(64) NOT NULL DEFAULT '',
>   `totag` varchar(64) NOT NULL DEFAULT '',
>   `direction` varchar(4) NOT NULL DEFAULT '',
>   PRIMARY KEY (`id`),
>   KEY `traced_user_idx` (`traced_user`),
>   KEY `d

Re: [SR-Users] Dynamic UAC Registration

2019-01-20 Thread Daniel-Constantin Mierla
Hello,

iirc, the auth header related variables (like $ar) are set when some
authentication functions are used, but that is for requests. For
replies, I am not sure if it is done at all, being also a different
header name.

Unless you want to dig a bit in the code and see what happens there, for
now a solution here would be using transformations to extract fields
from the header Proxy-Authenticate or WWW-Authenticate.

If you want to have these variables set in other cases than it is now,
you can open a new feature request on github issue tracker.

Cheers,
Daniel

On 20.01.19 12:58, Mack Hendricks wrote:
> Hey All,
>
> So, I want to use the UAC module to handle Digest Auth to upstream
> carriers.  But, I don’t know which carrier will be selected until
> another module (dRouting in this case) tells the logic which carrier
> to use.
>
> I can see in the logs that the uac_auth function can capture the Auth
> Realm.  But, I need to access it from the Kamailio script so that I
> can lookup the credentials for that realm and then call uac_auth.
>  I’ve tried getting the info from $ar, but that gives me the realm of
> the inbound request versus the realm of the upstream carrier.  Also,
> I’ve tried using $T_rpl($ar), but that returns 0.  Here’s my logic
> from the Kamailio file:
>
>
>         if(t_check_status("401|407")) {
>                 $var(reply_realm) = $T_rpl($ar);
>                 $var(query)="select auth_username,auth_password from
> uacreg where realm='" + $var(reply_realm) + "'";
>                 sql_xquery("cb","$var(query)","rb");
>                 xlog("L_DEBUG","[MANAGE_FAILURE: Proxy Auth]: The
> query is $var(query) auth realm is $var(reply_realm) and the user name
> is $xavp(rb=>auth_username)");
>                 $avp(auser) = $xavp(rb=>auth_username);
>                 $avp(apass) = $xavp(rb=>auth_password);
>                 uac_auth();
>                 t_relay();
>                 exit;`
>         }
>
>
> A snippet of the log file is below:
>
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1616 a=63 n=assign
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1617 a=63 n=assign
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1618 a=24 n=uac_auth
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:409]: uac_auth(): picked reply is 0x7f900cb7eaf0, code 407
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:225]: get_autenticate_hdr(): looking for header
> "Proxy-Authenticate"
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:429]: uac_auth(): header found; body= realm="sip.flowroute.com ",
> nonce="XERJMlxESAbDNCK3INmBfoET1GGxpcyr", qop="auth">
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body():
> ="sip.flowroute.com " state=2
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body():
> ="XERJMlxESAbDNCK3INmBfoET1GGxpcyr" state=3
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth_hdr.c:209]: parse_authenticate_body(): ="auth" state=1
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac
> [auth.c:449]: uac_auth(): no credential for realm "sip.flowroute.com
> "
> Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: ***
> cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg]
> l=1619 a=24 n=t_relay
>
>
> Thanks in advance for any help
>
> Mack Hendricks
> dSIPRouter
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 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 World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segfault error - process stopped

2019-01-20 Thread Daniel-Constantin Mierla
Hello,

On 20.01.19 17:07, Henning Westerholt wrote:
> Am Montag, 14. Januar 2019, 18:58:34 CET schrieb AL RSM:
>> We are running Kamailio 3.7 on our production servers. The Kamailio process
>> stopped running on one of the 4 servers. Log shows "segfault error".
>>
>> No core file generated. Any suggestion on how to verify the issue would be
>> appreciated.
>>
>> kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip 0055933a
>> sp 7fffd4ca6700 error 4 in kamailio[40+211000]
>>
>> /usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process 1558
>> exited by a signal 11
>>
>> /usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not generated
>>
>> CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1
>> 1)
> Hi AL,
>
> the 3.7.x version you use 


I think it is important not to misled other people, even when one made a
typo specifying the version, continuing to refer to it can create confusion.

There was no 3.7.x release series, see all releases at:

   - https://www.kamailio.org/pub/kamailio/

Likely the original author wanted to say 3.3.7.

Cheers,
Daniel


> is really old and is not supported anymore. Please 
> update to a supported version of Kamailio (e.g. 5.2.1 or 5.1.6. 
>
> If you don't want to update the server, you need to investigate the error by 
> yourself. You will find some documentation about to enable the core dump 
> functionality in our wiki: 
>
> https://kamailio.org/wiki/tutorials/troubleshooting/coredumpfile
>
> Best regards,
>
> Henning
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
Washington, DC, USA -- www.asipto.com


___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] segfault error - process stopped

2019-01-20 Thread Henning Westerholt
Am Montag, 14. Januar 2019, 18:58:34 CET schrieb AL RSM:
> We are running Kamailio 3.7 on our production servers. The Kamailio process
> stopped running on one of the 4 servers. Log shows "segfault error".
> 
> No core file generated. Any suggestion on how to verify the issue would be
> appreciated.
> 
> kernel: [63574875.776269] kamailio[1558]: segfault at 0 ip 0055933a
> sp 7fffd4ca6700 error 4 in kamailio[40+211000]
> 
> /usr/sbin/kamailio[1545]: ALERT:  [main.c:785]: child process 1558
> exited by a signal 11
> 
> /usr/sbin/kamailio[1545]: ALERT:  [main.c:788]: core was not generated
> 
> CRON[21436]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1
> 1)

Hi AL,

the 3.7.x version you use is really old and is not supported anymore. Please 
update to a supported version of Kamailio (e.g. 5.2.1 or 5.1.6. 

If you don't want to update the server, you need to investigate the error by 
yourself. You will find some documentation about to enable the core dump 
functionality in our wiki: 

https://kamailio.org/wiki/tutorials/troubleshooting/coredumpfile

Best regards,

Henning

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio Docker 5.2.1

2019-01-20 Thread Henning Westerholt
Am Freitag, 18. Januar 2019, 12:08:11 CET schrieb Sergey Safarov:
> kamailio is debian based. If you know debian then for you may be more easy
> extend this image.
> This primary dist that is supported by kamailio team.
> 
> kamailio-ci is Alpine dist based. Alpine dist allow create more thin and
> secure docker images.
> Please check kamailio images sizes
> 1)
> https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio/tags
> 2)
> https://cloud.docker.com/u/kamailio/repository/docker/kamailio/kamailio-ci/t
> ags
> 
> and vulnerabilities
> 1) https://hub.docker.com/_/debian/scans/library/debian/9.6
> 2) https://hub.docker.com/_/alpine/scans/library/alpine/3.8

Hi Sergey,

thank you for the info. Would it make sense to add it to the docker info page, 
or if this is not possible, somewhere in the kamailio wiki?

Best regards,

Henning

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] database reconnection db_unixodbc

2019-01-20 Thread Henning Westerholt
Am Freitag, 18. Januar 2019, 18:28:09 CET schrieb Karthik Srinivasan:
> I am testing how kamailio reacts to various database conditions.   One such
> condition is if the database engine is simply shut down (that is, database
> server process no longer running, tcp listening socket closed, etc...)
> 
> I am utilizing the db_unixodbc module to connect to an Informix database
> engine.
> 
> I am currently running on Kamailio version 5.0.
> 
> I have a test query that executes against the database engine every 10
> seconds.
> 
> Here is what i have noticed if i shut down the database engine at some
> point after i run Kamailio.
> 
> the first test query that attempts to run against the db engine fails;  it
> tries to reconnect and fails.
> 
> The second test query (10 seconds after the 1st) results in a SIG_CHILD and
> shuts down the entire Kamailio process.
> 
> Has anyone experienced this?  Is there a solution to this?   Ideally the
> second query should also fail and return gracefully; and ideally queries
> continue to fail until the database engine is back up.

Hello Karthik,

Kamailio should not crash because of this error. The db_unixodbc module is not 
that widely used (compared to db_mysql), but nevertheless it shouldn't crash.

Can you create an issue in our tracker on github for this:
https://github.com/kamailio/kamailio/issues

It would be great if you can also try with the latest stable version of 5.1.x 
or 5.2.x, there have been some changes in the db_unixodbc module since the 
release of 5.0.

Best regards,

Henning
 
> See logs below:
> 
> Jan 17 20:07:25 [29297]: INFO: (s)  SQL query: FIRST TEST QUERY
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:135]:
> db_unixodbc_submit_query(): rv=-1. Query= FIRST TEST QUERY
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
> db_unixodbc_extract_error():
> unixodbc:SQLExecDirect=08S01:1:-11020:[Informix][Informix ODBC
> Driver]Communication link failure.
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:59]: reconnect():
> Attempting DB reconnect
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [dbase.c:74]: reconnect():
> failed to connect
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
> db_unixodbc_extract_error():
> unixodbc:SQLDriverConnect=08002:1:0:[unixODBC][Driver Manager]Connection
> name in use
> Jan 17 20:07:25 [29297]: ERROR: db_unixodbc [connection.c:220]:
> db_unixodbc_extract_error():
> unixodbc:SQLDriverConnect=HY010:2:-11067:[Informix][Informix ODBC
> Driver]Function sequence error.
> Jan 17 20:07:25 [29297]: ERROR:  [db_query.c:181]: db_do_raw_query():
> error while submitting query
> Jan 17 20:07:25 [29297]: ERROR: sqlops [sql_api.c:265]: sql_do_query():
> cannot do the query FIRST TEST QUERY
> Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL ret: fail (-1)
> Jan 17 20:07:25 [29297]: INFO: (s) [123] SQL res: no rows
> Jan 17 20:07:35 [29297]: INFO: (s) [123] SQL query: 10 seconds later the
> SECOND TEST QUERY (it's the same query as the first one)
> Jan 17 20:07:35 [29301]: CRITICAL:  [core/pass_fd.c:277]:
> receive_fd(): EOF on 28
> Jan 17 20:07:35 [29283]: ALERT:  [main.c:744]: handle_sigs(): child
> process 29297 exited by a signal 11
> Jan 17 20:07:35 [29283]: ALERT:  [main.c:747]: handle_sigs(): core
> was not generated
> Jan 17 20:07:35 [29283]: INFO:  [main.c:759]: handle_sigs():
> terminating due to SIGCHLD
> Jan 17 20:07:35 [29301]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29295]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29291]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29288]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29300]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29284]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29286]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29293]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29289]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29287]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29292]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29296]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29298]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29299]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29285]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29294]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29290]: INFO:  [main.c:814]: sig_usr(): signal 15
> received
> Jan 17 20:07:35 [29283]: INFO:  [core/sctp_core.c:53]:
> sctp_core_destroy(): SCTP API not initialized


-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalata

Re: [SR-Users] Mid-Registrar

2019-01-20 Thread Henning Westerholt
Am Freitag, 18. Januar 2019, 22:37:05 CET schrieb Mark Thomas:
> I’m currently and OpenSIPS user and I really want to be able to use their
> software on OpenWRT, but I have found it really hard to cross-compile. Is
> there a possibility to run Kamailio as a mid-registrar? For my application
> this is required, and I haven’t been able to find any information on this.

Hi Mark,

as Alex mentioned, you can implement this functionality in Kamailio as well. 
If you need more hints, just ask on sr-users with some more details.

Another option would be of course to port this module to Kamailio. There would 
be some changes necessary due to different module interfaces, but it shouldn't 
be that difficult for a developer. For development questions contact the sr-
dev list.

The module could be even included in the Kamailio repository, if there is 
somebody that is willing to maintain it.

Best regards,

Henning

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment

___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Dynamic UAC Registration

2019-01-20 Thread Mack Hendricks
Hey All,

So, I want to use the UAC module to handle Digest Auth to upstream carriers.  
But, I don’t know which carrier will be selected until another module (dRouting 
in this case) tells the logic which carrier to use.

I can see in the logs that the uac_auth function can capture the Auth Realm.  
But, I need to access it from the Kamailio script so that I can lookup the 
credentials for that realm and then call uac_auth.  I’ve tried getting the info 
from $ar, but that gives me the realm of the inbound request versus the realm 
of the upstream carrier.  Also, I’ve tried using $T_rpl($ar), but that returns 
0.  Here’s my logic from the Kamailio file:


if(t_check_status("401|407")) {
$var(reply_realm) = $T_rpl($ar);
$var(query)="select auth_username,auth_password from uacreg 
where realm='" + $var(reply_realm) + "'";
sql_xquery("cb","$var(query)","rb");
xlog("L_DEBUG","[MANAGE_FAILURE: Proxy Auth]: The query is 
$var(query) auth realm is $var(reply_realm) and the user name is 
$xavp(rb=>auth_username)");
$avp(auser) = $xavp(rb=>auth_username);
$avp(apass) = $xavp(rb=>auth_password);
uac_auth();
t_relay();
exit;`
}


A snippet of the log file is below:

Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1616 
a=63 n=assign
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1617 
a=63 n=assign
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1618 
a=24 n=uac_auth
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac [auth.c:409]: 
uac_auth(): picked reply is 0x7f900cb7eaf0, code 407
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac [auth.c:225]: 
get_autenticate_hdr(): looking for header "Proxy-Authenticate"
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac [auth.c:429]: 
uac_auth(): header found; body=
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
[auth_hdr.c:209]: parse_authenticate_body(): ="sip.flowroute.com" state=2
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
[auth_hdr.c:209]: parse_authenticate_body(): 
="XERJMlxESAbDNCK3INmBfoET1GGxpcyr" state=3
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac 
[auth_hdr.c:209]: parse_authenticate_body(): ="auth" state=1
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: DEBUG: uac [auth.c:449]: 
uac_auth(): no credential for realm "sip.flowroute.com"
Jan 20 10:05:58 dsiprouter /usr/sbin/kamailio[2871]: exec: *** 
cfgtrace:failure_route=[DEFAULT_ROUTE] c=[/etc/kamailio/kamailio.cfg] l=1619 
a=24 n=t_relay


Thanks in advance for any help

Mack Hendricks
dSIPRouter___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users