INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Asterisk 13 Outgoing call error

Asterisk 13 Outgoing call error

(OP)
Hi,

I am relatively new to Asterisk and currently getting to know the CLI.

I have a basic setup of which internal calls work without issues and I have a Sip Trunk registered with SIP Gate.

If I try to make an outbound call however I get an error that:

Call from '6001' (10.5.10.10:5060) to extension 'number dialed' rejected because extension not found in context 'from-internal'.

Please note that "number dialed is text I have replaced for the original number (for obvious reasons)- as well as my SIP credentials for the trunk which I have changed, but disregard (as it is registered).

My sip.conf and extensions.conf are below:

sip.conf:

[general]
transport=udp
udpbindaddr=0.0.0.0

register => 23edgg4d:fdd34edd@sipconnect.sipgate.co.uk/23edgg4d

[sipgate]
type = peer
host = sipconnect.sipgate.co.uk
context=from-internal
outboundproxy=sipconnect.sipgate.co.uk
port = 5060
username = 23edgg4d
fromuser = 23edgg4d
fromdomain = sipconnect.sipgate.co.uk
secret = fdd34edd
dtmfmode = rfc2833
insecure = port,invite
canreinvite = no
registertimeout = 600
disallow=all
allow=alaw
allow=ulaw

[6001]
type=friend
context=from-internal
host=dynamic
secret=unsecurepassword
disallow=all
allow=ulaw

[6002]
type=friend
context=from-internal
host=dynamic
secret=unsecurepassword
disallow=all
allow=ulaw

Extensions.conf

[from-internal]
include => sipgate

exten=>6001,1,Dial(SIP/6001,20)
exten=>6001,n,VoiceMail(6001@vm-demo,u)

exten=>6002,1,Dial(SIP/6002,20)
exten=>6002,n,VoiceMail(6002@vm-demo,u)

exten=>0XXXXXXXXXX,1,Dial(SIP/sipgate,20)

NOTE: I am not interested in installing the FreePBX GUI as I want to understand the CLI.

Thanks!

RE: Asterisk 13 Outgoing call error

Two things.

Being you, I'd change the sipgate SIP trunk password that you put into your post ASAP!!! Effectively, anyone who reads your post can use your trunk with the credentials to make calls for free until you change the password.

To match any external number dialed, you need to indicate that you specified a pattern - that is done by prefixing the pattern with an underscore. For example,
exten => _XXXXXXXXXX,1,Dial(SIP/sipgate,20) 
could be used to match any 10 digit number.

RE: Asterisk 13 Outgoing call error

(OP)
Hi Ucxguy,

See my previous post - you will see I put a note in to say ignore this, the trunk ID and password I have changed for that very reason - don't worry, I will try your suggestion however I think I may of already tried this.

Tell me - why is it saying not from internal when my settings clearly state it is.

Where does it take the context credentials from, as I can see several places but all seem to be set correctly.


Thanks.

RE: Asterisk 13 Outgoing call error

(OP)
Solved with:

exten => _X.,1,Set(CALLERID(num)=SIP-ID)
exten => _X.,n,Dial(SIP/${EXTEN}@sipgate,30,trg)
exten => _X.,n,Hangup

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close