Hi all,
SER 0.9.6 is used as registrar/proxy and asterisk 1.4 as media server (voicemail, ...)
The situation when phone A calls phone B and B is busy is handled by a failure route
revert_uri(); rewritehostport("10.11.12.13:5070"); append_branch(); t_relay;
This works fine, if for example phone A is some Snom 190. If another asterisk server is used instead of phone A it works if "pedantic=no" is set in the sip.conf of asterisk.
If it is "pedantic=yes", then asterisk compares the tags in the To header fields. There is one tag from phone B and a second from the asterisk media server. Asterisk ignores every response not having the tag used by phone B.
IMHO asterisk is wrong, but since I can't controll which asterisk servers are used as clients - is there a way to may asterisk happy? Would it be possible to remove tags from 1XX responses?
Stefan Tichy wrote:
If it is "pedantic=yes", then asterisk compares the tags in the To header fields. There is one tag from phone B and a second from the asterisk media server. Asterisk ignores every response not having the tag used by phone B.
Interesting use of the word "pedantic".
IMHO asterisk is wrong, but since I can't controll which asterisk servers are used as clients - is there a way to may asterisk happy? Would it be possible to remove tags from 1XX responses?
Sure:
replace ("/^To:(.*);tag=[^;]*(;.*)/To:\1\2/");
in an onreply_route (you may have to fix the regexp, haven't tried). Dunno if this is a good idea, though. An UA that actually is pedantic may throw away the responses. The most likely outcome is that you won't have any ring tones. Confuses people no end.
You may want to protect this by an
if (search ("Asterisk")) { }
block and an angry comment.
Regards, Martin, who has seen cell phones with a better SIP stack then Asterisk.
On Fri, Jan 05, 2007 at 10:59:16PM +0100, Martin Hoffmann wrote:
Sure:
replace ("/^To:(.*);tag=[^;]*(;.*)/To:\1\2/");
subst ("/^To:(.*);tag=[A-Za-z0-9]*/To:\1/");
seems to work. A search for "User-Agent: Asterisk PBX" in the Invite should avoid trouble with other UA.
subst ("/^To:(.*);tag=[^;]*/To:\1/"); ignores line breaks even if no flag is used. That is not what I expected.