[asterisk-users] [Asterisk-Users]Using same extension number for outgoing and incoming both internal and PSTN

Sam Govind govoiper at gmail.com
Tue Sep 20 23:37:27 CDT 2011


Hey,

I don;t think asterisk-guru could've been wrong on this one - possibly
different scenario than your's. Anyway I see what you did there ! There is
no need for separate context for  incoming or outgoing if you don't want.
What you are doing is *exten=>_NXXNXXXX,1,Dial(SIP/${EXTEN}@1401**) *
*
*
When you defined the SIp user/peer [1401] you stated context for handling
dial request as "my-office" and when you tried dialling out you told
asterisk to dial the requested number located at 1401 which should've been
@<IP.OF.Grandstream.GW> if calls need to be dialed to gateway and If your
gateway just accepts SIP based (w/o auth) calls.

*exten=>_NXXNXXXX,1,Dial(SIP/${EXTEN}@192.168.14.???**)  *
*
*
If your gateway shows attitude in serving direct request you may need to
create user in gateway and telling asterisk to register on Grandstream as a
user and dial-out using that user like.

*exten=>_NXXNXXXX,1,Dial(SIP/${EXTEN}@gstream-user**)  *
*
*
There could be more possible alternatives to successfully dial-out using one
context for handling incoming an out going/ preferred is you create separate
contexts.

Regards,
- Sammy

On Tue, Sep 20, 2011 at 8:13 PM, Samuel Sappa <cihuy916 at gmail.com> wrote:

> Sorry if this question already asked.
> I'm implementing Voip with asterisk and grandstream gxw4108, according
> from the manual, for connecting with PSTN I must configure one SIP
> account and assign that for dialing the PSTN so in my sip.conf I
> configure SIP account(extension) :
>
> [1401]
> type=friend
> username=1401
> secret=1401
> host=dynamic
> context=my-office
> insecure=port
>
> in my extension.con
> [my-office]
> exten=>1401,1,Dial(SIP/1401,60)
> exten=>_NXXNXXXX,1,Dial(SIP/${EXTEN}@1401)
>
> but the problem is when I dial the number for the PSTN it's run/dial
> on internal extension, from the asterisk guru website it's wrote to
> separate the incoming and out going
> in sip.conf
> [1401]
> type=friend
> username=1401
> secret=1401
> host=dynamic
> context=my-office-in
> insecure=port
>
> [1401]
> type=friend
> username=1401
> secret=1401
> host=dynamic
> context=my-office-out
> insecure=port
>
> in extension.conf
> [my-office-in]
> exten=>1401,1,Dial(SIP/1001,60)
> [my-office-out]
> exten=>_NXXNXXXX,1,Dial(SIP/${EXTEN}@1401)
>
> but still with this won't work too
> My question it's
> Is it my configuration true/correct or if there any other way for my
> problem
> I'm using 1 Stage Dialing and the asterisk server and Grandstream
> using different IP Address 192.168.101.xxx (for asterisk server) and
> 192.168.14.xxx (for grandstream gateway)
> thank you for helping
> --
> Regards
> Samuel Sappa,
>
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> New to Asterisk? Join us for a live introductory webinar every Thurs:
>               http://www.asterisk.org/hello
>
> asterisk-users mailing list
> 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/20110921/5cf9c39e/attachment.htm>


More information about the asterisk-users mailing list