get the number from "TO" OR the "URI"
Moderator: Brekeke Support Team
get the number from "TO" OR the "URI"
1. Brekeke Product Name and Version: 2.4.8.6/286.3
2. Java version: 1.6.0_31
3. OS type and the version: Windows Server 2008 R2
4. UA (phone), gateway or other hardware/software involved:
5. Your problem: i need to be able to get the phone number from the TO field as well as from the URI
sometimes carriers will send us the calls to the Brekeke using the number in the TO field and some times int he URI (when they send it in the URI the TO has a differen tnumber, the LRN)
this is my current dial plan examples
Matching Patterns:
$request=^INVITE
To=sip:(.+)@
To=sip:2124588888
Deploy Patterns:
$auth=false
To=sip:%1@192.168.1.15
$session=failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
i want to see the 2124558888 if its int he TO field or int he URI field (doesnt have to be both)
2. Java version: 1.6.0_31
3. OS type and the version: Windows Server 2008 R2
4. UA (phone), gateway or other hardware/software involved:
5. Your problem: i need to be able to get the phone number from the TO field as well as from the URI
sometimes carriers will send us the calls to the Brekeke using the number in the TO field and some times int he URI (when they send it in the URI the TO has a differen tnumber, the LRN)
this is my current dial plan examples
Matching Patterns:
$request=^INVITE
To=sip:(.+)@
To=sip:2124588888
Deploy Patterns:
$auth=false
To=sip:%1@192.168.1.15
$session=failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
i want to see the 2124558888 if its int he TO field or int he URI field (doesnt have to be both)
Code: Select all
sometimes carriers will send us the calls to the Brekeke using the number in the TO field and some times int he URI (when they send it in the URI the TO has a differen tnumber, the LRN)
and which number do you want to use for sending the call to?
do you want to use 2124588888 in deploy pattern no matter what number is used in the INVITE from caller?
or caller send INVITE request and the number in the INVITE request line is different from the number in the INVITE To header
if so, which number you want to use in deploy pattern?
the number shown in the INVITE request line or the number in the INVITE To header
or caller send INVITE request and the number in the INVITE request line is different from the number in the INVITE To header
if so, which number you want to use in deploy pattern?
the number shown in the INVITE request line or the number in the INVITE To header
i want to check the Number thats in this line "To=sip:2124588888 "
so if i have
"To=sip:2124447777" then the TO or the URI can have 2124447777
if i have
"To=sip:6178888888" then the TO or URI can have 6178888888
and when i Deploy the call, i want to show the 2124447777 or 6178888888 depends on the "To=sip:xxxxxxxxx"
so if i have
"To=sip:2124447777" then the TO or the URI can have 2124447777
if i have
"To=sip:6178888888" then the TO or URI can have 6178888888
and when i Deploy the call, i want to show the 2124447777 or 6178888888 depends on the "To=sip:xxxxxxxxx"
Matching Patterns:
$request=^INVITE
To=sip:(.+)@
Deploy Patterns:
$auth=false
To=sip:%1@192.168.1.15
$session=failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
does above dial plan rule work as you need?
how many To headers in the caller INVITE?
$request=^INVITE
To=sip:(.+)@
Deploy Patterns:
$auth=false
To=sip:%1@192.168.1.15
$session=failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting=5
&failover.timer.provisional=360
$continue=false
does above dial plan rule work as you need?
how many To headers in the caller INVITE?
I've tested it in BSS v3.1.7.8
The rule matches if 2124588888 is in To-URI or Request-URI.
[Matching Patterns]
$request = ^INVITE
"2124588888" = (.+)
$getUri($request) = sip:(\d*)
$getUri(To) = sip:(\d*)
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
[Deploy Patterns]
$auth = false
To = sip:%1@192.168.1.15
$session = failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting = 5
&failover.timer.provisional = 360
$continue = false
The rule matches if 2124588888 is in To-URI or Request-URI.
[Matching Patterns]
$request = ^INVITE
"2124588888" = (.+)
$getUri($request) = sip:(\d*)
$getUri(To) = sip:(\d*)
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
[Deploy Patterns]
$auth = false
To = sip:%1@192.168.1.15
$session = failover sip:%1@192.168.1.15 sip:%1@192.168.1.16
&failover.timer.inviting = 5
&failover.timer.provisional = 360
$continue = false
i just had a chance to reach out to the carrier that we had an issue with
they sent us the call, the phone number was only in the Request-Line: INVITE sip:phonenumber@ip:port SIP/2.0
in the To field it had a different number <sip:wrongnumber@ip>
and the brekeke rejected the call, i assume because it didnt find the phonenumber in the URI?
is that above rule you asked me to use looking for the phonenumber in the To OR in the Request-URI ?
they sent us the call, the phone number was only in the Request-Line: INVITE sip:phonenumber@ip:port SIP/2.0
in the To field it had a different number <sip:wrongnumber@ip>
and the brekeke rejected the call, i assume because it didnt find the phonenumber in the URI?
is that above rule you asked me to use looking for the phonenumber in the To OR in the Request-URI ?
Yes
---------------------------------------
$request = ^INVITE
"phonenumber" = (.+)
$getUri($request) = sip:(\d*)
$getUri(To) = sip:(\d*)
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
---------------------------------------
The above definition will be fulfilled if phonenumber is shown in Request-Line or To header
---------------------------------------
$request = ^INVITE
"phonenumber" = (.+)
$getUri($request) = sip:(\d*)
$getUri(To) = sip:(\d*)
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
---------------------------------------
The above definition will be fulfilled if phonenumber is shown in Request-Line or To header
> so i understand and learn, can you explain to me what each line does?
$request = ^INVITE
if Request-Line is INVITE
"2124588888" = (.+)
2124588888 --> %1
$getUri($request) = sip:(\d*)
Request-URI's digits --> %2
$getUri(To) = sip:(\d*)
To-URI's digits --> %3
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
if %1 is same as %2 -or- %2 is same as %3
$request = ^INVITE
if Request-Line is INVITE
"2124588888" = (.+)
2124588888 --> %1
$getUri($request) = sip:(\d*)
Request-URI's digits --> %2
$getUri(To) = sip:(\d*)
To-URI's digits --> %3
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
if %1 is same as %2 -or- %2 is same as %3
$request = ^INVITE
if Request-Line is INVITE
"2124588888" = (.+)
2124588888 --> %1
$getUri($request) = sip:(\d*)
Request-URI's digits --> %2
$getUri(To) = sip:(\d*)
To-URI's digits --> %3
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
if %1 is same as %2 -or- %2 is same as %
what i want the rule to be, if %1 is same as %2 or %3
if Request-Line is INVITE
"2124588888" = (.+)
2124588888 --> %1
$getUri($request) = sip:(\d*)
Request-URI's digits --> %2
$getUri(To) = sip:(\d*)
To-URI's digits --> %3
$or($str.equals("%1","%2"),$str.equals("%1","%3")) = true
if %1 is same as %2 -or- %2 is same as %
what i want the rule to be, if %1 is same as %2 or %3