[asterisk-users] MWI for non-subscribed Realtime peers?

2011-11-23 Thread Jan Blom
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@customer
subscribemwi=no
defaultuser=az5134939706


Every time a voicemail has been left in the mailbox 1234@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
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] MWI for non-subscribed Realtime peers?

2011-11-23 Thread Jan Blom
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-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Jan Blom
Sent: den 23 november 2011 13:04
To: asterisk-users@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@customer
subscribemwi=no
defaultuser=az5134939706


Every time a voicemail has been left in the mailbox 1234@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
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users