Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
How to manipulate FROM in the dialplan
Author Message
lsantos
Brekeke Junior Member


Joined: 20 Jan 2020
Posts: 9
Location: Porto Alegre - Brazil

PostPosted: Tue Jan 21, 2020 1:54 pm    Post subject: How to manipulate FROM in the dialplan Reply with quote

1. Brekeke Product Name and Version:
3.9.4.3/517-1
2. Java version:
11.05
3. OS type and the version:
Ubuntu Server 18.04
4. UA (phone), gateway or other hardware/software involved:
Zoiper 3.0
5. Your problem:
Hello, I am using multiple domains in my BSS, however when making calls the BSS is sending FROM the number + the domain, and with that the PSTN refuses the call.

How can I manipulate my FROM in my dialplan? I tried several modus to no avail.
Example:
5135000101@teste - wrong (Domain)
5135000101 - right way

Thanks.
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Tue Jan 21, 2020 6:33 pm    Post subject: Reply with quote

Do you want to remove a domain name part from the From URI?
Is it SIP-URL? or Tel-URL?

How does the SIP server connect to PSTN? Are you using an FXO gateway? or are you using a telephony provider?
Back to top
View user's profile
lsantos
Brekeke Junior Member


Joined: 20 Jan 2020
Posts: 9
Location: Porto Alegre - Brazil

PostPosted: Wed Jan 22, 2020 4:37 am    Post subject: Reply with quote

I work at a telephone provider.
BSS connects to a BorderNet 4000 - Dialogic, however it cannot receive @domain together with FROM.

I tried to manipulate the dial plan as follows:

Deploy Patterns
From = %{$ str.replace ("%{From}", "@test", "")}
To = sip:% 1@IP-Dialogic:5000

However, this way he only sends @test, I just need the opposite.
I'm checking out other ways.

Ideas are welcome.
Back to top
View user's profile
lsantos
Brekeke Junior Member


Joined: 20 Jan 2020
Posts: 9
Location: Porto Alegre - Brazil

PostPosted: Wed Jan 22, 2020 6:29 am    Post subject: Reply with quote

We are using domain resource at brekeke, by this ways we have 2 domains, there are: flytelecom and lowtelecom

We are registering the user 111@flytelecom with softphone zoiper at brekeke from ip 172.17.108.122.

When we trying to make calls with this user, the From becomes at brekeke:

111%40flytelecom@172.17.108.122

Before forward to another sip server that will make the call externaly, we need to remove the string "%40flytelecom" from de From field, sending the From with 111@172.17.108.122

We tried by this way:

Matching Patterns
$request = ^INVITE
To = sip:(.+)@
$str.contain($getSIPuser(From),"%40flytelecom") = true

Deploy Patterns
From/uri = sip:%{$str.remove(%{$From},"%40flytelecom")}@%{$addr}
To = sip:%{$getSIPuser(To)}@172.30.51.10:5999

When make this call, the brekeke changes do From field before send call to my external sip server:

sip:,"%40flytelecom")}@172.17.108.122;transport=UDP

The function str.remove appear not working to remove the string "%40flytelecom".

Can We doing some mistake?

Thanks in advance
Back to top
View user's profile
Mohney
Brekeke Talented


Joined: 20 Nov 2007
Posts: 79

PostPosted: Wed Jan 22, 2020 11:56 am    Post subject: Reply with quote

> 111%40flytelecom@172.17.108.122

It is weird.
Does REGISTER packet sent from Zoiper indicate such a URL in Contact header?
If so, it will be a configuration issue at Zoiper.


I'm not sure the following DialPlan rule works or not.. but let you try.
Matching Patterns
$request = ^INVITE
$getSIPuser(From) = sip:(.+)%40
To = sip:(.+)@
Deploy Patterns
From = sip:%1@%{$ifAddr("172.30.51.10")}
To = sip:%2@172.30.51.10:5999
Back to top
View user's profile
lsantos
Brekeke Junior Member


Joined: 20 Jan 2020
Posts: 9
Location: Porto Alegre - Brazil

PostPosted: Thu Jan 23, 2020 4:56 am    Post subject: Reply with quote

Hello,

It was really a problem in the zoiper Shocked , when testing on a grandstream ip phone he sent the SIP ID correctly.
Thank you. Very Happy
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1