Johannes Hollerer
2004-Sep-09 06:20 UTC
[Asterisk-Users] Dialing Out through Provider with Authentication
Hi,
I try to dial out through a Provider, but for that i need to be
authenticated - it actually does not work !.
What kind of dial command do i have to use when i:
- Want to authenticate the user
- And dial with that authenticated user an extension
What i tried so far
exten => _7.,2,Dial(SIP/USERNAME:PASSWORD@PROVIDER.COM/${EXTEN:1})
what have i done wrong ?
i always get back a Service Unavailable !
johannes
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20040909/7fd10b37/attachment.htm
Begumisa Gerald M
2004-Sep-09 11:37 UTC
[Asterisk-Users] Dialing Out through Provider with Authentication
On Thu, 9 Sep 2004, Johannes Hollerer wrote:
> I try to dial out through a Provider, but for that i need to be
> authenticated - it actually does not work !.
For my tests I did not need to be authenticated. This is what I used in
asterisk:
exten => _7.,2,Dial(SIP/PROVIDER.COM/${EXTEN:1})
When I tried to use your scenario, as below
exten => _7.,2,Dial(SIP/USERNAME:PASSWORD@PROVIDER.COM/${EXTEN:1})
Here's what I get in my logs:
Sep 9 18:10:56 WARNING[137570304]: chan_sip.c:902 create_addr: No such
host: PROVIDER.COM/72312
What I gather from this is that its not legal to Dial() like that. In my
limited SIP knowledge, it makes sense - you do not need to have a username
and / or password to place calls to extensions that a given provider (e.g
PROVIDER.COM) serves - if they do not serve those extensions, they will
give a "404 Not Found" error.
Hope that helps...
Gerald.
Johannes Hollerer
2004-Sep-10 00:48 UTC
[Asterisk-Users] Dialing Out through Provider with Authentication
Hi,
I tried to make a call to extension 2001 with the setting
2000@provider.com (Detailed:
exten => _7.,2,Dial(SIP/2000@provider.com/${EXTEN:1})
which does not work at all - i always get the failure message: No such
host provider.com/2001 (the number i dialed) - why ??
when i try the same with a peer agent (exten =>
_7.,2,Dial(SIP/provider_out/${EXTEN:1}) - i always get the failure
message
WARNING[-178521168]: chan_sip.c:680 retrans_pkt: Maximum retries
exceeded on call 0ac244f146d85c325ca3357b4db1d05a@192.168.0.7 for seqno
102 (Critical Request)
What am i missing ??
I am running out if ideas !.
Johannes
Am Fr, den 10.09.2004 schrieb Begumisa Gerald M um 12:04:
> On Thu, 9 Sep 2004, Karl Brose wrote:
> > In order to dial out to a sip provider, you need to configure that
> > provider in your sip.conf file as a peer with your proper username
> > and secret, etc.
>
> Cool! Just found that in the handbook too a second or two ago :-)
> Thanks for taking time to answer this.
>
> Three Cheers!
> Gerald
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users@lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.digium.com/pipermail/asterisk-users/attachments/20040910/b463775a/attachment.htm
Begumisa Gerald M
2004-Sep-10 04:44 UTC
[Asterisk-Users] Dialing Out through Provider with Authentication
On Fri, 10 Sep 2004, Johannes Hollerer wrote:
> I tried to make a call to extension 2001 with the setting
> 2000@provider.com (Detailed: exten =>
> _7.,2,Dial(SIP/2000@provider.com/${EXTEN:1}) which does not work at
> all - i always get the failure message: No such host
> provider.com/2001 (the number i dialed) - why ??
What I understood from Karl's message is that you need to create a peer in
sip.conf. For example below:
-- sip.conf --
[myprovider]
type=peer
username=USERNAME
host=PROVIDER.COM
secret=SECRET
--
Then in extensions.conf, do the following:
--
exten => _7.,2,Dial(SIP/myprovider/${EXTEN:1})
--
This should work. What Karl meant is that using the statement below:
--
exten => _7.,2,Dial(SIP/2000@provider.com)
--
Will only work if you are dialilng a *specific* extension on provider.com.
The statement below:
--
exten => _7.,2,Dial(SIP/2000@provider.com/${EXTEN:1})
--
Is illegal.
Cheers,
Gerald