December 12, 2019, 07:43:53 pm *
Welcome, Guest. Please login or register.
News:
 
   Forum Home   Search Login Register OBiTALK  
Pages: 1 [2]
  Print  
Author Topic: Block calls by CNAM (CallerID Name) on OBI200?  (Read 2326 times)
Darv
Newbie
*
Posts: 16


« Reply #20 on: October 19, 2019, 06:03:27 pm »

Thank you! That will help a lot.  I do not use GV only voip.ms, and I will be trying to put this on a linux box, and using TLS (sips), so I'll need to read some more about the options you've used.

Since I will be checking a list of 1000 CallerID numbers/names in a sql database or text file, it might take a bit longer which might allow the Obi to start to ring.  I will have to think about the race situation a bit more although it does have the advantage of not requiring the Yate server to be up.

Theoretically a blocked caller could repeatedly call, and each time the Yate would answer, and it would cost the voip.ms account money.  I'm not sure what the best way to reject a call is, while avoiding any cost.

The "link1" I posted above suggests the Obi can forward loop to the Yate and then back to the Obi (rather than forking and racing), unfortunately one of the links in there is dead and I don't yet understand the rest or how to configure that on the Obi. And,  I don't know what the consequences would be if the Yate server was down.  I'll keep reading.
« Last Edit: October 19, 2019, 07:26:01 pm by Darv » Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3943


« Reply #21 on: October 20, 2019, 08:39:03 am »

If the race is lost, you can change the ring pattern to ring silence for 1 or 2 seconds. Now the phone port will ring (Phone LED will flash for 1 or 2 sec) until the call is rejected, but the physical ringer will be silent.

Ring Settings -> Ring Profile A -> Ring Pattern 1 -> RingPattern:
Default: 60(2+4)
Change it to: 60;2(0+2);58(2+4) or 60;1(0+1);59(2+4)
Ring for zero seconds followed by 2 seconds of silence then repeat ringing for 2 seconds followed by 4 seconds of silence.

The following was my original design, but I didn't post it because of the reliability problem. All calls are routed to Yate. Good calls are routed back to the OBi200. Bad calls are rejected with an auth error. If Yate is down, all calls are dropped.

regexroute.conf
Code:
[default]
;
; Lines beginning with ";" are comments
;

; Repeat the following as needed
${caller}^8005551212$= goto RejCall
${callername}^unknown$= goto RejCall

.*$=sip/sip:0@yy.yy.yy.tt:5063
; Routes good calls back to the OBi200
; Change yy.yy.yy.yy to the IP address of the OBi200
; 5063 is the X_UserAgentPort of SP4

[RejCall]

.*$=-;error=noauth
; This produces an authorization error and rejects the call.
 

 OBi200:

Voice Services -> SP1 Service -> X_InboundCallRoute:
sp4(100@xx.xx.xx.xx)

Routes all calls to Yate
Change xx.xx.xx.xx to the IP address of the computer running Yate.

Service Providers -> ITSP Profile D -> SIP -> ProxyServer: 127.0.0.1
Service Providers -> ITSP Profile D -> SIP -> X_SpoofCallerID: Checked
Voice Services -> SP4 Service -> AuthUserName: anything
Voice Services -> SP4 Service -> X_RegisterEnable: unchecked
Voice Services -> SP4 Service -> X_ServProvProfile: D
Voice Services -> SP4 Service ->  X_UserAgentPort: 5063
Logged
Darv
Newbie
*
Posts: 16


« Reply #22 on: October 20, 2019, 02:16:09 pm »

Thanks again, I will try it both ways.

The forking solution answers the call and plays the tone forever, and never hangs up.  That could be a problem, especially since I am paying for the call.

Ideally the Obi would fork and if Yate rejected the Caller ID then the call would receive a "603 Decline" code, and  the Obi would stop ringing, otherwise, if not rejected, just let the Obi ring.  Is that possible?
Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3943


« Reply #23 on: October 20, 2019, 04:11:45 pm »

Yate doc has duration for one of the Tone parms, but I can't get it to work. Maybe you can.
http://docs.yate.ro/wiki/Tonegen
Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3943


« Reply #24 on: October 21, 2019, 10:28:12 am »

Here is another solution used with the forking method. Rejected calls are routed to a non-existent extension. The call is answered then dropped. The race is lost because this process takes 2-3 seconds, so you will have to use the Ring Pattern trick to keep the phone from ringing.

regexroute.conf
Code:
[default]
;
; Lines beginning with ";" are comments
;

; Repeat the following as needed
${caller}^8005551212$= goto RejCall
${callername}^unknown$= goto RejCall

.*$=-;error=noauth
; This produces an authorization error and the call processing ends.
; The call leg to the OBI200 phone is not affected.

[RejCall]
.*$=;called=100
; This routes the call to a non-existent extension.
;The call is answered then dropped.
Logged
Darv
Newbie
*
Posts: 16


« Reply #25 on: October 21, 2019, 09:38:51 pm »

I have discovered how to put a time limit on the call (5 seconds) in Yate's regexroute.conf

Code:
.*$=tone/info;timeout=5000

But I would prefer not to answer the call.

If Obi's X_InboundCallRoute is sending the incoming call to both {ph} and {sp4(100@#.#.#.#)}, is there a way to tell Obi not to ring the {ph} and reject the call, all from the {sp4} side of the fork without answering?  Does the Obi ONLY not ring (or stop ringing) the {ph} if the {sp4} completes the call (answers with SIP code 200)?   I've not found this information in the manual.

I haven't tried them, but Yate can return specific SIP codes and optional reasons.

Code:
.*$=-;error=401;reason=Unauthorized
;.*$=-;error=noauth

https://en.wikipedia.org/wiki/List_of_SIP_response_codes
« Last Edit: October 21, 2019, 10:56:35 pm by Darv » Logged
azrobert
Hero Member & Beta Tester
*****
Posts: 3943


« Reply #26 on: October 22, 2019, 12:45:39 pm »

There are 2 calls, 1 to the phone port and another to Yate. The only way I know to stop the call to the phone port is to answer the Yate call. 

"200 OK" is sent after the call is answered. I'm not an SIP expert, but I don't think you can send a "200" without answering. Even if you could, VOIP.MS would think the call was answered.

I tried setting timeout to 1 millisecond. I made a test call and heard about a 1 second tone, so there might be a minimum timeout value. VOIP.MS might not recognize a short call as completed. Does VOIP.MS provide a log of charges?
Logged
Darv
Newbie
*
Posts: 16


« Reply #27 on: October 22, 2019, 09:00:37 pm »

I think voip.ms starts charging upon call connection, with a 6 second billing increment. Ideally there shouldn't be any money spent blocking a telemarketer, so the original call should be denied, not answered.
Logged
Darv
Newbie
*
Posts: 16


« Reply #28 on: November 13, 2019, 07:18:00 pm »

The following was my original design, but I didn't post it because of the reliability problem. All calls are routed to Yate. Good calls are routed back to the OBi200. Bad calls are rejected with an auth error. If Yate is down, all calls are dropped.

regexroute.conf
Code:
[default]
;
; Lines beginning with ";" are comments
;

; Repeat the following as needed
${caller}^8005551212$= goto RejCall
${callername}^unknown$= goto RejCall

.*$=sip/sip:0@yy.yy.yy.tt:5063
; Routes good calls back to the OBi200
; Change yy.yy.yy.yy to the IP address of the OBi200
; 5063 is the X_UserAgentPort of SP4

[RejCall]

.*$=-;error=noauth
; This produces an authorization error and rejects the call.
 

 OBi200:

Voice Services -> SP1 Service -> X_InboundCallRoute:
sp4(100@xx.xx.xx.xx)

Routes all calls to Yate
Change xx.xx.xx.xx to the IP address of the computer running Yate.

Service Providers -> ITSP Profile D -> SIP -> ProxyServer: 127.0.0.1
Service Providers -> ITSP Profile D -> SIP -> X_SpoofCallerID: Checked
Voice Services -> SP4 Service -> AuthUserName: anything
Voice Services -> SP4 Service -> X_RegisterEnable: unchecked
Voice Services -> SP4 Service -> X_ServProvProfile: D
Voice Services -> SP4 Service ->  X_UserAgentPort: 5063


I have been trying the above setup so Yate doesn't have to answer the phone.  It works, but I notice that Yate proxies the call's audio channel. It is acting as a middle-man rather than just handing the call back off to the Obi after it accepts or rejects calls.   If Yate goes down during a call (after it has accepted it), the call will die.

So, I have been trying the small "redirect=yes" modification to the above regexroute.conf file:

.*$=sip/sip:0@yy.yy.yy.tt:5063;redirect=yes


Yate will send a 302 reply instead, and the phone successfully rings on SP4.  However, as soon as I answer the call, the call dies.   I am trying to figure out why it dies.

Is it because my "ITSP A>SIP" with voip.ms is using "TLS"  encryption (and "Voice>SP1"="use SRTP only") ?  When Obi redirects the call to Yate it is using plain UDP (not tls).

Or is it because the SP1 -> Yate -> SP4 is using the same port on the obi  OBI.IP:5063 ?   I notice the INVITE request from SP1 -> Yate has

INVITE sip:101@YATEIP:5080 SIP/2.0
Via: SIP/2.0/UDP OBI-IP:5063;branch=z9aG4bK-bf4a8a9a;rport
Contact: <sip:100@OBI-IP:5063>

and then the Yate 302 Redirect back to SP1 will redirect it to the same port (SP4's port):

SIP/2.0 302 Moved Temporarily
Via: SIP/2.0/UDP OBI-IP:5063;branch=z9hG4bK-f757a93c;rport=5063;received=OBI-IP
Contact: <sip:104@OBI-IP:5063>

Is the Obi able to handle the resulting proxying/forwarding of the audio channel from SP1 to SP4?

Or is there some other way to achieve the 302 redirect in the middle without the call dying?  (SP1 -> Yate, 302 Redirect to SP4 if call is accepted, 603 if not -> SP4 -> {ph})

« Last Edit: November 13, 2019, 07:29:21 pm by Darv » Logged
CALYTA
Newbie
*
Posts: 14


« Reply #29 on: November 27, 2019, 03:48:38 pm »

But is there any way to turn filezilla uc browser rufus  off SIP Registration on the Obi200?
X_RegisterEnable tick box under the relevant Voice  Services, SPx.
On the other hand, if you have 1000 enemies, and you know the CNAM for each number, then refer to your original discussion.
« Last Edit: November 28, 2019, 05:25:33 pm by CALYTA » Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC