Hi.
Summary:
I’m using FreeSwitch as a SIP client registering to an external PBX. Calls
inbound and outbound are working fine. I can’t get MWI working.
I can get presence information from the external PBX by adding the following
to my <gateway> definition:
<subscriptions name=“Presence”>
<subscription event=“presence”>
<param name=“retry-seconds” value=“30”/>
<param name=“expire-seconds” value=“120”/>
<param name=“username-in-request” value=“true”/>
</subscription>
</subscriptions>
I’ve added an event hook to my lua configuration:
<hook event=“ALL” script=“Events.lua”/>
(It’s seeing ALL events for now, for debugging purposes.)
This is also working fine - it calls my Events.lua script with a NOTIFY_IN
event for presence and the script does what I want.
The bit which I cannot get working is Message Waiting Indication.
I can see using sngrep that NOTIFYs are coming in to FreeSwitch from my PBX,
but FreeSwitch shows in its console:
sofia.c:743 Gateway information missing Subscription Event: message-summary
After trying to parse this for a while I’ve come to the conclusion that it is
telling me that “Gateway information is missing from a subscription event
named message-summary”, however I have been unable to find out what I need to
do about this.
I’ve tried adding a <subscription> section to my gateway with an event name of
“message-summary” and this does output the encouraging message:
sofia_reg.c:263 subscribing to [message-summary] on gateway [00280000000021]
however it makes no difference to the “Gateway information missing Subscription
Event: message-summary” messages.
The NOTIFYs which come from my PBX for presence and for message-summary seem
sufficiently similar to each other, so I can’t see what’s missing from the
latter which FreeSwitch is looking for. sngrep shows me the following:
Note: 172.16.183.36 is my FreeSwitch client
172.31.77.56 is the remote PBX sending the NOTIFYs
00280000000021 is the name of the FreeSwitch gateway registered to the PBX
NOTIFY sip:gw+00280000000021@172.16.183.36:50060;gw=00280000000021 SIP/2.0
Via: SIP/2.0/UDP 172.31.77.56:5060;rport;branch=z9hG4bKPj23f12d98-
f765-4020-920d-40bc3de577a3
From: <sip:941@external.PBX.example.com>;tag=3c568a23-3152-491d-97db-
d0bd9cdc470e
To: <sip:941@external.PBX.example.com>;tag=80UNFmHDND7gS
Contact: <sip:172.31.77.56:5060>
Call-ID: 430242d1-a0c9-123c-faab-feff0000a1cc
CSeq: 17034 NOTIFY
Event: presence
Subscription-State: terminated
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk
Content-Type: application/pidf+xml
Content-Length: 406
(XML presence information snipped.)
NOTIFY sip:gw+00280000000021@172.16.183.36:50060;gw=00280000000021 SIP/2.0
Via: SIP/2.0/UDP 172.31.77.56:5060;rport;branch=z9hG4bKPj36f98757-
f2ba-4df2-9811-771cfcf3240d
From: <sip:941@172.31.77.56>;tag=fe6913e4-2332-4614-9488-5db184c40239
To: <sip:gw+00280000000021@172.16.183.36;gw=00280000000021>
Contact: <sip:941@172.31.77.56:5060>
Call-ID: cd187591-502c-4d9e-9eb8-2b3c44b356ab
CSeq: 25630 NOTIFY
Subscription-State: terminated
Event: message-summary
Allow-Events: presence, dialog, message-summary, refer
Max-Forwards: 70
User-Agent: Asterisk
Content-Type: application/simple-message-summary
Content-Length: 49
Messages-Waiting: yes
Voice-Message: 4/0 (0/0)
Note that in BOTH cases, FreeSwitch is responding back with a 200 OK.
Can anyone help me get FreeSwitch responding to MWI when it’s a client to an
external PBX?
Thanks,
Antony.