Kai Militzer
2004-Jul-12 05:57 UTC
[Asterisk-Users] How to make * don't strip the leading 0
Hi folks! Is it possible to tell asterisk not to strip the leading 0 of *incoming* MSNs? I use asterisk with i4l and whenever I get a call from an long-distance party, the leading 0, which should be there according the german numbering, is not. So if I get a call from a mobile phone 0177-1234567 should be displayed, but 177-1234567 is displayed. I double checked if I've forgotten to remove an option to strip the first digit of incoming calls and found nothing. The wiki and the mailinglist archives can't enlight me either, why asterisk behaves like this, or how I can turn it off. So if someone could give me a hint, I would be very delighted! Best regards Kai -- Kai Militzer WESTEND GmbH | Internet-Business-Provider Technik CISCO Systems Partner - Authorized Reseller L?tticher Stra?e 10 Tel 0241/701333-11 km@westend.com D-52064 Aachen Fax 0241/911879
Roger Schreiter
2004-Jul-12 06:28 UTC
[Asterisk-Users] How to make * don't strip the leading 0
Kai Militzer schrieb: ...> Is it possible to tell asterisk not to strip the leading 0 of *incoming* > MSNs? I use asterisk with i4l and whenever I get a call from an > long-distance party, the leading 0, which should be there according the > german numbering, is not. So if I get a call from a mobile phone > 0177-1234567 should be displayed, but 177-1234567 is displayed. I doubleHi, that's rather your ISDN equipment than asterisk, who strips the leading 0. ("National numbering scheme") Look at isdnrep! Probably you'll find the same numbers without leading 0 there. I4L forwards those 0-less numbers to asterisk, and asterisk takes them as they are. chap_capi for my AVM Fritz card does display numbers with leading 0. I have currently the same problem with my E1 card and I wonder, how I can get asterisk to append a leading 0 before forwarding the call, for my IP phones show the "correct" callee number with leading 0. Roger.
Senad Jordanovic
2004-Jul-12 06:53 UTC
[Asterisk-Users] How to make * don't strip the leading 0
Kai Militzer wrote:> Hi folks! > > Is it possible to tell asterisk not to strip the leading 0 of > *incoming* MSNs? I use asterisk with i4l and whenever I get a call > from an long-distance party, the leading 0, which should be there > according the german numbering, is not. So if I get a call from a > mobile phone 0177-1234567 should be displayed, but 177-1234567 is > displayed. I double checked if I've forgotten to remove an option to > strip the first digit of incoming calls and found nothing. > > The wiki and the mailinglist archives can't enlight me either, why > asterisk behaves like this, or how I can turn it off. So if someone > could give me a hint, I would be very delighted! > > Best regards > > KaiCoud it be that your provider is striping "0"?
Shaun Ewing
2004-Jul-12 07:22 UTC
[Asterisk-Users] How to make * don't strip the leading 0
On Mon, 12 Jul 2004 14:57:42 +0200, Kai Militzer <km@westend.com> wrote:> Hi folks! > > Is it possible to tell asterisk not to strip the leading 0 of *incoming* > MSNs? I use asterisk with i4l and whenever I get a call from an > long-distance party, the leading 0, which should be there according the > german numbering, is not. So if I get a call from a mobile phone > 0177-1234567 should be displayed, but 177-1234567 is displayed. I double > checked if I've forgotten to remove an option to strip the first digit > of incoming calls and found nothing. > > The wiki and the mailinglist archives can't enlight me either, why > asterisk behaves like this, or how I can turn it off. So if someone > could give me a hint, I would be very delighted!You could try adding the leading zero. For example, I have: [incoming-isdn] [incoming-isdn] exten => msn,1,NoOp exten => msn,2,SetCallerID(0${CALLERIDNAME} <00${CALLERIDNUM}>) exten => msn,3,GotoIf,$[${CALLERIDNUM} = 000]?200:4 exten => msn,4,NoOp exten => msn,5,Goto(local-extensions,7000,1) exten => msn,200,SetCallerID(Private <>) exten => msn,201,Goto(4) (my number has been replaced with msn) This adds the leading 0 to calleridname, and 00 to calleridnum (so it included the '0' needed to dial externally). It has an unfortunate side effect of setting the caller ID number to '000' if the telco doesn't send any caller ID (which also happens to be the emergency number here in Australia), so I have the GotoIf to catch that condition and replace it with Private. I don't know how that works for incoming International calls (never tested), but it works just fine for national calls. -Shaun
Apparently Analagous Threads
- R: How to make * don't strip the leading 0
- Fax over SIP Problems (sorry for this topic ...)
- One way audio problem on gateway to PSTN after some time, no NAT involved
- Call Transfer over Fritz!-ISDN Card with i4l does not work
- transcoding g723 or g729 on asterisk