[SOLVED] Call a 4 digits external number

I don’t understand what you’re saying about moving the rules down into an other included context…
Which rules ?
These ones :

exten => _X.,1,Dial(SIP/${EXTEN}@ovh-out-250)

In an other context ?
Must I create an other context for each phone I’ll be using ?

I may be new to this but I’m sure there is an easier way to pull this off right ? :s

Thanks in advance.

One context for each different outgoing routing. You seem to have rather a large number of those, for some reason.

Basically, I don’t know why your dialplan is so complex, so I can only advise based on what I see, not on what is is actually trying to achieve.

Neither do I. Why is it so complex ? Because the guy who was working on this before I came in this company was a messy worker.
So now I try to work as good as possible to make our phoning system much more adapted to our needs.

So I’ll need to create an context for external calls in addition to a context for internal calls ?

Yes the best practice is to separate these even though it can add some complexity to the dialplan. Debugging in a broken out environment sometimes can lead to finding a solution faster :smiley:

I think the OP is asking how to use 0 for external lines, so instead of dialing 1234 he would dial 01234 to call 1234 on some trunk. If I understand the question correctly it should be something like:

exten => _0X.,1,Dial(SIP/${EXTEN:1}@ovh-out-258)

SGM : It’s exactly what I want to do !

But, the 0 in “_0X.” doesn’t work for me.
What does the “:1” mean in “EXTEN:1” ?

Because I don’t have this on my dialplan…

EDIT : That worked for me, but still, I tried on only one phone. is the “:1” a unique number or is it just here to make these types of call possible ?
Ok, I’ve found that it’s the string position for the call number.

Thanks a lot SGM

:1 means skip the first digit in the the value of ${EXTEN}. More generally you can have :n:m, where n is the number of digits to skip and m the number to include, after that.

If this is what you wanted to do, it wasn’t at all clear from the original question.

Maybe it’s not all clear, but you helped me anyway.
I can mention that I’m french and I may have a good english for a normal conversation, explaining my problem with technical terms was not easy at all.

Thanks anyway, it’s working fine :smiley: