Sip url rejected because extension not found in context 'from-internal'

Hello, I try to call my freepbx with a sip url (ex: [email protected]) and i don’t underdstand this error

[2020-05-04 14:03:06] NOTICE[24454][C-00000072] chan_sip.c: Call from ‘2126’ (85.201.XX.xx:64637) to extension ’ [email protected]’ rejected because extension not found in context ‘from-internal’.

how to solve it ?

And in the diap plan, how can i do to say if the sip is contain @sip.12voip.com use this trunk ?

Thanks a lot

Pierre

It is possible to route calls by full URI but not the intended way to use Asterisk, since it is not a SIP proxy.

I think the best way for you to make this work is to set up a trunk for sip.12voip.com, and then set up an outbound route pointing to that trunk. Specify the pattern that would go to the sip.12voip.com domain in the outbound route. Then on your phone just dial the user part (xxx) not the whole URI.

thanks a lot for your so quick answer.

I have already a trunk 12voip. But to add in the dial plan letter , i kown i can use pattern with numbers like Z* but how to encode something like .*@sip.12voip.com ?

Why do you need to specify the domain in your calling string? FreePBX uses call routing rules (outbound routes) to determine when a call should go to a certain trunk. You should not be specifying the domain from your client.

but how freepbx will know if i want to call the sip url [email protected]
to use the trunk sip.12voip.com and not an other one ?

Because you specify match patterns and/or prefixes in the outbound routes that signal FreePBX to choose that route.

More information: https://wiki.freepbx.org/display/FPG/Outbound+Routes+Module+User+Guide

To be more clear, if you have come from a SIP background: with FreePBX, stop thinking of SIP URI and start thinking more about calling as if from a phone.

and .* as a regex would be _. as a dial pattern in asterisk, (a very dangerous one) each extention can have a sip ‘alias’ to add a url destination

strange, i put in 12voip dialplan this dial patern : [email protected]
and after submit, the dial patterm becomes : …12.

Matching is only done on the user part of the URI and the leading _ is assumed if you use wildcard characters.

Or remember that Asterisk is a Back to Back SIP User Agent. and as such handles the clockwork of getting the call from one user to another.

Let’s suppose you want to send a call out on your sip.12voip.com trunk. The first step is to set up a trunk for your outgoing connection to them. You will then set up an Outbound Route that tells your system to send any call out through that trunk.

Stop thinking in terms of dialplans. You have this two-tiered structure where the Outbound Route takes the number (as dialed) and routes it to the Trunk of your choosing. The trunk definition handles the rest.

Sorry there is still something that i don’t understand.
Tell me if i am wrong
then if i call [email protected] , freepbx will know automaticly he has to use the 12voip trunk because i registred a trunk account at sip.12voip.com , correct ? But if have few trunk accounts on 12voip how can freepbx will know which one to use ?

when i try to do a sip call to [email protected] i got in the log message

Call from ‘2126’ (85.201.xx.xx:55384) to extension ‘[email protected]’ rejected because extension not found in context ‘from-internal’

what does it mean ???

Nope this is wrong. Your extension dials [email protected] and freepbx routes the call to trunk(s) using your outbound routes you have configured.

then if i got “Call from ‘2126’ (85.201.xx.xx:55384) to extension ‘[email protected]’ rejected because extension not found in context ‘from-internal’”

it is because the outbound route is not well configured , isn’t it ?

if it is that and if if it is not in the diaplan, where should i configure it ?

If you stop putting the domain on your dial string, things will make more sense and start to go a lot better.

i have 20 trunks from differents providers

if i call xxx , how freepbx will know what trunk to use ???

what is the meaning “Call from ‘2126’ (85.201.xx.xx:55384) to extension ‘[email protected]’ rejected because extension not found in context ‘from-internal’” ???

where is setup this context ?

Please read the guide I linked so you can understand the relationship between outbound routes and trunks:

1 Like

I found the solution !!

In the dial plan of the trunk 12voip.com , i have to put a special code to force to use the trunk: i added the prefix *81

then now, when i want to call [email protected], i call *81xxx and it works !!!

yesss !

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