Brekeke Forum Index » Brekeke PBX Forum

Post new topic   Reply to topic
Skip automatic changing To, From domain
Author Message
SarunyuP
Brekeke Member


Joined: 24 Oct 2018
Posts: 19
Location: Thailand

PostPosted: Mon Mar 16, 2020 10:19 pm    Post subject: Skip automatic changing To, From domain Reply with quote

1. Brekeke Product Name and Version:
Brekeke PBX, Version 3.8.6.4, Pro
WebRTC, Push Notification

2. Java version:
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)

3. OS type and the version:
Red Hat Enterprise Linux Server release 6.10
Linux version 2.6.32-754.10.1.el6.x86_64

4. UA (phone), gateway or other hardware/software involved:
-

5. Your problem:
Is there a solution to prevent a brekeke pbx change a domain in To and From sip header?
Because of my UA phone will check and create a new chat room object if the domain is difference. I've tried to use a dial plan but it's not working.

This is the information that brekeke pbx change it right before sending message to my UA.

session.34: information:
starttime = 03/17/20 11:22:45.020
timestamps = 03/17/20 11:22:45.011 (0) 03/17/20 11:22:45.011 (4) 03/17/20 11:22:45.015
spiral-hop = 1
dispatcher-id = 1
plugin = com.brekeke.net.sip.sv.session.plugins.SingleRequest
request = MESSAGE sip:boy3@iot-brekeke-wssip.ais.co.th SIP/2.0
rulename = registered=sip:boy3(sip:boy3@125.24.170.242:62788/UDP) & Change host & Message Notification
org:From: = sip:boy1@13.228.213.46
new:From: = sip:boy1@iot-brekeke-wssip.ais.co.th
org:To: = sip:boy3@iot-brekeke-wssip.ais.co.th
new:To: = sip:boy3@13.228.213.46
src:addr/port = 125.24.170.242:58958 (UDP global-addr)
src:interface = 13.228.213.46:5060 (UDP global-addr)
dst:addr/port = 125.24.170.242:62788 (UDP global-addr)
dst:interface = 13.228.213.46:5060 (UDP global-addr)
uac:user-agent= SipUADemoiOS/1.1 (Entronica<E2><80><99>s iPhone 7) LinphoneSDK/4.3.1-9-g481e1de8e
uas:user-agent= SipUADemoiOS/1.1 (Entronica<E2><80><99>s iPhone 6 pluse) LinphoneSDK/4.3.1-9-g481e1de8e
Mirroring = off
mode:B2BUA = off
mode:RTPrelay = auto
mode:Auth = auto
mode:NAT = auto

session.34: phase=0: MESSAGE Initializing
session.34: System Used Memory = 16699
session.34: receive: from=UAC:125.24.170.242:58958(UDP) at 03/17/20 11:22:45.021
==============================================
MESSAGE sip:boy3@iot-brekeke-wssip.ais.co.th SIP/2.0
Via: SIP/2.0/UDP 125.24.170.242:58958;branch=z9hG4bK.4Itfn5WTd;rport=58958
From: <sip:boy1@13.228.213.46>;tag=oxFwK~zbi
To: sip:boy3@iot-brekeke-wssip.ais.co.th
CSeq: 20 MESSAGE
Call-ID: tGa2vcqMqw
Max-Forwards: 70
Supported: replaces, outbound, gruu
Date: Tue, 17 Mar 2020 04:22:43 GMT
User-Agent: SipUADemoiOS/1.1 (Entronica<E2><80><99>s iPhone 7) LinphoneSDK/4.3.1-9-g481e1de8e
Content-Type: text/plain
Content-Length: 9

hijklmnop
==============================================

session.34: content-type=text/plain plugin=com.brekeke.net.content.RawContent

session.34: pkt#=1 dp=1 st=0 sip:boy1@13.228.213.46(125.24.170.242:58958) --> sip:boy3@13.228.213.46(125.24.170.242:62788)
send="MESSAGE sip:boy3@125.24.170.242:62788;app-id=th.co.entronica.SipUA;pn-type=1;pn-tok=5c0913a3da2bd338c51cb0d50e3f2eaf4e1f885eb15daf82e1ede434b913df61;transport=udp SIP/2.0"

session.34: phase=1: MESSAGE Requesting
session.34: processtime=10

session.34: send: to=UAS:125.24.170.242:62788(UDP) at 03/17/20 11:22:45.021
==============================================
MESSAGE sip:boy3@125.24.170.242:62788;app-id=th.co.entronica.SipUA;pn-type=1;pn-tok=5c0913a3da2bd338c51cb0d50e3f2eaf4e1f885eb15daf82e1ede434b913df61;transport=udp SIP/2.0
Via: SIP/2.0/UDP 13.228.213.46:5060;branch=z9hG4bK0cd7e9c8c6c3-30-1751c7
Via: SIP/2.0/UDP 125.24.170.242:58958;branch=z9hG4bK.4Itfn5WTd;rport=58958
From: <sip:boy1@iot-brekeke-wssip.ais.co.th>;tag=oxFwK~zbi
To: sip:boy3@13.228.213.46
CSeq: 20 MESSAGE
Call-ID: tGa2vcqMqw
Max-Forwards: 69
Supported: replaces, outbound, gruu
Date: Tue, 17 Mar 2020 04:22:43 GMT
User-Agent: SipUADemoiOS/1.1 (Entronica<E2><80><99>s iPhone 7) LinphoneSDK/4.3.1-9-g481e1de8e
Record-Route: <sip:13.228.213.46:5060;ftag=oxFwK~zbi;lr>
Content-Type: text/plain
Content-Length: 9

hijklmnop
==============================================

_________________
Best Regards
=============================
Sarunyu Prasert(Boy)
Entronica Company
=============================
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Tue Mar 17, 2020 11:58 am    Post subject: Reply with quote

Do you want to keep the original From/To URIs?
Let you use following DialPlan variables in Deploy Patterns.
$replaceuri.from = false
$replaceuri.to = false

FYI:
https://docs.brekeke.com/sip/replaceuri-from
https://docs.brekeke.com/sip/replaceuri-to
Back to top
View user's profile
SarunyuP
Brekeke Member


Joined: 24 Oct 2018
Posts: 19
Location: Thailand

PostPosted: Wed Mar 18, 2020 3:07 am    Post subject: Reply with quote

I've got this error

Rule@1 [Message host change]: Error: Deploy Pattern class is not found (2): replaceuri

Dispatcher.1: Exception: 03/18/20 16:53:40.873
com.brekeke.net.sip.sv.rule.RuleSyntaxException: Deploy Pattern class is not found (2): replaceuri: (depth=6)
com.brekeke.net.sip.sv.rule.RuleMatch.execDeployPlugin (null:-1)
com.brekeke.net.sip.sv.rule.RuleMatch.dispatchVariable (null:-1)
com.brekeke.net.sip.sv.rule.RuleMatch.<init> (null:-1)
com.brekeke.net.sip.sv.rule.RuleTable.evalRule (null:-1)
com.brekeke.net.sip.sv.rule.RuleTable.getMatch (null:-1)
com.brekeke.net.sip.sv.Dispatcher.run (null:-1)

svlistener: Dispatcher.1: send response=404(1):Deploy Pattern class is not found (2): replaceuri
at 03/18/20 16:53:40.873

_________________
Best Regards
=============================
Sarunyu Prasert(Boy)
Entronica Company
=============================
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Wed Mar 18, 2020 1:25 pm    Post subject: Reply with quote

Just use $replaceuri instead of $replaceuri.from and $replaceuri.to.

$replaceuri = false
Back to top
View user's profile
SarunyuP
Brekeke Member


Joined: 24 Oct 2018
Posts: 19
Location: Thailand

PostPosted: Fri Mar 20, 2020 2:49 am    Post subject: Reply with quote

Very Happy Very Happy
Thank you. It works.

_________________
Best Regards
=============================
Sarunyu Prasert(Boy)
Entronica Company
=============================
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Fri Mar 20, 2020 10:09 am    Post subject: Reply with quote

Glad!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke PBX Forum All times are GMT - 7 Hours
Page 1 of 1