[Amportal-users] prefix incoming calls with 0

Hi,

I want to prefix all incoming calls with a 0. I generally know what to do,

add a line like this one:
exten => s,1,SetCIDNum,0${CALLERIDNUM}

in the context of all incoming calls. I have it tested and found working on a
very basic selfmade dial plan, but where do I add this into the frepbx
dialplan.

kind regards
Sebastian


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

Hi,

[email protected] wrote:

[quote]
itlistuser at rapideye.de wrote:

Hi,

I want to prefix all incoming calls with a 0. I generally know what to do,

add a line like this one:
exten => s,1,SetCIDNum,0${CALLERIDNUM}

in the context of all incoming calls. I have it tested and found working
[/quote]on a

[quote] > very basic selfmade dial plan, but where do I add this into the frepbx

dialplan.

kind regards
Sebastian

I don’t know why you want to do that. If you receive a call from Wien for
[/quote]example you would get 187654321 as incuming number. If you want to store it
for the future use in a database, keep it that way.
I want all numbers that are coming from external to be prefixed with a 0
because to dial out, all numbers have to be prefixed with 0. the problem is
the following:
when calls come in from external, right now it is impossible to easily
callback the caller, because the 0 is missing to dial out. But that would work
when the 0 were added to the incoming call before the number were sent to the
callee phone.

[quote] It gets interesting while dialling out:
set the outgoing line to always add a 0 -if it has not been dialled
[/quote]manually- like

[quote]
0+X.

which would send
0187654321 if you dialled 187654321 or 0187654321 regardless.

[/quote]The users shall intentionally prefix each outgoing calls with a 0, not
prefixing a call with 0 is not intended to work at all.

[quote] In most European countries you can not rely on the US xxxyyyzzzz notations

[/quote]yeah, therefore I need to prefix the incoming calls, regardless of the number
which dialled.

I’ll try to add that line as kgtee suggested in another mail.

kind regards
Sebastian


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642


Amportal-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amportal-users

Post generated using Mail2Forum (http://www.mail2forum.com)

I would think it should be added in the [from-pstn] & [from-zaptel] contexts in extensions.conf file. I am not sure if this will screw up other parts of freePBX codes. So, remember to undo it if something unpleasant happens.

[quote=“itlistuser at rapideye.de”]Hi,

I want to prefix all incoming calls with a 0. I generally know what to do,

add a line like this one:
exten => s,1,SetCIDNum,0${CALLERIDNUM}

in the context of all incoming calls. I have it tested and found working on a
very basic selfmade dial plan, but where do I add this into the frepbx
dialplan.

kind regards
Sebastian
[/quote]

I don’t know why you want to do that. If you receive a call from Wien for example you would get 187654321 as incuming number. If you want to store it for the future use in a database, keep it that way.

It gets interesting while dialling out:
set the outgoing line to always add a 0 -if it has not been dialled manually- like

0+X.

which would send
0187654321 if you dialled 187654321 or 0187654321 regardless.

In most European countries you can not rely on the US xxxyyyzzzz notations

xxx=area code
yyy=exchange
zzzz=extension

as in (212)555-1234.

You can in such cases easily deduct if the called number has an area code or not. If it is 7 digits long, you prepend the number with 1 and the local prefix (212) and if its 10 difits long add the 1 only.

1212+NXXNNNN
1+XXXNXXNNNN

But:
If your town for example has always 5 digit phone numbers (like Gaenserndorf (02282) you can do something like that:

02282+XXXXX ; <-local number, saves dialing the area code, adds automatically
0+X. ; <- any other number containing area code. Prepend a 0.

In any case, returning to your question: the problem arises exclusively when dialling out. Why do you want the 0 to prepend the INCOMING number?

günter