Moderator: Brekeke Support Team
Pretorean
Posts: 8 Joined: Tue Oct 31, 2006 1:22 am
Post
by Pretorean » Tue Feb 24, 2009 11:53 am
1. Brekeke Product Name and version: 1.5.2.0/172
2. Java version: 1.4.2_05
3. OS type and the version:Linux 2.4.20-28.8smp
4. UA (phone), gateway or other hardware/software involved:
5. Select your network pattern from
http://www.brekeke-sip.com/bbs/network/ ... terns.html : 9
6. Your problem: I want to forward a call to a certain IP, and the calling number has the '+' sign in front of it. How can I remove or replace the '+' before forwarding the call?
thanks
hope
Posts: 862 Joined: Tue Jan 15, 2008 4:08 pm
Post
by hope » Tue Feb 24, 2009 2:31 pm
matching:
$request=^INVITE
To=sip:+(calling number)@
Deploy
To=sip:%1@destinationIP
james
Posts: 501 Joined: Mon Dec 10, 2007 12:56 pm
Post
by james » Tue Feb 24, 2009 2:51 pm
All,
I think "To=sip:+(calling number)@ " shoud be
To=sip:\+(calling number)@
this is because "+" has a special meaning in regex so we need to escape it with "\".
Pretorean
Posts: 8 Joined: Tue Oct 31, 2006 1:22 am
Post
by Pretorean » Wed Feb 25, 2009 8:28 am
I am talking about calling number, so To is not the place to do it.
Also what I am looking is a conditional: if '+' exists then translate it, otherwise don't touch the calling number.
hope
Posts: 862 Joined: Tue Jan 15, 2008 4:08 pm
Post
by hope » Wed Feb 25, 2009 11:08 am
if calling is caller then
matching:
$request=^INVITE
From=sip:\+(.+)@(.+)
Deploy
From=sip:%1@%2
$replaceuri=true
James:
Thank you for the correction.