[Asterisk-Dev] SIP Authentication problem between Cisco router and Asterisk when calls are forwarded

Olle E. Johansson oej at edvina.net
Fri Jun 10 14:44:44 MST 2005

John Lange wrote:
> I've heard this mentioned before but I don't really understand how it
> makes any sense in terms of building a reasonably efficient dial plan.
> We have a large block of DIDs assigned to us so this is our dial plan:
> [macro-stdexten]
> exten => s,1,Dial(${ARG1},20)
> exten => s,2,Goto(s-${DIALSTATUS},1)
> exten => s-NOANSWER,1,Voicemail2(u${MACRO_EXTEN})
> exten => s-NOANSWER,2,Hangup()
> exten => s-BUSY,1,Voicemail(b${MACRO_EXTEN})
> exten => s-BUSY,2,Hangup()
> exten => _s-.,1,Goto(s-NOANSWER,1) ; everything else is treated as no
> answer
> [default]
> exten => _20422233XX,1,Macro(stdexten,SIP/${EXTEN})
> As you can see, we can handle hundreds (or even thousands) of DIDs in
> only a few short lines of extensions.conf. If we started assigning
> device names like "joesmith" we would have to define every single
> extension.
> Am I missing something?
Database dialplans... ARA ;-)

There are other solutions available that will avoid this situation,
but in all of them you have to find another way to match between
incoming DID and users. Adding something in front of the username, like
myuser20422223310 and then dialing SIP/myuser${EXTEN} seems to be the
easiest fix.

Changing asterisk to work on the digest user name instead of the From:
user name is a much larger task. I started working on it in chan_sip2
and, well, gave up for then. It will require a new authentication/user
matching scheme which is not easy to get approved with regards to
backwards compatibility.


More information about the asterisk-dev mailing list