[asterisk-users] chan_sip doesn't authenticate on INVITE from a Dial() command

Antony Stone Antony.Stone at asterisk.open.source.it
Mon Oct 26 04:42:13 CDT 2020


On Sunday 25 October 2020 at 18:43:01, Antony Stone wrote:

> On Sunday 25 October 2020 at 16:27:00, Antony Stone wrote:
> > Hi.
> > 
> > I'm trying to get Asterisk 13 to authenticate when it sends an INVITE,
> > and for some reason it's simply not doing it.
> 
> I've made a bit of progress - I can now get it to authenticate, although
> it's still not dialling on to the correct number.

For anyone else trying to do this, I've finally achieved it :)

It turns out not even to need to !dnid option...

Set(CALLERID(num)=${SIPuser})
Dial(SIP/${SIPdial}:${SIPpass}::${SIPuser}@${SIPhost})

The CallerID setting is necessary otherwise Asterisk will send the 
authentication request, but the Dial request will get rejected with a 403 
Forbidden, because the username will be the inbound Caller ID from the 
original call.

I hope this helps others avoid spending as much time as I have trying to work 
this out.  Anyone in charge of Asterisk documentation is very welcome indeed 
to quote this as an example on pages such as 
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Dial


Best regards,


Antony.

-- 
There are 10 types of people in the world:
those who understand binary notation,
and those who don't.

                                                   Please reply to the list;
                                                         please *don't* CC me.



More information about the asterisk-users mailing list