Hello Everyone, User location lookup looks like can't handle long $rU like 10102-ce72256df4945bc472ed9c27a1037f46. It always return -3 404 not found.
here relevant log
Sep 19 23:37:26 canlvprx01 /usr/sbin/kamailio[29217]: INFO: <script>: [INVITE] Call going from LAN SourceIP <10.18.130.50> to WAN. Sep 19 23:37:26 canlvprx01 /usr/sbin/kamailio[29217]: INFO: <script>: Looking user --> 10102-ce72256df4945bc472ed9c27a1037f46 in db Sep 19 23:37:26 canlvprx01 /usr/sbin/kamailio[29217]: INFO: <script>: Got [INVITE] and status <null>
route[LOCATION] { $avp(oexten) = $rU; xlog("L_INFO", "Looking user --> $rU in db\n"); if (!lookup("location")) { $var(rc) = $rc; t_newtran(); switch ($var(rc)) { case -1: case -3: route(MSG_STORE); # Meaning SMS has being stored for offline delivery if(!t_check_status("202")) { xlog("L_INFO", "Got [$rm] and status [$rs]\n"); # For rest traffic proceed as normal send_reply("404", "Not Found"); } exit; case -2: send_reply("405", "Method Not Allowed"); exit; } } }
kamailio-5.1.3-1.gitf0dce0c99.fc27.x86_64
volga629
On Thu, Sep 20, 2018 at 12:54:30AM -0300, volga629@networklab.ca wrote:
User location lookup looks like can't handle long $rU like 10102-ce72256df4945bc472ed9c27a1037f46. It always return -3 404 not found.
This username is only 38 chars long, I have a username in a 5.1.4 environment with 39 chars that works just fine.
What backend for storage of location are you using? If it is a sql backend, what length is the username in the location table?
On 20.09.18 09:59, Daniel Tryba wrote:
On Thu, Sep 20, 2018 at 12:54:30AM -0300, volga629@networklab.ca wrote:
User location lookup looks like can't handle long $rU like 10102-ce72256df4945bc472ed9c27a1037f46. It always return -3 404 not found.
This username is only 38 chars long, I have a username in a 5.1.4 environment with 39 chars that works just fine.
What backend for storage of location are you using? If it is a sql backend, what length is the username in the location table?
Just an extra hint -- do 'kamctl ul show' and see what is displayed for the respective user. Is there a record for it? What is the state?
Cheers, Daniel
Hello Everyone, I found the issue where $rU was miss matching AOR. AOR is 10101 and $rU is 10101-f9d8885664888255ec76762bfcfbd09c. The hash is added by bria push server.
So I solved the issue by correcting a little the lookup function. if($hdr(User-Agent)=~"PBX") { $avp(oexten) = $(rU{s.select,0,-}); $var(lookup) = "sip:" + $avp(oexten) + "@" + $rd; xlog("L_INFO", "Match User-Agent, looking user --> $avp(oexten) and R-URI [$ru] in db\n"); } else { $var(lookup) = $ru; xlog("L_INFO", "Looking user --> $var(lookup) in db\n"); } if(!lookup("location","$var(lookup)")) {
and so on ... Again thank you, for help volga629
On Sep 20 2018, at 8:02 am, Daniel-Constantin Mierla miconda@gmail.com wrote:
On 20.09.18 09:59, Daniel Tryba wrote:
On Thu, Sep 20, 2018 at 12:54:30AM -0300, volga629@networklab.ca wrote:
User location lookup looks like can't handle long $rU like 10102-ce72256df4945bc472ed9c27a1037f46. It always return -3 404 not found.
This username is only 38 chars long, I have a username in a 5.1.4 environment with 39 chars that works just fine.
What backend for storage of location are you using? If it is a sql backend, what length is the username in the location table?
Just an extra hint -- do 'kamctl ul show' and see what is displayed for the respective user. Is there a record for it? What is the state?
Cheers, Daniel
-- Daniel-Constantin Mierla -- www.asipto.com www.twitter.com/miconda -- www.linkedin.com/in/miconda Kamailio World Conference -- www.kamailioworld.com Kamailio Advanced Training, Nov 12-14, 2018, in Berlin -- www.asipto.com
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users