Let me answer my own question. That may save someone's frustration in the
future.
The problem is that the Realtime peer never gets loaded, since SIP REGISTER and
SIP SUBSCRIBE never reaches Asterisk.
Doing a simple "sip show peer az5134939706 load" from CLI will force
load of peer. However, I needed a way of having this done automatically on
startup for all (many!) peers. A number of methods are suggested by people (use
Google) but they all seemed like hacks to me.
Finally I realized, after rereading chan_sip.c, the solution was to force load
the peer from dialplan. If I do this just before I send a caller to voicemail, I
can be sure the peer is available when MWI NOTIFY should be sent. Just add this
to the dialplan:
same => n,NoOp(${SIPPEER(az5134939706)})
Good luck with your Realtime MWI hacking!
Best regards,
Jan
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces
at lists.digium.com] On Behalf Of Jan Blom
Sent: den 23 november 2011 13:04
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] MWI for non-subscribed Realtime peers?
Hi,
I have an Asterisk behind an OpenSIPS proxy. The proxy handles registrations and
also SIP SUBSCRIBE for MWI. The Asterisk are configured to send NOTIFY to the
proxy even when the SUBSCRIBE haven't been received. I can configure a user
in sip.conf that works:
[az5134939706]
type=friend
host=xxx.xxx.xxx.xxx (IP of proxy)
port=5060
nat=no
mailbox=1234 at customer
subscribemwi=no
defaultuser=az5134939706
Every time a voicemail has been left in the mailbox 1234 at customer, a NOTIFY
is sent off to the proxy. Remember, the peer doesn't register or send
SUBSCRIBE to Asterisk, but "subscribemwi=no" forces NOTIFY to be sent
anyway.
However, I am struggling to get the same thing working for Realtime peers. I
have "rtcachefriends=yes" set in sip.conf. But I never see the peer
loaded from database and no NOTIFY is ever sent.
Is it possible to user Realtime this way? What will trigger loading of the peer?
Best regards,
Jan Blom
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.digium.com/pipermail/asterisk-users/attachments/20111123/d07c0755/attachment.htm>