[SR-Users] How to print out all variables in case we reach this line?
If i call a mobil number: t: . i get 404, but would expect rewrite to carrier route: sip:+4917625251...@sip.nexxtmobile.de Is there a way to print out all variables at this moment? ### if ( is_method("ACK") ) { if ( t_check_trans() ) { # no loose-route, but stateful ACK; # must be an ACK after a 487 # or e.g. 404 from upstream server route(RELAY); exit; } else { # ACK without matching transaction ... ignore and discard exit; } } sl_send_reply("404", "Not here"); #How to print out all variables in case we reach this line??? exit; ### ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] How to print out all variables in case we reach this line?
If i call a mobil number: t: . i get 404, but would expect rewrite to carrier route: sip:+4917625251...@sip.nexxtmobile.de Is there a way to print out all variables at this moment? ### if ( is_method("ACK") ) { if ( t_check_trans() ) { # no loose-route, but stateful ACK; # must be an ACK after a 487 # or e.g. 404 from upstream server route(RELAY); exit; } else { # ACK without matching transaction ... ignore and discard exit; } } sl_send_reply("404", "Not here"); #How to print out all variables in case we reach this line??? exit; ### ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] xlog does not work as expected
Hi all, if i use xlog (Version 5.0.1) to print out some variables: xlog("L_NOTICE", "$fU time [$Tf] method ($rm) r-uri ($ru) 2nd via ($hdr(via[1]))\n"); I get: Apr 16 10:22:51 sip kamailio: DEBUG: [core/route_struct.c:524]: print_action(): , "L_NOTICE" Is that the expected result? Best regards Georg ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] xlog does not work as expected
Hi Alex, thanks but with debug=2 xlog() does not print anything. It seems in /usr/src/kamailio-5.0.1/src/core/route_struct.c case ACTIONS_ST work not as expected: ### switch(t->val[2].type){ case NOSUBTYPE: break; case STRING_ST: DBG(", \"%s\"", ZSW(t->val[2].u.string)); break; case NUMBER_ST: DBG(", %lu",t->val[2].u.number); break; case EXPR_ST: print_expr((struct expr*)t->val[2].u.data); break; case ACTIONS_ST: print_actions((struct action*)t->val[2].u.data); break; case SOCKID_ST: ### On 16.04.2017 12:42, Alex Balashov wrote: This sounds like you have debug=3 or higher, and so are seeing debug statements related to the internals of logging itself, in addition to the log entry. I suggest you set debug=2 and try again. On Sun, Apr 16, 2017 at 12:34:53PM +0200, gh wrote: Hi all, if i use xlog (Version 5.0.1) to print out some variables: xlog("L_NOTICE", "$fU time [$Tf] method ($rm) r-uri ($ru) 2nd via ($hdr(via[1]))\n"); I get: Apr 16 10:22:51 sip kamailio: DEBUG: [core/route_struct.c:524]: print_action(): , "L_NOTICE" Is that the expected result? Best regards Georg ___ 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
[SR-Users] Kamailio 5.0.0 KEMI Lua event routes
Hi Daniel, can you give me an example how to use the xlog() function/in an embedded interpreter via KEMI/ (lua) then i will try to convert my native route script. b.t.w Thanks for KEMI, may be it will make life easier! ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk
Hi Marko, i work on the same scenario. It should work with: if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } But in my case xlog() currently does not print out the variables, so i am not able to debug:-( Can you try this code and tell me if xlog() works for you? Best regards Georg ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk
Hi Marko, does xlog work on your side? Do you get the expected values for each variable? uac_reg_request_to can be used to send an authenticated request to a remote user in the uac registrations table. It sets the request-uri, dst-uri and auth_*_avp pv's to the values that correspond to the supplied user. The mode indicates whether the user should match the local uuid (mode=0), or the username (mode=1). The auth_*_avp module parameters must be set to valid pv's. This function can be used only from REQUEST_ROUTE, FAILURE_ROUTE, and BRANCH_ROUTE. modparam("uac","auth_username_avp","$avp(yourastuser)") modparam("uac","auth_password_avp","$avp(yourastpass)") modparam("uac","auth_realm_avp","$avp(yourastrealm)") # Forward REGISTER to Asterisk route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); #$uac_req(furi)="sip:" + $au + "@" + $var(rip); #$uac_req(turi)="sip:" + $au + "@" + $var(rip); if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Fixme [$fU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } $uac_req(hdrs)="Contact: \r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif On 16.04.2017 22:29, Marko Tirs wrote: Hi Georg, I believe my issue relates to this function: # Forward REGISTER to Asterisk route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: \r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif Where should I put your code to test it? Regards Marko - Forwarded Message - *From:* gh *To:* Kamailio (SER) - Users Mailing List *Sent:* Sunday, April 16, 2017 6:47 PM *Subject:* [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk Hi Marko, i work on the same scenario. It should work with: if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } But in my case xlog() currently does not print out the variables, so i am not able to debug:-( Can you try this code and tell me if xlog() works for you? Best regards Georg MY ISSUE: -- Hi Daniel, yes I want to register my SIP clients twice to have full media path through Asterisk. Now I register eg. clients 31 & 32 on Kamailio and when I try to call 31->32 then my call reaches Asterisk but it doesn't find the callee because it isn't registered in Asterisk. Am I right that Kamailio cuts a part of register message header (Authorisation - Digest name) which it receives from SIP-client and forward just such shortened message to Asterisk or there is an other problem? Is there any better approach for above requirement (full media path through Asterisk for all calls and for all users registered by Kamailio)? Thank you Regards Marko ___ 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] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk
I just see there is also a good hint from Alex: https://lists.kamailio.org//pipermail/sr-users/2016-January/091395.html On 16.04.2017 22:29, Marko Tirs wrote: Hi Georg, I believe my issue relates to this function: # Forward REGISTER to Asterisk route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: \r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif Where should I put your code to test it? Regards Marko - Forwarded Message - *From:* gh *To:* Kamailio (SER) - Users Mailing List *Sent:* Sunday, April 16, 2017 6:47 PM *Subject:* [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk Hi Marko, i work on the same scenario. It should work with: if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } But in my case xlog() currently does not print out the variables, so i am not able to debug:-( Can you try this code and tell me if xlog() works for you? Best regards Georg MY ISSUE: -- Hi Daniel, yes I want to register my SIP clients twice to have full media path through Asterisk. Now I register eg. clients 31 & 32 on Kamailio and when I try to call 31->32 then my call reaches Asterisk but it doesn't find the callee because it isn't registered in Asterisk. Am I right that Kamailio cuts a part of register message header (Authorisation - Digest name) which it receives from SIP-client and forward just such shortened message to Asterisk or there is an other problem? Is there any better approach for above requirement (full media path through Asterisk for all calls and for all users registered by Kamailio)? Thank you Regards Marko ___ 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
[SR-Users] kamcmd uac.reg_info
Hi all, i am not able to execute kamcmd uac.reg_info and kamcmd uac.reg_enable. http://kamailio.org/docs/modules/5.1.x/modules/uac.html#uac.r.uac.reg_info kamcmd version kamailio 5.0.1 (x86_64/linux) Only the following uac related commands are available on my kamailio 5.0.1 (x86_64/linux) box: kamcmd ? |grep uac tm.t_uac_start tm.t_uac_wait What's my mistake? Best regards, Georg ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
[SR-Users] xlog does not work as expected
Solved! Thanks a lot Daniel, you are right i've placed the xlog at the wrong line in kamailio.cfg. Cheers, Georg > Hello, > > again, as written in the previous email, you are looking at the wrong > step, which is happening in the kamailio startup process, as opposite to > runtime processing. > > I could bet a lot of money that when xlog() is broken, there will be a > lot of reports from many people. > > Have you received sip traffic in kamailio and the xlog was not printing > anything? Just add an xlog() as first line inside 'request_route { ... > }' and you should see it for each request received by kamailio. If not, > be sure you don't have a firewall blocking sip traffic. > > Cheers, > Daniel > > > On 16.04.17 14:01, gh wrote: >> Hi Alex, >> >> thanks but with debug=2 xlog() does not print anything. >> >> It seems in /usr/src/kamailio-5.0.1/src/core/route_struct.c >> >> case ACTIONS_ST work not as expected: >> >> ### >> >> switch(t->val[2].type){ >> case NOSUBTYPE: >> break; >> case STRING_ST: >> DBG(", \"%s\"", ZSW(t->val[2].u.string)); >> break; >> case NUMBER_ST: >> DBG(", %lu",t->val[2].u.number); >> break; >> case EXPR_ST: >> print_expr((struct expr*)t->val[2].u.data); >> break; >> case ACTIONS_ST: >> print_actions((struct action*)t->val[2].u.data); >> break; >> case SOCKID_ST: >> ### >> >> >> >> On 16.04.2017 12:42, Alex Balashov wrote: >>> This sounds like you have debug=3 or higher, and so are seeing debug >>> statements related to the internals of logging itself, in addition to >>> the log entry. >>> >>> I suggest you set debug=2 and try again. >>> >>> On Sun, Apr 16, 2017 at 12:34:53PM +0200, gh wrote: >>> >>>> Hi all, >>>> if i use xlog (Version 5.0.1) to print out some variables: >>>> xlog("L_NOTICE", "$fU time [$Tf] method ($rm) r-uri ($ru) 2nd via >>>> ($hdr(via[1]))\n"); >>>> >>>> I get: >>>> Apr 16 10:22:51 sip kamailio: DEBUG: [core/route_struct.c:524]: >>>> print_action(): , "L_NOTICE" >>>> >>>> Is that the expected result? >>>> >>>> Best regards >>>> Georg >>>> >>>> >>>> ___ >>>> 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 > > -- > Daniel-Constantin Mierla > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com > > > ___ > 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] Kamailio 5.0.0 KEMI Lua event routes
OK, i see you are using KSR.dbg() instead of xlog. I will try that. Cheers, Georg > Hello, > > see next link for a large Lua script for use with Kamailio via kemi: > > - > https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi-lua.lua > > Cheers, > Daniel > > > On 16.04.17 15:37, gh wrote: >> Hi Daniel, >> can you give me an example how to use the xlog() function/in an >> embedded interpreter via KEMI/ (lua) then i will try to convert my >> native route script. >> >> b.t.w >> Thanks for KEMI, may be it will make life easier! >> >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com > > ___ > 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
[SR-Users] Kamailio 5.0.0 KEMI Lua and Python
By the way, in 2012 p2pnext Project was able to earn 19.500.000 Euro, see: http://cordis.europa.eu/docs/projects/cnect/7/216217/080/deliverables/001-p2pnextwp4D406revised.pdf http://cordis.europa.eu/project/rcn/85326_en.html one small part of p2pnext was the development of SIP SIMPLE Client SDK. I think Kamailio should also ask for EU budget because until now it's a success story :-) > Hello, > > see next link for a large Lua script for use with Kamailio via kemi: > > - > https://github.com/kamailio/kamailio/blob/master/misc/examples/kemi/kamailio-basic-kemi-lua.lua > > Cheers, > Daniel > > > On 16.04.17 15:37, gh wrote: >> Hi Daniel, >> can you give me an example how to use the xlog() function/in an >> embedded interpreter via KEMI/ (lua) then i will try to convert my >> native route script. >> >> b.t.w >> Thanks for KEMI, may be it will make life easier! >> >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Daniel-Constantin Mierla > www.twitter.com/miconda -- www.linkedin.com/in/miconda > Kamailio Advanced Training - May 22-24 (USA) - www.asipto.com > Kamailio World Conference - May 8-10, 2017 - www.kamailioworld.com > > ___ > 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] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk
as Alex wrote in his hint, it's better to use table uacreg instead: select * from uacreg; Am 20.04.2017 um 21:48 schrieb Marko Tirs: Hi Georg, now I tested you function route[REGFWD] with following modparams modparam("uac","auth_realm_avp","$avp(i:10)") modparam("uac","auth_username_avp","$avp(i:11)") modparam("uac","auth_password_avp","$avp(i:12)") and I didn't get any xlog output on your place. Instead of it I got 14(2444) ERROR: uac [uac_reg.c:651]: reg_ht_get_byuuid(): reg hash table not initialized. Probably my modparam wasn't good. What should I put there for yourastuser, yourastpass and yourastrealm? I took my values for them ((i:10, i:11, i:12) from an example, but I don't know what it does mean. Regards Marko - Forwarded Message - *From:* gh *To:* Marko Tirs ; Kamailio (SER) - Users Mailing List *Sent:* Sunday, April 16, 2017 11:22 PM *Subject:* Re: [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk Hi Marko, does xlog work on your side? Do you get the expected values for each variable? uac_reg_request_to can be used to send an authenticated request to a remote user in the uac registrations table. It sets the request-uri, dst-uri and auth_*_avp pv's to the values that correspond to the supplied user. The mode indicates whether the user should match the local uuid (mode=0), or the username (mode=1). The auth_*_avp module parameters must be set to valid pv's. This function can be used only from REQUEST_ROUTE, FAILURE_ROUTE, and BRANCH_ROUTE. modparam("uac","auth_username_avp","$avp(yourastuser)") modparam("uac","auth_password_avp","$avp(yourastpass)") modparam("uac","auth_realm_avp","$avp(yourastrealm)") # Forward REGISTER to Asterisk route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); #$uac_req(furi)="sip:" + $au + "@" + $var(rip); #$uac_req(turi)="sip:" + $au + "@" + $var(rip); if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Fixme [$fU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } $uac_req(hdrs)="Contact: \r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif On 16.04.2017 22:29, Marko Tirs wrote: Hi Georg, I believe my issue relates to this function: # Forward REGISTER to Asterisk route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: \r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif Where should I put your code to test it? Regards Marko - Forwarded Message - *From:* gh *To:* Kamailio (SER) - Users Mailing List *Sent:* Sunday, April 16, 2017 6:47 PM *Subject:* [SR-Users] Kamailio 5.0 doesn't forward Authorization (Digest username) to Asterisk Hi Marko, i work on the same scenario. It should work with: if(uac_reg_request_to("$fU", 0)) { xlog("L_NOTICE", "Found remote user [$rU] on [$rd] via [$du]"); t_on_failure("REMOTE_AUTH"); t_relay(); } But in my case xlog() currently does not print out the variables, so i am not able to debug:-( Can you try this code and tell me if xlog() works for you? Best regards Georg MY ISSUE: -- Hi Daniel, yes I want to register my SIP clients twice to have full media path through Asterisk. Now I register eg. clients 31 & 32 on Kamailio and when I try to call 31->32 then my call reaches Asterisk but it doesn't find the callee because it isn't registered in Asterisk. Am I right that Kamailio cuts a part of register message header (Authorisation - Digest name) which it receives from SIP-client an
[SR-Users] Dispatcher Module ds_select_domain("2", "4")
Hi, after Kamailio did a correct (INVITE sip:089321608@5.9.87.18 SIP/2.0 looks good to me), to our Sip-Provider we get: "SIP/2.0 407 Proxy Authentication Required." Could it be that i have to rewrite also the following line: To: . To: . and how can i do that? Until now i use just ds_select_domain("2", "4") Thanks, Georg U 130.255.76.95:5060 -> 5.9.87.18:5060 INVITE sip:089321608@5.9.87.18 SIP/2.0. Record-Route: . Via: SIP/2.0/UDP 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. Via: SIP/2.0/UDP 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. Max-Forwards: 69. From: "4321" ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. To: . Contact: . Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. CSeq: 5545 INVITE. Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS. Supported: replaces, 100rel, timer, norefersub. Session-Expires: 1800. Min-SE: 90. User-Agent: CSipSimple_acer_z520-19/r2457. Content-Type: application/sdp. Content-Length: 366. U 5.9.87.18:5060 -> 130.255.76.95:5060 SIP/2.0 100 Trying. Via: SIP/2.0/UDP 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. Via: SIP/2.0/UDP 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. Record-Route: . From: "4321" ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. To: . Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. CSeq: 5545 INVITE. User-Agent: einfachVoIP.de. Content-Length: 0. U 5.9.87.18:5060 -> 130.255.76.95:5060 SIP/2.0 407 Proxy Authentication Required. Via: SIP/2.0/UDP 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Re: [SR-Users] Dispatcher Module ds_select_domain("2", "4")
Hi Alex, it's because i can see that kamailio (5.0.1 (x86_64/linux)) is already successful connected to our Provider via kamailio uac module. I can also see that kamailio send a refresh auth to 5.9.87.18 from time to time. Would the Provider answer with: U 5.9.87.18:5060 -> 130.255.76.95:5060 SIP/2.0 100 Trying. in any case if the auth was not successful before? Cheers, Georg > I'm not sure why you would immediately jump to the conclusion that you > need to rewrite the To header. > > This is just a normal 407 challenge. The first and most straightforward > interpretation is that the provider expects you to provide digest > authentication credentials, or that they don't have your IP in their ACL > and are falling back to a digest challenge as a default behaviour for > that reason. > > On Tue, Apr 25, 2017 at 08:29:47AM +0200, g...@heissa.de wrote: > >> Hi, >> after Kamailio did a correct (INVITE sip:089321608@5.9.87.18 SIP/2.0 >> looks >> good to me), to our Sip-Provider we get: >> "SIP/2.0 407 Proxy Authentication Required." >> >> Could it be that i have to rewrite also the following line: >> To: . >> >> To: . >> >> and how can i do that? >> >> Until now i use just ds_select_domain("2", "4") >> >> Thanks, >> Georg >> >> >> >> U 130.255.76.95:5060 -> 5.9.87.18:5060 >> INVITE sip:089321608@5.9.87.18 SIP/2.0. >> Record-Route: >> . >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> Via: SIP/2.0/UDP >> 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. >> Max-Forwards: 69. >> From: "4321" >> ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. >> To: . >> Contact: . >> Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. >> CSeq: 5545 INVITE. >> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, >> REFER, MESSAGE, OPTIONS. >> Supported: replaces, 100rel, timer, norefersub. >> Session-Expires: 1800. >> Min-SE: 90. >> User-Agent: CSipSimple_acer_z520-19/r2457. >> Content-Type: application/sdp. >> Content-Length: 366. >> >> U 5.9.87.18:5060 -> 130.255.76.95:5060 >> SIP/2.0 100 Trying. >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> Via: SIP/2.0/UDP >> 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. >> Record-Route: >> . >> From: "4321" >> ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. >> To: . >> Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. >> CSeq: 5545 INVITE. >> User-Agent: einfachVoIP.de. >> Content-Length: 0. >> >> U 5.9.87.18:5060 -> 130.255.76.95:5060 >> SIP/2.0 407 Proxy Authentication Required. >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> >> >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > ___ > 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] Dispatcher Module ds_select_domain("2", "4")
Hi all, Solved! If i create an identical user/password in kamailio which i get from command kamcmd uac.reg_dump { l_uuid: 2 l_username: xyz } then it works. Else result from Provider would be: SIP/2.0 403 Check SIP ID or username. Is there any way to use avoid a refresh of providing digest authentication credentials from INVITE? The first auth from uac module should be enough! > I'm not sure why you would immediately jump to the conclusion that you > need to rewrite the To header. > > This is just a normal 407 challenge. The first and most straightforward > interpretation is that the provider expects you to provide digest > authentication credentials, or that they don't have your IP in their ACL > and are falling back to a digest challenge as a default behaviour for > that reason. > > On Tue, Apr 25, 2017 at 08:29:47AM +0200, g...@heissa.de wrote: > >> Hi, >> after Kamailio did a correct (INVITE sip:089321608@5.9.87.18 SIP/2.0 >> looks >> good to me), to our Sip-Provider we get: >> "SIP/2.0 407 Proxy Authentication Required." >> >> Could it be that i have to rewrite also the following line: >> To: . >> >> To: . >> >> and how can i do that? >> >> Until now i use just ds_select_domain("2", "4") >> >> Thanks, >> Georg >> >> >> >> U 130.255.76.95:5060 -> 5.9.87.18:5060 >> INVITE sip:089321608@5.9.87.18 SIP/2.0. >> Record-Route: >> . >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> Via: SIP/2.0/UDP >> 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. >> Max-Forwards: 69. >> From: "4321" >> ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. >> To: . >> Contact: . >> Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. >> CSeq: 5545 INVITE. >> Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, >> REFER, MESSAGE, OPTIONS. >> Supported: replaces, 100rel, timer, norefersub. >> Session-Expires: 1800. >> Min-SE: 90. >> User-Agent: CSipSimple_acer_z520-19/r2457. >> Content-Type: application/sdp. >> Content-Length: 366. >> >> U 5.9.87.18:5060 -> 130.255.76.95:5060 >> SIP/2.0 100 Trying. >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> Via: SIP/2.0/UDP >> 100.99.24.192:53230;received=91.186.0.208;rport=39126;branch=z9hG4bKPjnlNeJmB2Id2F2Tmypfaf5sdh47ir3wg8. >> Record-Route: >> . >> From: "4321" >> ;tag=Wl3D6P2TkS5KuAGzo-9Z1Ezqy7NMRvco. >> To: . >> Call-ID: -rgvfObl0VN39nEiZTf55yxxn8FemD52. >> CSeq: 5545 INVITE. >> User-Agent: einfachVoIP.de. >> Content-Length: 0. >> >> U 5.9.87.18:5060 -> 130.255.76.95:5060 >> SIP/2.0 407 Proxy Authentication Required. >> Via: SIP/2.0/UDP >> 130.255.76.95;branch=z9hG4bK7828.51fb03ff0ac02b01b2ba2bb73c1de051.0. >> >> >> >> ___ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > > -- > Alex Balashov | Principal | Evariste Systems LLC > > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/ > > ___ > 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