Jump to content

Add prefix to replacement if only 7 digits


voipguy

Recommended Posts

Hi,

 

We are using version 4.0.1.3446, centos linux 64 bit.

 

In our dial plan we have:

Pattern: \*([0-9]*)@.*

Replacement: sip:*\1@\d;user=phone

We also made sure feature code 67 is not being used.

 

If the customer only dials a local 7 digit number 638-1234 we want to add a default prefix of 416 so the dial plan sends to our proxy server 4166381234 but we don't know how to do this when the customer uses *67.

 

So if a customer just enters *676381234 how do we get the dialplan to send *674166381234 to our proxy server?

 

Now here's the second part - if the customer enters more then 7 digits after the *67 then we don't want to prefix it with 416 in the replacement, we just want to send what ever they entered. So if they dial *6716046381234 the dial plan would send *6716046381234 to our proxy server the same thing if they dial *679056381234 we want the dial plan to send *679056381234 to our proxy server.

 

Basicaly anything entered that's greater then 7 digits after the *67 then don't add the default 416 prefix, just send what they entered.

 

Anyone know how to do this?

 

Thanks

Link to comment
Share on other sites

Yepp, that's when things get tricky. I would vote for making *67 a way for indicating anonymous calls and don't just transparently treat it as any star code. I think that is what customers actually want.

 

Hi pbxnsip,

 

I don't understand your response?

 

We do use *67 for indicating anonymous calls. If a customer wants to call a telephone number but not have his number show up on the destinations call display phone then my customer picks up the phone and dials the number like this *6714166381234 and PBXNSIP sends *6714166381234 to my proxy server - my proxy server see's the *67 and then changes the customers out going call display name and number to anonymous and then dials the destination number 14166381234 and on that persons call display phone it shows anonymous or private name private number.

 

Does anyone know how to create the dial plan in my first post?

 

Thanks

Link to comment
Share on other sites

I don't understand your response?

 

There was a discussion going on about this topic also in another thread. The point is that the PBX already supports the "hiding" of the caller-ID. There is a RFC for that, and the PBX supports it. Now there are two problems:

 

1. On the trunk side, it is a fact that many providers (especially those who offer FXO) expect a prefix in front of the number that should be dialled. This prefix is usually *67. In addition to the RFC method, the trunk should support this way of indicating anonymous calls.

 

2. On the extension side there is a similar problem. Although there are some SIP phones that support the RFC method, it is usually difficult to use and easier to just dial *67xxx as well. The PBX should not think that this is a star code, it should treat this call as if it would be the indication of an anonymous call.

 

Does anyone know how to create the dial plan in my first post?

 

The pattern would be \*67([0-9]+)@.* and the replacement sip:\*67\1@\r;user=phone.

Link to comment
Share on other sites

There was a discussion going on about this topic also in another thread. The point is that the PBX already supports the "hiding" of the caller-ID. There is a RFC for that, and the PBX supports it. Now there are two problems:

Hi pbxnsip,

 

I'm aware of the other thread regarding the *67, I was apart of it.

 

I don't see any problems with the *67 design.

 

1. On the trunk side, it is a fact that many providers (especially those who offer FXO) expect a prefix in front of the number that should be dialled. This prefix is usually *67. In addition to the RFC method, the trunk should support this way of indicating anonymous calls.

 

This is not an issue - we use a proxy server - if we were going to terminate the call on a FXO gateway then we wouldn't strip the *67 - we would send the whole *67NUMBER to the FXO gateway - then the FXO line would block the caller id.

 

2. On the extension side there is a similar problem. Although there are some SIP phones that support the RFC method, it is usually difficult to use and easier to just dial *67xxx as well. The PBX should not think that this is a star code, it should treat this call as if it would be the indication of an anonymous call.

 

Since PBXNSIP modified it's code per the other thread - the PBXNSIP doesn't think it's a star code because we removed the feature code 67 from the feature list - when the extension or SIP phone dials *67NUMBER the PBXNSIP knows *67 is not a feature code anymore so send the whole string to the dialplan.

 

We are useing the hosted version of PBXNSIP - we can't have PBXNSIP block the call then send it to our proxy server because then our proxy server doesn't know who to bill for the call - but if PBXNSIP doesn't block the call and sends our proxy server the whole string *67NUMBER then our proxy server knows to block the number before sending to the destination provider or if sending call to a FXO gateway send the *67NUMBER.

 

The pattern would be \*67([0-9]+)@.* and the replacement sip:\*67\1@\r;user=phone.

 

The pattern and replacement you provided doesn't do what I'm asking for - if the user only enters *67 and 7 digits then we want the replacement to add default areacode 416 after the *67 - so if user dials *676381234 we want PBXNSIP to send *674166381234.

 

Now if the user dialed more then 7 digits after the *67 then just send whatever they entered and don't prefix with 416. This would probally need two entries in the dial plan but I'm not sure what they would be.

 

Right now we allow 7 digit dialing but always send at least 10 digits to the proxy server. This is the dial plan that allows 7 digit dialing but we don't know how to also make it work if user enters *67.

 

7 digit dialing

Pattern: 2xxxxxx|3xxxxxx|4xxxxxx|5xxxxxx|6xxxxxx|7xxxxxx|8xxxxxx|9xxxxxx|

Replacement: 416*

 

Now if user picks up phone and dials 6381234 the above dial plan will send 4166381234

 

Now how do we do this with *67 ? if they dial *676381234 we want to send *674166381234

 

Thanks

 

Thanks

Link to comment
Share on other sites

Well, you can use several entries, one (or more) for the 7-digit dialling and another one for the *67 processing. Anyway, we need to work on the *67 topic so that this becomes a lot easier.

 

 

Hi pbxnsip,

 

The *67 topic is perfectly clear. I don't have a problem with the whole *67 topic....I'm just trying to put together this dialing plan.

 

If you don't know how to do the requested dial plan entry then please just let me know so I can move on and maybe I'll contact someone else in PBXNSIP to find the answer.

 

Thanks.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...