Call rejected because extension not found in context 'internal'

I am connected to the sip server that I setup

ns574778*CLI> sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description
8007991005/8007991005 D Yes Yes 56829 Unmonitored
1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]

But I can’t call it. It says rejected because extension not found in context […]

NOTICE [497478][C-0000000f]: chan_sip.c : 26808 handle_request_invite : Call from ‘8007991005’ (:56829) to extension ‘+569********’ rejected because extension not found in context ‘internal’.

with +569******** being my mobile phone.

I tried this: Call rejected because extension not found in context 'public' but it is in public but didn’t work

What could be the problem here?

The messages means what it says. The caller is being identified with a peer whose context is “internal”. The peer requested +569********. There is no extension that matches +569******** in the context internal.

Without details of your configuration, I cannot say on which of these steps the misconfiguration lies. Whilst you would be best showing sip.conf, you would need at least “sip show peer 8007991005”, to provide enough details of the peer configuration.

If I’ve guessed your configuration correctly, you will need an extension that matches “_+.” and dials out through your means of accessing the PSTN. I don’t see any such means in your show peers, so I assume that they are connected with ISDN or an analogue line, or even a GSM dongle. Please provide details of how you achieve that PSTN connectivity.

Although not relevant to the immediate problem, could you explain why you have enabled workarounds for faulty NAT handing, and why you have turned off qualify.

PS. If you just set up this server, you should not be using chan_sip unless you have a very specific technical reason to do so. Although some service providers claim not to support chan_pjsip, they are generally wrong.

(A secondary problem with chan_sip is that a lot of the suggested configurations on the web, use deprecated options or bad practice.)

ns574778*CLI> sip show peer 8007991005

  * Name       : 8007991005
  Description  : 
  Secret       : <Set>
  MD5Secret    : <Not set>
  Remote Secret: <Not set>
  Context      : internal
  Record On feature : automon
  Record Off feature : automon
  Subscr.Cont. : <Not set>
  Language     : 
  Tonezone     : <Not set>
  AMA flags    : Unknown
  Transfer mode: open
  CallingPres  : Presentation Allowed, Not Screened
  Callgroup    : 
  Pickupgroup  : 
  Named Callgr : 
  Nam. Pickupgr: 
  MOH Suggest  : 
  Mailbox      : 
  VM Extension : asterisk
  LastMsgsSent : 32767/65535
  Call limit   : 0
  Max forwards : 0
  Dynamic      : Yes
  Callerid     : "" <>
  MaxCallBR    : 384 kbps
  Expire       : 95
  Insecure     : no
  Force rport  : Yes
  Symmetric RTP: Yes
  ACL          : No
  ContactACL   : No
  DirectMedACL : No
  T.38 support : No
  T.38 EC mode : Unknown
  T.38 MaxDtgrm: 4294967295
  DirectMedia  : No
  PromiscRedir : No
  User=Phone   : No
  Video Support: No
  Text Support : No
  Ign SDP ver  : No
  Trust RPID   : No
  Send RPID    : No
  Path support : No
  Path         : N/A
  TrustIDOutbnd: Legacy
  Subscriptions: Yes
  Overlap dial : No
  DTMFmode     : rfc2833
  Timer T1     : 500
  Timer B      : 32000
  ToHost       : 
  Addr->IP     : <here is my home ip>:56829
  Defaddr->IP  : (null)
  Prim.Transp. : UDP
  Allowed.Trsp : UDP
  Def. Username: 8007991005
  SIP Options  : (none)
  Codecs       : (ulaw)
  Auto-Framing : No
  Status       : Unmonitored
  Useragent    : Telephone 1.5.2
  Reg. Contact : sip:8007991005@<home ip>:56829;ob
  Qualify Freq : 60000 ms
  Keepalive    : 0 ms
  Sess-Timers  : Refuse
  Sess-Refresh : uas
  Sess-Expires : 1800 secs
  Min-Sess     : 90 secs
  RTP Engine   : asterisk
  Parkinglot   : 
  Use Reason   : No
  Encryption   : No
  RTCP Mux     : No



To be honest I had to search what PSTN was, but if I understood well I don’t have any hardware besides the server and my PC to connect to an analogue line

could you explain why you have enabled workarounds for faulty NAT handing, and why you have turned off qualify.

To be honest I don’t know. I was having some problems and looked online for solutions but I would lie if I say that I understood what I was doing
I am sorry, I am new in this world

The context is internal, so no surprises there.

Neither landline phones, nor mobile phones working as simple phones, are part of the internet, and whilst it is technically possible to connect to a remote SIP phone, nearly everyone strives hard to prevent that, for security reasons. You will therefore need to pay someone to provide you with a connection to either the PSTN or a mobile phone network. Mobile phone network connections generally require special hardware, but there are many internet telephony service providers who will let you connect to them using SIP and forward your call onto the PSTN, from where it can reach your mobile network in the normal way for a landline to mobile caller. You will need to pay for such services.

1 Like

Thank you for your explanation, patience and time, I really appreciate it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.