[SR-Users] Kamailio <-> Asterisk MWI

Daniel Tryba daniel at pocos.nl
Fri Nov 30 15:42:46 CET 2012


On Friday 30 November 2012 09:42:11 Daniel-Constantin Mierla wrote:
> > I'm trying to get the MWI indicator on endpoints to work by redirecting
> > the SUBSCRIBE to the voicemail server (asterisk) using
> > usc_replace_(to|from). This works fine for the initial request but the
> > next subscribe will fail since the to/from don't get rewritten, which is
> > indicated by the error: ERROR: uac [replace.c:250]: decline FROM
> > replacing in sequential request in auto mode (has TO tag)
> 
> in auto mode, the From/To will be updated automatically for requests
> within dialog. So just relay the subscribe if it has To tag, don't call
> the function to update the header.

The only difference is that there is no error in syslog since the uac_* 
commands aren't executed a second time. The second subscribe will not be 
rewritten when restore mode is either manual or auto if uac_* are conditional:

if(!has_totag())
{
  uac_replace_from("$avp(subscrfrom)");
  uac_replace_to("","sip:$avp(voicemail)@$sel(cfg_get.voicemail.srv_ip):
$sel(cfg_get.voicemail.srv_port)");
}

Rewriting/restoring the from header works for INVITEs and responses where 
essentially the same thing happens (for the From).


-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024



More information about the sr-users mailing list