Reserved character

Hi, is there a way to use reserved character like @ . My authorization username has an @ , and asterisk is not passing the @ correctly to my carrier, so for that reason I get 403 Forbidden, it is substituting the @ by %40

sip trace here

<--- SIP read from UDP:10.16.246.243:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 10.78.165.196:5060;branch=z9hG4bK28dc4936
Call-ID: 13aa64f4523dfd0b4049d175773b84ab@10.78.165.196:5060
From: "asterisk"<sip:+50222568820%40imshwi.claro.com.gt@10.78.165.196>;tag=as1d381e46
To: <sip:10.16.246.243>;tag=sbc0405klduw1um
CSeq: 102 OPTIONS
Content-Length: 0

asterisk version 11

Usually you can escape special characters with the ‘’ character, Have you tried that already?

It doesnt work it is substituting the @ by %40
From: "asterisk"<sip:+50222568820%40imshwi.claro.com.gt@10.78.165.196>;tag=as1d381e46

<--- SIP read from UDP:10.16.246.243:5060 --->
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 10.78.165.196:5060;branch=z9hG4bK28dc4936
Call-ID: 13aa64f4523dfd0b4049d175773b84ab@10.78.165.196:5060
**From: "asterisk"<sip:+50222568820%40imshwi.claro.com.gt@10.78.165.196>;tag=as1d381e46**
To: <sip:10.16.246.243>;tag=sbc0405klduw1um
CSeq: 102 OPTIONS
Content-Length: 0

I believe you can work round such broken implementations by disabling SIP pedantic mode.

As you can see from the formal syntax, what they are requiring is illegal:

user = 1*( unreserved / escaped / user-unreserved )
user-unreserved = “&” / “=” / “+” / “$” / “,” / “;” / “?” / "/"
unreserved = alphanum / mark
mark = “-” / “_” / “.” / “!” / “~” / “*” / “’”
/ “(” / ")"
escaped = “%” HEXDIG HEXDIG

Thanks @david551 I will try that, it make sense,

pedantic=yes Enable checking of tags in headers, international character conversions in UR and multiline formatted headers for strict

My username and pass has ilegal character because it has the ( @ and +) for both (auth name and secret) I hope disabling pendantic fix the issue

user : +50222568820@imshwi.claro.com.gt
password: 11111L0w22urd3sM@qu3taPru36a225688201111

  • is user-unreserved, so OK

@ is the only invalid character.

You right, I was reading wrong. I will try setting pedantic mode to no, is there any workound beside pedantic=no ?

pendantic seems to works but there is a problem as soon as add the from user option on the peer details it become unrechable fromuser=+50222568820@imshwi.claro.com.gt

for example :

[mytrunk]
fromuser=+50222568820@imshwi.claro.com.gt ;(trunk get unrechable with this option ).

If if remove or comment this option trunk become rechable