Hello,
On 11/30/12 3:42 PM, Daniel Tryba wrote:
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).
Can you get a ngrep of the first and second SUBSCRIBE? It will help to troubleshoot and see what could be the issue.
Cheers, Daniel