Hello Alex,
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 ?
Which another part is domain is empty and username empty.


mysql>  SELECT * FROM location;
+----+----------------------+----------+--------+------------------------------------+----------+------+---------------------+-------+-------------------------------------------------------+------+---------------------+-------+--------+---------------------+--------------------------+---------+----------+--------+
| id | ruid                 | username | domain | contact                            | received | path | expires             | q     | callid                                                | cseq | last_modified       | flags | cflags | user_agent          | socket                   | methods | instance | reg_id |
+----+----------------------+----------+--------+------------------------------------+----------+------+---------------------+-------+-------------------------------------------------------+------+---------------------+-------+--------+---------------------+--------------------------+---------+----------+--------+
|  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

Slava.


From: "Slava Bendersky" <volga629@networklab.ca>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Sent: Wednesday, March 26, 2014 11:13:05 AM
Subject: Re: [SR-Users] kamailio db

Hello Alex,
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.
In this case do I need test if it local set or not ?

U 2014/03/26 11:08:27.749579 192.168.100.145:5060 -> 192.168.100.145:5062
SIP/2.0 484 Address Incomplete.
Via: SIP/2.0/UDP 192.168.100.145:5062;branch=z9hG4bK0d3ed7d2.
From: "asterisk" <sip:voicemail@192.168.100.145:5062>;tag=as014ee23b.
To: <sip:192.168.100.145>;tag=b27e1a1d33761e85846fc98f5f3a7e58.67c9.
Call-ID: 6b1158a1275a1b68568b03057e2a29bb@192.168.100.145:5062.
CSeq: 102 OPTIONS.
Server: kamailio (4.1.2 (x86_64/linux)).
Content-Length: 0.

Look like LOCATION.



From: "Alex Balashov" <abalashov@evaristesys.com>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Sent: Wednesday, March 26, 2014 3:34:38 AM
Subject: Re: [SR-Users] kamailio db

Yeah, but you're checking inside the if(!lookup(...)) block.

! 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.

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.


On 26 March 2014 03:30:22 GMT-04:00, Slava Bendersky <volga629@networklab.ca> wrote:
Hello Alex,

The log showing $ru value $du, empty.


        $avp(oexten) = $rU;
        if (!lookup("location")) {
            xlog("L_INFO", "This $rU and this $du");

Mar 26 03:12:16 dsm01 /usr/sbin/kamailio[9706]: INFO: <script>: This 124 and this <null>
Mar 26 03:12:57 dsm01 /usr/sbin/kamailio[9709]: INFO: <script>: This 120 and this <null>

When I specify proxy settings on sip client "zoiper", rtp start working and at least  I can dial voicemail on asterisk behind.

Slava.


From: "Alex Balashov" <abalashov@evaristesys.com>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Sent: Tuesday, March 25, 2014 10:44:33 PM
Subject: Re: [SR-Users] kamailio db

That sounds like the registration lookup is resolving to a binding which has as its domain the domain of the proxy itself.

Try printing the value of $ru and $du (via xlog) immediately after the lookup(). It will probably shed some light.


On 25 March 2014 22:14:58 GMT-04:00, Slava Bendersky <volga629@networklab.ca> wrote:
Hello Alex.
After some looking around, I added in request route,

Added

        # Saving domain + attr in DB
        save("location");

        # user location service
        route(LOCATION);
}

but the problem that call looping. If I dial any extension call back to dialed extension. I see on tcpdump like.

21:12:39.461230 IP (tos 0x10, ttl 64, id 46056, offset 0, flags [none], proto UDP (17), length 1002)
    192.168.100.145.5060 > 192.168.100.1.61736: [udp sum ok] SIP, length: 974
    INVITE sip:1200@192.168.100.1:61736;transport=UDP SIP/2.0
    Record-Route: <sip:192.168.100.145;lr=on>
    Via: SIP/2.0/UDP 192.168.100.145;branch=z9hG4bK2c97.11f246b692210236849f9ef31836226b.1
    Via: SIP/2.0/UDP 192.168.100.1:57876;branch=z9hG4bK-d8754z-8160e51d28da9ef7-1---d8754z-
    Max-Forwards: 16
    Contact: <sip:1200@192.168.100.1:57876;transport=UDP>
    To: <sip:120@networklab.loc;transport=UDP>
    From: "Slava Bendersky"<sip:1200@networklab.loc;transport=UDP>;tag=da605d51
    Call-ID: NGFmMzg1NzFjYTQ1Y2FlZmI2ODE2OWEzNTRkNGMzOTI.
    CSeq: 1 INVITE
    Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
    Content-Type: application/sdp
    Supported: replaces, norefersub, extended-refer, timer, X-cisco-serviceuri
    User-Agent: Z 3.2.21368 r21103
    Allow-Events: presence, kpml
    Content-Length: 155
    
    v=0
    o=Z 0 0 IN IP4 127.0.0.1    --> ?
    s=Z
    c=IN IP4 127.0.0.1
    t=0 0
    m=audio 8000 RTP/AVP 0 101
    a=rtpmap:101 telephone-event/8000
    a=fmtp:101 0-15
    a=sendrecv
    



From: "Slava Bendersky" <volga629@networklab.ca>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Sent: Tuesday, March 25, 2014 11:43:57 AM
Subject: Re: [SR-Users] kamailio db

Hello Alex,

I was looking on location as far I understand this part need to be checked on ldap level.

        $avp(oexten) = $rU;
        if (!lookup("location")) {
                $var(rc) = $rc;

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).

Slava.


From: "Slava Bendersky" <volga629@networklab.ca>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.sip-router.org>
Sent: Monday, March 24, 2014 1:39:42 PM
Subject: Re: [SR-Users] kamailio db

Hello Alex,

Here output from dig.

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.

[volga629@localhost ~]$ dig srv _sips._tcp.networklab.loc

; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> srv _sips._tcp.networklab.loc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64602
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;_sips._tcp.networklab.loc.    IN    SRV

;; ANSWER SECTION:
_sips._tcp.networklab.loc. 3600    IN    SRV    0 0 5061 dsm01.networklab.loc.

;; AUTHORITY SECTION:
networklab.loc.        86400    IN    NS    ns1.networklab.loc.
networklab.loc.        86400    IN    NS    ns2.networklab.loc.

;; ADDITIONAL SECTION:
dsm01.networklab.loc.    86400    IN    A    192.168.100.145
ns1.networklab.loc.    86400    IN    A    192.168.10.69
ns2.networklab.loc.    86400    IN    A    192.168.10.99

;; Query time: 2 msec
;; SERVER: 192.168.10.99#53(192.168.10.99)
;; WHEN: Mon Mar 24 13:31:27 EDT 2014
;; MSG SIZE  rcvd: 178


[volga629@localhost ~]$  dig srv _sip._udp.networklab.loc

; <<>> DiG 9.9.4-P2-RedHat-9.9.4-11.P2.fc20 <<>> srv _sip._udp.networklab.loc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 15496
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 4

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;_sip._udp.networklab.loc.    IN    SRV

;; ANSWER SECTION:
_sip._udp.networklab.loc. 3600    IN    SRV    0 0 5060 dsm01.networklab.loc.

;; AUTHORITY SECTION:
networklab.loc.        86400    IN    NS    ns2.networklab.loc.
networklab.loc.        86400    IN    NS    ns1.networklab.loc.

;; ADDITIONAL SECTION:
dsm01.networklab.loc.    86400    IN    A    192.168.100.145
ns1.networklab.loc.    86400    IN    A    192.168.10.69
ns2.networklab.loc.    86400    IN    A    192.168.10.99

;; Query time: 2 msec
;; SERVER: 192.168.10.99#53(192.168.10.99)
;; WHEN: Mon Mar 24 13:32:30 EDT 2014
;; MSG SIZE  rcvd: 177





From: "Alex Balashov" <abalashov@evaristesys.com>
To: sr-users@lists.sip-router.org
Sent: Monday, March 24, 2014 12:43:58 AM
Subject: Re: [SR-Users] kamailio db

On 03/24/2014 12:33 AM, Slava Bendersky wrote:

>   9(6003) DEBUG: <core> [dns_cache.c:830]: dns_cache_add():
> dns_cache_add: adding networklab.loc(14) 1 (flags=1) at 720
>   9(6003) ERROR: <core> [resolve.c:1733]: sip_hostport2su(): ERROR:
> sip_hostport2su: could not resolve hostname: "networklab.loc"

How are you checking the SRV records, exactly? Can you paste the
invocation and output of the 'host' command, or whatever you're using?

--
Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

--
Sent from my mobile, and thus lacking in the refinement one might expect from a fully fledged keyboard.

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0671
Web: http://www.evaristesys.com/, http://www.alexbalashov.com
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users




SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

--
Sent from my Nexus 10, with all the figments of autocorrect that might imply.

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users