Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


Regs

4066 posts

Uber Geek

Trusted
Snowflake

#29700 15-Jan-2009 20:31
Send private message

i have a SIP gateway device connected to an asterisk box which is sending all numbers in as +5000 (extension) +095551234 (e.g. auckland) +0275551234 (e.g. mobile).  How do I tell asterisk to strip/ignore the "+" on the number?





Create new topic
sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #189851 15-Jan-2009 20:38
Send private message

Asterisk is receiving the numbers from an external SIP provider with the + at the front? What provider is this?



Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #190082 16-Jan-2009 23:32
Send private message

sbiddle: Asterisk is receiving the numbers from an external SIP provider with the + at the front? What provider is this?


its not an external provider - i have two sip gateways sending numbers in with the + at the start.  One is a quintum tenor sip/analog fxo/fxs box, the other is a Microsoft OCS server




sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #190109 17-Jan-2009 06:48
Send private message

Something like this

exten => _.,1,Set(CALLERID(num)=${CALLERID(num):1})
exten => _.,n,Goto(from-trunk,${EXTEN},1)

Will return the CALLERID field with all characters after the 1st digit which is a + in this case.

This needs to be put somewhere in your incoming trunk settings or you could create a customer trunk such as the following which you could refer to as trunk-stripfirst

[from-trunk-stripfirst]
exten => _.,1,Set(CALLERID(num)=${CALLERID(num):1})
exten => _.,n,Goto(from-trunk,${EXTEN},1)




Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #190241 17-Jan-2009 21:08
Send private message

thanks, i'll give that a try.

I was hoping there was a nice simple setting I could put in the sip trunk file such as "trunk-prefix=+" or an easy way to handle it in the dialplan but after a bunch of searching I was getting nowhere

i'm pretty sure I could config the quintum so that the + wasnt sent, but i'm not so sure I can get the ocs box to do the same




sbiddle
30853 posts

Uber Geek

Retired Mod
Trusted
Biddle Corp
Lifetime subscriber

  #190243 17-Jan-2009 21:12
Send private message

Are you using pure Asterisk or a distro such as trixbox? Assuming both OCS and your gateway use the same incoming context then the change is fairly simple.

LennonNZ
2459 posts

Uber Geek

ID Verified
Trusted

  #190245 17-Jan-2009 21:19
Send private message

sbiddle: Are you using pure Asterisk or a distro such as trixbox? Assuming both OCS and your gateway use the same incoming context then the change is fairly simple.


why don't you try and get the other devices "fixed" so they send proper CID? instead of trying to fix something else becuase the 1st device is broken?

Thanks
:)


Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #190246 17-Jan-2009 21:19
Send private message

sbiddle: Are you using pure Asterisk or a distro such as trixbox? Assuming both OCS and your gateway use the same incoming context then the change is fairly simple.


i'm using elastix with the asterisk component upgraded to 1.6 (to handle SIP over TCP).  The freepbx was also upgraded to latest version.  As such a bunch of other stuff is broken but i'm not worried about those bits :)

I havent configured anything outside of the elastix interface for teh sip trunks and extensions.  I have a callplus sip trunk (for pstn), a quintum and ocs sip trunk (for interconnectivity) and a bunch of extensions in the 5xxx range.

in an earlier test I used pure asterisk on top of centos and built the sip.conf and extensiosn.conf files manually which meant that I built the suport for the + directly into these files in that case (and it worked ok). 




 
 
 

Move to New Zealand's best fibre broadband service (affiliate link). Free setup code: R587125ERQ6VE. Note that to use Quic Broadband you must be comfortable with configuring your own router.
Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #190247 17-Jan-2009 21:20
Send private message

LennonNZ:
sbiddle: Are you using pure Asterisk or a distro such as trixbox? Assuming both OCS and your gateway use the same incoming context then the change is fairly simple.


why don't you try and get the other devices "fixed" so they send proper CID? instead of trying to fix something else becuase the 1st device is broken?

Thanks
:)



i always thought that E.164 included the +..... to me, asterisk is broken :P




LennonNZ
2459 posts

Uber Geek

ID Verified
Trusted

  #190249 17-Jan-2009 21:31
Send private message

CallerID != E164.

E164 is a routing protocol.


Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #190253 17-Jan-2009 21:53
Send private message

LennonNZ: CallerID != E164.

E164 is a routing protocol.



well its not the CallerID thats the problem for me, its the destination number.  asterisk is receiving a call addressed to +64275551234 which it then needs to route out the callplus sip trunk (or if its a +5XXX then route to an asterisk extension)

note: if i send calls the other way it works fine... ocs and the quintum box route them appropriately. i  have to prepend the + to the normalised number though as it leaves asterisk.




Regs

4066 posts

Uber Geek

Trusted
Snowflake

  #194016 4-Feb-2009 15:14
Send private message

with the release of teh R2 version of Microsoft OCS i can now get around this pesky problem with ease:

http://technet.microsoft.com/en-us/library/dd441273(office.13).aspx
Handling E.164 Numbers in Outbound Calls
By default, E.164 numbers in the Request Uniform Resource Identifier (URI) for outgoing calls are prefixed with a plus sign (+). Most Private Branch eXchanges (PBXs) process such numbers without problem. Certain PBXs, however, do not accept numbers that are prefixed with a plus sign.

To ensure interoperability with these PBXs, Mediation Server has a new WMI Boolean setting called RemovePlusFromRequestURI, which has two values: TRUE and FALSE. If your PBX does not accept numbers prefixed with a plus sign, the value for the WMI setting should be set to TRUE, which causes Mediation Server to strip the plus sign from a Request URI for outbound calls. The default is FALSE, which causes Mediation Server to pass the outgoing INVITE’s Request URI, To URI, and From URI unchanged.





Create new topic





News and reviews »

Gen Threat Report Reveals Rise in Crypto, Sextortion and Tech Support Scams
Posted 7-Aug-2025 13:09


Logitech G and McLaren Racing Sign New, Expanded Multi-Year Partnership
Posted 7-Aug-2025 13:00


A Third of New Zealanders Fall for Online Scams Says Trend Micro
Posted 7-Aug-2025 12:43


OPPO Releases Its Most Stylish and Compact Smartwatch Yet, the Watch X2 Mini.
Posted 7-Aug-2025 12:37


Epson Launches New High-End EH-LS9000B Home Theatre Laser Projector
Posted 7-Aug-2025 12:34


Air New Zealand Starts AI adoption with OpenAI
Posted 24-Jul-2025 16:00


eero Pro 7 Review
Posted 23-Jul-2025 12:07


BeeStation Plus Review
Posted 21-Jul-2025 14:21


eero Unveils New Wi-Fi 7 Products in New Zealand
Posted 21-Jul-2025 00:01


WiZ Introduces HDMI Sync Box and other Light Devices
Posted 20-Jul-2025 17:32


RedShield Enhances DDoS and Bot Attack Protection
Posted 20-Jul-2025 17:26


Seagate Ships 30TB Drives
Posted 17-Jul-2025 11:24


Oclean AirPump A10 Water Flosser Review
Posted 13-Jul-2025 11:05


Samsung Galaxy Z Fold7: Raising the Bar for Smartphones
Posted 10-Jul-2025 02:01


Samsung Galaxy Z Flip7 Brings New Edge-To-Edge FlexWindow
Posted 10-Jul-2025 02:01









Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.