Posts Tagged ‘hmr’

acmepacket: import/export HMR

Tuesday, February 9th, 2016
conf t -> session-router -> sip-manipulation

Select some HMR and then do:

export %filename%

After that a %filename%.gz will appear under /code/imports/ directory. And you can download it via FTP/SFTP.

It is also possible to import sip-manipulation rules. Put your .gz file with the same structure to /code/imports/ , then go to conf t -> session-router -> sip-manipulation and do:

import %filename%.gz

AcmePacket: Reject calls from subscribers with hidden cell number

Thursday, February 26th, 2015

Depending on GSM operator the values in SIP headers may vary. In my case if a subscriber activated the ability to hide cell number, the ‘uri-user’ parameter in SIP-header ‘From’ contains not cell number but ‘anonymous’. I had a task to reject such calls.

There already were 2 header-rules – one doing storing of ‘To’ headers’ values with VoIP provider’s DIDs inside , and the second – manipulating the ‘From’ headers, according to the stored values.

If I added the 3rd header-rule (last in the list) trying to reject anonymous calls, it haven’t worked, so it was necessary to keep it on the top of header-rules. (the ‘move’ command doesn’t work for me, though I’ve read in one Oracle/AcmePacket HMR guide that it’s possible, maybe my firmware does not support it)

Here’s the rule itself:

header-rule
		name                           rejectAnonymous
		header-name                    From
		action                         manipulate
		comparison-type                case-insensitive
		msg-type                       request
		methods                        INVITE
		match-value                    
		new-value                      
		element-rule
			name                           rejAnonymous
			parameter-name                 From
			type                           uri-user
			action                         reject
			match-val-type                 any
			comparison-type                case-insensitive
			match-value                    Anonymous
			new-value                      

Have a look at these nice screenshots demonstrating the initial INVITE from anonymous:

invite_anonymous

… and rejecting this call by AcmePacket 4250 with ‘400 Bad Request’ response:

400_bad_request

AcmePacket: reject redirected calls

Friday, February 20th, 2015

What to do if somebody set up call redirect from his number to yours one, but you do not want to accept such calls?

According to RFC5806 – Diversion Indication in SIP,

The Diversion header SHOULD be added when a SIP proxy server, SIP
redirect server, or SIP user agent changes the ultimate endpoint that
will receive the call.

So, you have to reject INVITEs with Diversion header. This is how it looks like on the AcmePacket. One more header-rule (if you already have any) in sip-manipulation rule:

header-rule
	name                           reject_diversion
	header-name                    Diversion
	action                         manipulate
	comparison-type                case-sensitive
	msg-type                       request
	methods                        INVITE
	match-value                    
	new-value                      
	element-rule
		name                           rej_diversion
		parameter-name                 
		type                           header-value
		action                         reject
		match-val-type                 any
		comparison-type                pattern-rule
		match-value                    ^.*$
		new-value                      

You may also add something like “603:Decline” to “new-value” parameter.

Or even like this, without any responce codes and element-rules:

header-rule
                name                                    rejectDiversion
                header-name                             Diversion
                action                                  reject
                comparison-type                         boolean
                msg-type                                request
                methods                                 INVITE
                match-value                             
                new-value