<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div>Hello Alex,<br></div><div>Yes, all question that when I am checking location table I see only records for asterisk box, no information about registered extension. Do you think is will good idea put save location after authentication in request route section ?<br></div><div>Which another part is domain is empty and username empty.<br></div><div><br></div><div><br></div><div>mysql>  SELECT * FROM location;<br>+----+----------------------+----------+--------+------------------------------------+----------+------+---------------------+-------+-------------------------------------------------------+------+---------------------+-------+--------+---------------------+--------------------------+---------+----------+--------+<br>| id | ruid                 | username | domain | contact                            | received | path | expires             | q     | callid                                                | cseq | last_modified       | flags | cflags | user_agent          | socket                   | methods | instance | reg_id |<br>+----+----------------------+----------+--------+------------------------------------+----------+------+---------------------+-------+-------------------------------------------------------+------+---------------------+-------+--------+---------------------+--------------------------+---------+----------+--------+<br>|  1 | uloc-5332078c-164a-1 |          | NULL   | sip:voicemail@192.168.100.145:5062 | NULL     | NULL | 2014-03-25 19:54:50 | -1.00 | 0798bb1d370e1a93317efee741a2151f@192.168.100.145:5062 |  102 | 2014-03-25 18:54:50 |     0 |      0 | Asterisk PBX 12</div><div><br></div><div>Slava.<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Slava Bendersky" <volga629@networklab.ca><br><b>To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org><br><b>Sent: </b>Wednesday, March 26, 2014 11:13:05 AM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000" data-mce-style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000;"><div>Hello Alex,<br></div><div>That make sense, because all 3 digit extension which in log belong to voicemail server.  They not local set it located on asterisk box. Also I see 484.</div><div>In this case do I need test if it local set or not ?<br></div><div><br>U 2014/03/26 11:08:27.749579 192.168.100.145:5060 -> 192.168.100.145:5062<br>SIP/2.0 484 Address Incomplete.<br>Via: SIP/2.0/UDP 192.168.100.145:5062;branch=z9hG4bK0d3ed7d2.<br>From: "asterisk" <sip:voicemail@192.168.100.145:5062>;tag=as014ee23b.<br>To: <sip:192.168.100.145>;tag=b27e1a1d33761e85846fc98f5f3a7e58.67c9.<br>Call-ID: 6b1158a1275a1b68568b03057e2a29bb@192.168.100.145:5062.<br>CSeq: 102 OPTIONS.<br>Server: kamailio (4.1.2 (x86_64/linux)).<br>Content-Length: 0.<br><div><br></div>Look like LOCATION.<br></div><div><br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Alex Balashov" <abalashov@evaristesys.com><br><b>To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org><br><b>Sent: </b>Wednesday, March 26, 2014 3:34:38 AM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div>Yeah, but you're checking inside the if(!lookup(...)) block.<br> <br> ! is, in Kamailio, as in most programming language languages, a negation operator. It means "if the lookup failed" in this case, i.e. if lookup() returned a zero or negative value. And if you're seeing the xlog messages where you have placed them, it means the lookups are failing. <br> <br> It also means the RURI is not being altered by a successful lookup, which means it still has the RURI domain of the proxy (print $ru, not $rU, to see what I mean), which explains the request looping. <br> <br><div><br></div><div class="gmail_quote">On 26 March 2014 03:30:22 GMT-04:00, Slava Bendersky <volga629@networklab.ca> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" data-mce-style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000" data-mce-style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000;"><div>Hello Alex,<br></div><div><br></div><div>The log showing $ru value $du, empty.<br></div><div><br></div><div><br></div><div>        $avp(oexten) = $rU;<br>        if (!lookup("location")) {<br>            xlog("L_INFO", "This $rU and this $du");<br><div><br></div></div><div>Mar 26 03:12:16 dsm01 /usr/sbin/kamailio[9706]: INFO: <script>: This 124 and this <null><br>Mar 26 03:12:57 dsm01 /usr/sbin/kamailio[9709]: INFO: <script>: This 120 and this <null><br><div><br></div></div><div>When I specify proxy settings on sip client "zoiper", rtp start working and at least  I can dial voicemail on asterisk behind. <br></div><div><br></div><div>Slava.<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Alex Balashov" <abalashov@evaristesys.com><br><b>To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org><br><b>Sent: </b>Tuesday, March 25, 2014 10:44:33 PM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div>That sounds like the registration lookup is resolving to a binding which has as its domain the domain of the proxy itself. <br> <br> Try printing the value of $ru and $du (via xlog) immediately after the lookup(). It will probably shed some light. <br> <br><div><br></div><div class="gmail_quote">On 25 March 2014 22:14:58 GMT-04:00, Slava Bendersky <volga629@networklab.ca> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" data-mce-style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid #cccccc; padding-left: 1ex;"><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000" data-mce-style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000;"><div>Hello Alex.<br></div><div>After some looking around, I added in request route, <br></div><div><br></div><div>Added <br></div><div><br></div><div>        # Saving domain + attr in DB<br>        save("location");<br><div><br></div>        # user location service<br>        route(LOCATION);<br>}<br><div><br></div></div><div>but the problem that call looping. If I dial any extension call back to dialed extension. I see on tcpdump like.</div><div><br></div><div>21:12:39.461230 IP (tos 0x10, ttl 64, id 46056, offset 0, flags [none], proto UDP (17), length 1002)<br>    192.168.100.145.5060 > 192.168.100.1.61736: [udp sum ok] SIP, length: 974<br>    INVITE sip:1200@192.168.100.1:61736;transport=UDP SIP/2.0<br>    Record-Route: <sip:192.168.100.145;lr=on><br>    Via: SIP/2.0/UDP 192.168.100.145;branch=z9hG4bK2c97.11f246b692210236849f9ef31836226b.1<br>    Via: SIP/2.0/UDP 192.168.100.1:57876;branch=z9hG4bK-d8754z-8160e51d28da9ef7-1---d8754z-<br>    Max-Forwards: 16<br>    Contact: <sip:1200@192.168.100.1:57876;transport=UDP><br>    To: <sip:120@networklab.loc;transport=UDP><br>    From: "Slava Bendersky"<sip:1200@networklab.loc;transport=UDP>;tag=da605d51<br>    Call-ID: NGFmMzg1NzFjYTQ1Y2FlZmI2ODE2OWEzNTRkNGMzOTI.<br>    CSeq: 1 INVITE<br>    Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE<br>    Content-Type: application/sdp<br>    Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri<br>    User-Agent: Z 3.2.21368 r21103<br>    Allow-Events: presence, kpml<br>    Content-Length: 155<br>    <br>    v=0<br>    o=Z 0 0 IN IP4 127.0.0.1    --> ?<br>    s=Z<br>    c=IN IP4 127.0.0.1<br>    t=0 0<br>    m=audio 8000 RTP/AVP 0 101<br>    a=rtpmap:101 telephone-event/8000<br>    a=fmtp:101 0-15<br>    a=sendrecv<br>    <br><div><br></div></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Slava Bendersky" <volga629@networklab.ca><br><b>To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org><br><b>Sent: </b>Tuesday, March 25, 2014 11:43:57 AM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000" data-mce-style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000;"><div>Hello Alex,<br></div><div><br>I was looking on location as far I understand this part need to be checked on ldap level.<br></div><div><br></div><div>        $avp(oexten) = $rU;<br>        if (!lookup("location")) {<br>                $var(rc) = $rc;<br><div><br></div></div><div>I have defined in ldap as separate item sipDomain I can do ldap_search on it, but not sure about lookup, avp I can set to $avp(domain).<br></div><div><br></div><div>Slava.<br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Slava Bendersky" <volga629@networklab.ca><br><b>To: </b>"Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org><br><b>Sent: </b>Monday, March 24, 2014 1:39:42 PM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000" data-mce-style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000;"><div>Hello Alex,<br></div><div><br></div><div>Here output from dig.<br></div><div><br></div><div>Yes, for current setup I want setup as border gateway with couple redirection and failover to DR site. Currently I got ldap authentication working. trying test call between remote extension (which failing). And next step will forward to voicemail which partially done. PSTN forward is part of config I will need  adjust couple expression to match dial string. That current plan.<br></div><div><br></div><div>[volga629@localhost ~]$ dig srv _sips._tcp.networklab.loc<br><div><br></div>; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> srv _sips._tcp.networklab.loc<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64602<br>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4<br><div><br></div>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;_sips._tcp.networklab.loc.    IN    SRV<br><div><br></div>;; ANSWER SECTION:<br>_sips._tcp.networklab.loc. 3600    IN    SRV    0 0 5061 dsm01.networklab.loc.<br><div><br></div>;; AUTHORITY SECTION:<br>networklab.loc.        86400    IN    NS    ns1.networklab.loc.<br>networklab.loc.        86400    IN    NS    ns2.networklab.loc.<br><div><br></div>;; ADDITIONAL SECTION:<br>dsm01.networklab.loc.    86400    IN    A    192.168.100.145<br>ns1.networklab.loc.    86400    IN    A    192.168.10.69<br>ns2.networklab.loc.    86400    IN    A    192.168.10.99<br><div><br></div>;; Query time: 2 msec<br>;; SERVER: 192.168.10.99#53(192.168.10.99)<br>;; WHEN: Mon Mar 24 13:31:27 EDT 2014<br>;; MSG SIZE  rcvd: 178<br><div><br></div><br>[volga629@localhost ~]$  dig srv _sip._udp.networklab.loc<br><div><br></div>; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> srv _sip._udp.networklab.loc<br>;; global options: +cmd<br>;; Got answer:<br>;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15496<br>;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4<br><div><br></div>;; OPT PSEUDOSECTION:<br>; EDNS: version: 0, flags:; udp: 4096<br>;; QUESTION SECTION:<br>;_sip._udp.networklab.loc.    IN    SRV<br><div><br></div>;; ANSWER SECTION:<br>_sip._udp.networklab.loc. 3600    IN    SRV    0 0 5060 dsm01.networklab.loc.<br><div><br></div>;; AUTHORITY SECTION:<br>networklab.loc.        86400    IN    NS    ns2.networklab.loc.<br>networklab.loc.        86400    IN    NS    ns1.networklab.loc.<br><div><br></div>;; ADDITIONAL SECTION:<br>dsm01.networklab.loc.    86400    IN    A    192.168.100.145<br>ns1.networklab.loc.    86400    IN    A    192.168.10.69<br>ns2.networklab.loc.    86400    IN    A    192.168.10.99<br><div><br></div>;; Query time: 2 msec<br>;; SERVER: 192.168.10.99#53(192.168.10.99)<br>;; WHEN: Mon Mar 24 13:32:30 EDT 2014<br>;; MSG SIZE  rcvd: 177<br><div><br></div></div><div><br></div><div><br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;" data-mce-style="color: #000; font-weight: normal; font-style: normal; text-decoration: none; font-family: Helvetica,Arial,sans-serif; font-size: 12pt;"><b>From: </b>"Alex Balashov" <abalashov@evaristesys.com><br><b>To: </b>sr-users@lists.sip-router.org<br><b>Sent: </b>Monday, March 24, 2014 12:43:58 AM<br><b>Subject: </b>Re: [SR-Users] kamailio db<br><div><br></div>On 03/24/2014 12:33 AM, Slava Bendersky wrote:<br><div><br></div>>   9(6003) DEBUG: <core> [dns_cache.c:830]: dns_cache_add():<br>> dns_cache_add: adding networklab.loc(14) 1 (flags=1) at 720<br>>   9(6003) ERROR: <core> [resolve.c:1733]: sip_hostport2su(): ERROR:<br>> sip_hostport2su: could not resolve hostname: "networklab.loc"<br><div><br></div>How are you checking the SRV records, exactly? Can you paste the <br>invocation and output of the 'host' command, or whatever you're using?<br><div><br></div>-- <br>Alex Balashov - Principal<br>Evariste Systems LLC<br>235 E Ponce de Leon Ave<br>Suite 106<br>Decatur, GA 30030<br>United States<br>Tel: +1-678-954-0670<br>Web: http://www.evaristesys.com/, http://www.alexbalashov.com/<br><div><br></div>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div><p style="margin-top: 2.5em; margin-bottom: 1em;
border-bottom: 1px solid #000" data-mce-style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000;"><br></p><hr><pre class="k9mail"><br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" data-mce-href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br></pre></blockquote></div><br> --<br> Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard. <br> <br> Alex Balashov - Principal <br> Evariste Systems LLC<br> 235 E Ponce de Leon Ave<br> Suite 106<br> Decatur, GA 30030<br> United States<br> Tel: +1-678-954-0671<br> Web: <a href="http://www.evaristesys.com" target="_blank" data-mce-href="http://www.evaristesys.com">http://www.evaristesys.com</a>/, <a href="http://www.alexbalashov.com" target="_blank" data-mce-href="http://www.alexbalashov.com">http://www.alexbalashov.com</a><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div><p style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000" data-mce-style="margin-top: 2.5em; margin-bottom: 1em; border-bottom: 1px solid #000;"><br></p><hr><pre class="k9mail"><br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br><a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" data-mce-href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br></pre></blockquote></div><br> --<br> Sent from my Nexus 10, with all the figments of autocorrect that might imply.<br> <br> Alex Balashov - Principal<br> Evariste Systems LLC<br> 235 E Ponce de Leon Ave<br> Suite 106<br> Decatur, GA 30030<br> United States<br> Tel: +1-678-954-0670<br> Web: <a href="http://www.evaristesys.com" target="_blank" data-mce-href="http://www.evaristesys.com">http://www.evaristesys.com</a>/, <a href="http://www.alexbalashov.com/" target="_blank" data-mce-href="http://www.alexbalashov.com/">http://www.alexbalashov.com/</a><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div><br>_______________________________________________<br>SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>sr-users@lists.sip-router.org<br>http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users<br></div><div><br></div></div></body></html>