[asterisk-users] @-sign gets transmitted as %40 in outgoing SIP packets (CallerID)

Joshua C. Colp jcolp at sangoma.com
Mon Oct 17 08:07:30 CDT 2022


On Mon, Oct 17, 2022 at 10:02 AM Markus <universe at truemetal.org> wrote:

> Hi list,
>
> I'm using Asterisk 11.25.0 and would like to set
> "anonymous at anonymous.invalid" as outgoing caller ID via SIP:
>
> Set(CALLERID(num)=anonymous at anonymous.invalid)
>
> However, when I look at the outgoing packet with tcpdump I see that the
> @ is not being transmitted correctly:
>
> From: <sip:anonymous%40anonymous.invalid at x.x.x.x>;tag=as26264e65
>
> My question is how can I get Asterisk to send a "@" instead of "%40"?
>

The number is sent as the user portion in SIP. That can't have the "@" in
it, as that is invalid and against spec - it gets turned into "%40". If
what you ACTUALLY want is the user portion to be "anonymous" and the domain
portion to be "anonymous.invalid" then you may be able to set the callerid
presentation[1] to not be allowed:

Set(CALLERID(pres)=prohib)

Though I haven't tested it on chan_sip in 11.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_CALLERID

-- 
Joshua C. Colp
Asterisk Project Lead
Sangoma Technologies
Check us out at www.sangoma.com and www.asterisk.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20221017/ab56a4a9/attachment.html>


More information about the asterisk-users mailing list