I have another large carrier that I am trying to send calls to, and they have a requirement that you not send them the npdi and rn=nnnnnnnn parameters for all calls. If you do, the call handling will be botched and the call will fail, even if the LRN information is exactly correct.
Apparently this carrier (who once owned the Death Star) is incapable of filtering or ignoring this information on their side, and the sending switch is incapable of not sending this information because they thought RFC 4694 said they MUST ALWAYS send npdi/rn on every SIP call. Of course, the RFC does not say this. Don't get me started on which party is dumber.
Anyway, I was hoping that SER could act as diplomat or interpreter and with some rewrite-something() calls, SER could remove the npdi/rn, or alter them to the point that the receiving switch no longer recognized the parameters as rn/npdi and so happily does it's own thing, and the calls don't die.
However, based on what documentation exists, none of the various rewrite functions appear to operate on this part of the INVITE message and replace doesn't appear to work on the first line of a message. So there seems to be a spot whose contents can't be reached or manipulated by the existing functions. Am I correct in thinking this?
So, is there a way to do something with rn=NNNNNNNNNN and npdi/npdi=yes parameters without having to write a custom function to do it?
Thanks in advance!
Frank Durda IV wrote:
[...]
Where exactly are these parameters? RFC 4694 is for tel URIs, so I would assume this is either in the From URI or Request-URI?
What you want is the subst() or replace() functions if it is in any of the header fields or the subst_uri() function for the Request-URI. They all allow you to search/replace using regular expressions and are mighty powerful.
There is a small number of quirks, such as don't use the end-of-line matching thing $ (supposedly because EOL is \r\n not just \n which confuses things), but you can usually work around that. Just play around with various regexps until you get it right.
HTH and best regards, Martin