Hi Daniel,

The phone is sending the SUBSCRIBE for BLF and I have included a more detailed trace.
Just for clarity sake, the problem I am having is that the assigned BLF line doesn't light up.

##### Begin Trace #####

U 2.XX.XX.187:6072 -> 10.22.110.11:5060
REGISTER sip:test.mydomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK172500819.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>.
Call-ID: 259369610@192.168.1.138.
CSeq: 1 REGISTER.
Contact: <sip:302@192.168.1.138:6072>.
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.72.0.30.
Expires: 300.
Allow-Events: talk,hold,conference,refer,check-sync.
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072
SIP/2.0 401 Unauthorized.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK172500819;rport=6072;received=2.XX.XX.187.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>;tag=ff6b32c6b28b8954915484dd79f46b1c.f566.
Call-ID: 259369610@192.168.1.138.
CSeq: 1 REGISTER.
WWW-Authenticate: Digest realm="test.mydomain.com", nonce="U2IkbVNiI0HW+fUAtRSaP0lh9eyQTQxV".
Server: kamailio (4.0.6 (x86_64/linux)).
Content-Length: 0.
.


U 2.XX.XX.187:6072 -> 10.22.110.11:5060
REGISTER sip:test.mydomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK215028252.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>.
Call-ID: 259369610@192.168.1.138.
CSeq: 2 REGISTER.
Contact: <sip:302@192.168.1.138:6072>.
Authorization: Digest username="302", realm="test.mydomain.com", nonce="U2IkbVNiI0HW+fUAtRSaP0lh9eyQTQxV", uri="sip:test.mydomain.com:5060", response="c1dd7e1c2e87d5274cff0ce18ca7c584", algorithm=MD5.
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.72.0.30.
Expires: 300.
Allow-Events: talk,hold,conference,refer,check-sync.
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK215028252;rport=6072;received=2.XX.XX.187.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>;tag=ff6b32c6b28b8954915484dd79f46b1c.fe72.
Call-ID: 259369610@192.168.1.138.
CSeq: 2 REGISTER.
Contact: <sip:302@192.168.1.138:6072>;expires=300;received="sip:2.XX.XX.187:6072".
Server: kamailio (4.0.6 (x86_64/linux)).
Content-Length: 0.
.


U 2.XX.XX.187:6072 -> 10.22.110.11:5060
SUBSCRIBE sip:301@test.mydomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK148023404.
From: "302" <sip:302@test.mydomain.com>;tag=1972538712.
To: <sip:301@test.mydomain.com>.
Call-ID: 1265783225@192.168.1.138.
CSeq: 1 SUBSCRIBE.
Contact: <sip:302@192.168.1.138:6072>.
Accept: application/dialog-info+xml.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.72.0.30.
Expires: 1800.
Event: dialog.
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072
SIP/2.0 407 Proxy Authentication Required.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK148023404;rport=6072;received=2.XX.XX.187.
From: "302" <sip:302@test.mydomain.com>;tag=1972538712.
To: <sip:301@test.mydomain.com>;tag=ff6b32c6b28b8954915484dd79f46b1c.4854.
Call-ID: 1265783225@192.168.1.138.
CSeq: 1 SUBSCRIBE.
Proxy-Authenticate: Digest realm="test.mydomain.com", nonce="U2IkblNiI0KIkAF5hKzVFSna1K5la4z6".
Server: kamailio (4.0.6 (x86_64/linux)).
Content-Length: 0.
.


U 2.XX.XX.187:6072 -> 10.22.110.11:5060
SUBSCRIBE sip:301@test.mydomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK1849548150.
From: "302" <sip:302@test.mydomain.com>;tag=1972538712.
To: <sip:301@test.mydomain.com>.
Call-ID: 1265783225@192.168.1.138.
CSeq: 2 SUBSCRIBE.
Contact: <sip:302@192.168.1.138:6072>.
Proxy-Authorization: Digest username="302", realm="test.mydomain.com", nonce="U2IkblNiI0KIkAF5hKzVFSna1K5la4z6", uri="sip:301@test.mydomain.com:5060", response="8f2af5fa7e15052dfd776834c759ee75", algorithm=MD5.
Accept: application/dialog-info+xml.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.72.0.30.
Expires: 1800.
Event: dialog.
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072
SIP/2.0 405 Method Not Allowed.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK1849548150;rport=6072;received=2.XX.XX.187.
From: "302" <sip:302@test.mydomain.com>;tag=1972538712.
To: <sip:301@test.mydomain.com>;tag=0da20c9505477b656ed669e756e303a0-bd1c.
Call-ID: 1265783225@192.168.1.138.
CSeq: 2 SUBSCRIBE.
Server: kamailio (4.0.6 (x86_64/linux)).
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6062
....

U 2.XX.XX.187:6072 -> 10.22.110.11:5060
REGISTER sip:test.mydomain.com:5060 SIP/2.0.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK1251189297.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>.
Call-ID: 259369610@192.168.1.138.
CSeq: 3 REGISTER.
Contact: <sip:302@192.168.1.138:6072>.
Authorization: Digest username="302", realm="test.mydomain.com", nonce="U2IkbVNiI0HW+fUAtRSaP0lh9eyQTQxV", uri="sip:test.mydomain.com:5060", response="c1dd7e1c2e87d5274cff0ce18ca7c584", algorithm=MD5.
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE.
Max-Forwards: 70.
User-Agent: Yealink SIP-T20P 9.72.0.30.
Expires: 300.
Allow-Events: talk,hold,conference,refer,check-sync.
Content-Length: 0.
.


U 2.XX.XX.187:6072 -> 10.22.110.11:5060
.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 192.168.1.138:6072;branch=z9hG4bK1251189297;rport=6072;received=2.XX.XX.187.
From: "302" <sip:302@test.mydomain.com>;tag=1371858689.
To: "302" <sip:302@test.mydomain.com>;tag=ff6b32c6b28b8954915484dd79f46b1c.4e33.
Call-ID: 259369610@192.168.1.138.
CSeq: 3 REGISTER.
Contact: <sip:302@192.168.1.138:6072>;expires=300;received="sip:2.XX.XX.187:6072".
Server: kamailio (4.0.6 (x86_64/linux)).
Content-Length: 0.
.


U 10.22.110.11:5060 -> 2.XX.XX.187:6072

##### End Trace #####

Thanks again

Errol





On Mon, Apr 28, 2014 at 9:26 AM, Daniel-Constantin Mierla <miconda@gmail.com> wrote:
Hello,

the phone has to send SUBSCRIBE for blf, kamailio cannot do anything for that. Maybe the phone is misconfigured. Do you have any logs from the phone saying what it tries and what doesn't work?

Cheers,
Daniel


On 25/04/14 01:34, Errol Samuels wrote:
Hello All,

I have an integration with Kamailio and FusionPBX (Freeswitch) working great but I been trying to troubleshoot a BLF issue with Kamailio where the BLF seems to only work when Kamailio is on a Public IP rather than behind NAT.  The BLF works fine when we register directly with Freeswitch either on a Public IP or behind NAT.

Both Kamailio and FusionPBX (Freeswitch) are behind pfSense firewall on private IPs and registrations, Inbound and Outbound Calls etc are working fine.  Just this BLF issue giving me some grief.  The phone in question is a Yealink T20.

I made some SIP Traces and I noticed the following:

In the FS Message Header I see we have the SUBSCRIBE:

***** Begin Freeswitch trace****

Frame 13: 619 bytes on wire (4952 bits), 619 bytes captured (4952 bits)

Internet Protocol Version 4, Src: 192.168.1.138 (192.168.1.138), Dst: 207.xx.xx.109 (207.xx.xx.109)
User Datagram Protocol, Src Port: x11 (6062), Dst Port: ca-2 (5065)
Session Initiation Protocol (REGISTER)
    Request-Line: REGISTER sip:testfs.mydomain.com:5065 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.1.138:6062;branch=z9hG4bK748715490
        From: "302" <sip:302@testfs.mydomain.com:5065>;tag=530545144
        To: "302" <sip:302@testfs.mydomain.com:5065>
        Call-ID: 2118669441@192.168.1.138
        CSeq: 8 REGISTER
        Contact: <sip:302@192.168.1.138:6062>
        Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
        Max-Forwards: 70
        User-Agent: Yealink SIP-T20P 9.72.0.30
        Expires: 300
        Allow-Events: talk,hold,conference,refer,check-sync
        Content-Length: 0

Frame 14: 698 bytes on wire (5584 bits), 698 bytes captured (5584 bits)

Internet Protocol Version 4, Src: 207.xx.xx.109 (207.xx.xx.109), Dst: 192.168.1.138 (192.168.1.138)
User Datagram Protocol, Src Port: ca-2 (5065), Dst Port: x11 (6062)
Session Initiation Protocol (200)
    Status-Line: SIP/2.0 200 OK
    Message Header
        Via: SIP/2.0/UDP 192.168.1.138:6062;branch=z9hG4bK748715490;received=2.xx.xx.187;rport=6062
        From: "302" <sip:302@testfs.mydomain.com:5065>;tag=530545144
        To: "302" <sip:302@testfs.mydomain.com:5065>;tag=j71FeN5gcBjDe
        Call-ID: 2118669441@192.168.1.138
        CSeq: 8 REGISTER
        Contact: <sip:302@192.168.1.138:6062;received=2.xx.xx.187:6062>;expires=300
        Date: Thu, 24 Apr 2014 17:03:18 GMT
        User-Agent: FreeSWITCH-mod_sofia/1.2.23+git~20140419T040926Z~8a20da75ef~64bit
        Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, REFER, NOTIFY, PUBLISH, SUBSCRIBE
        Supported: timer, path, replaces
        Content-Length: 0

Frame 15: 509 bytes on wire (4072 bits), 509 bytes captured (4072 bits)

Internet Protocol Version 4, Src: 192.168.1.138 (192.168.1.138), Dst: 10.22.110.9 (10.22.110.9)
User Datagram Protocol, Src Port: x11 (6062), Dst Port: ca-2 (5065)
Session Initiation Protocol (SUBSCRIBE)
    Request-Line: SUBSCRIBE sip:301@10.22.110.9:5065 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.1.138:6062;branch=z9hG4bK148600064
        From: "302" <sip:302@testfs.mydomain.com:5065>;tag=2146254460
        To: <sip:301@testfs.mydomain.com:5065>;tag=70uoBUVRvJyr
        Call-ID: 168472766@192.168.1.138
        CSeq: 2 SUBSCRIBE
        Contact: <sip:302@192.168.1.138:6062>
        Accept: application/dialog-info+xml
        Max-Forwards: 70
        User-Agent: Yealink SIP-T20P 9.72.0.30
        Expires: 1800
        Event: dialog
        Content-Length: 0

****** End Freeswitch trace ********

In the Kamailio Header there is no SUBSCRIBE for the BLF.

***** Begin Kamailio trace****

Frame 17: 809 bytes on wire (6472 bits), 809 bytes captured (6472 bits)

Internet Protocol Version 4, Src: 192.168.1.138 (192.168.1.138), Dst: 207.xx.xx.108 (207.xx.xx.108)
User Datagram Protocol, Src Port: x11 (6062), Dst Port: sip (5060)
Session Initiation Protocol (REGISTER)
    Request-Line: REGISTER sip:test.mydomain.com:5060 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 192.168.1.138:6062;branch=z9hG4bK1572502835
        From: "302" <sip:302@test.mydomain.com>;tag=1877226231
        To: "302" <sip:302@test.mydomain.com>
        Call-ID: 887242692@192.168.1.138
        CSeq: 3 REGISTER
        Contact: <sip:302@192.168.1.138:6062>
        Authorization: Digest username="302", realm="test.mydomain.com", nonce="U1lHHFNZRfB7/5Lyb/Rz3p/xu26B1lpE", uri="sip:test.mydomain.com:5060", response="7687c7d3141d1898e63a1cc9538f05d7", algorithm=MD5
        Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDATE, MESSAGE
        Max-Forwards: 70
        User-Agent: Yealink SIP-T20P 9.72.0.30
        Expires: 300
        Allow-Events: talk,hold,conference,refer,check-sync
        Content-Length: 0

Frame 18: 496 bytes on wire (3968 bits), 496 bytes captured (3968 bits)

Internet Protocol Version 4, Src: 207.xx.xx.108 (207.xx.xx.108), Dst: 192.168.1.138 (192.168.1.138)
User Datagram Protocol, Src Port: sip (5060), Dst Port: x11 (6062)
Session Initiation Protocol (200)
    Status-Line: SIP/2.0 200 OK
    Message Header
        Via: SIP/2.0/UDP 192.168.1.138:6062;branch=z9hG4bK1572502835;rport=6062;received=2.xx.xx.187
        From: "302" <sip:302@test.mydomain.com>;tag=1877226231
        To: "302" <sip:302@test.mydomain.com>;tag=ff6b32c6b28b8954915484dd79f46b1c.fcdc
        Call-ID: 887242692@192.168.1.138
        CSeq: 3 REGISTER
        Contact: <sip:302@192.168.1.138:6062>;expires=300;received="sip:2.xx.xx.187:6062"
        Server: kamailio (4.0.6 (x86_64/linux))
        Content-Length: 0

Frame 19: 316 bytes on wire (2528 bits), 316 bytes captured (2528 bits)

Internet Protocol Version 4, Src: 207.xx.xx.108 (207.xx.xx.108), Dst: 192.168.1.138 (192.168.1.138)
User Datagram Protocol, Src Port: sip (5060), Dst Port: x11 (6062)
Session Initiation Protocol (OPTIONS)
    Request-Line: OPTIONS sip:2.xx.xx.187:6062 SIP/2.0
    Message Header
        Via: SIP/2.0/UDP 10.22.110.11:5060;branch=0
        From: sip:pinger@kamailio.org;tag=uloc-53579917-4e9-89-0b632cbb-a8aa99c
        To: sip:2.xx.xx.187:6062
        Call-ID: f9749d7-2d0b0be7-c678c54@10.22.110.11
        CSeq: 1 OPTIONS
        Content-Length: 0

***** End Kamailio trace****

Anyone faced this issue or have any ideas?

regards,

Errol




_______________________________________________
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

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda

_______________________________________________
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