Am 08.11.2022 um 16:38 schrieb Mike Hammett via VoiceOps:
I'm working a situation where I need to rewrite my called number to a toll-free number. Because the rewriting happens after Metaswitch does the toll-free lookup, the tandem rejects the call as there's no dip.

Did you really mean called number or rather calling number? If you can hook a Asterisk box in between the device where your customers' SIP calls are coming from and Metaswitch you could rewrite either.

Overwrite any calls' CLI to calling number 18009999999 and send it out to "metaswitch01" as defined in sip.conf:

/etc/asterisk/extensions.conf:

[incoming-calls-from-customers]

exten => _X.,1,NoOp
exten => _X.,n,Set(CALLERID(name)=18009999999)
exten => _X.,n,Set(CALLERID(num)=18009999999)
exten => _X.,n,Dial(SIP/${EXTEN}@metaswitch01)
exten => _X.,n,Hangup

- or - Overwrite any called number and send the call to 18007777777 to "metaswitch01":

exten => _X.,1,NoOp
exten => _X.,n,Dial(SIP/18007777777@metaswitch01)
exten => _X.,n,Hangup

(old Asterisk, before pjsip, but not much different)

Sample for sip.conf:

[metaswitch01]
type=peer
host=sip.metaswitch.something
username=maybe-username-or-leave-empty
secret=maybe-password-or-leave-empty
disallow=all
allow=alaw
allow=ulaw
canreinvite=no
dtmfmode=rfc2833
context=nowhere

[my-internal-pbx-or-sbc]
type=peer
host=10.10.10.10
insecure=port,invite
disallow=all
allow=alaw
allow=ulaw
canreinvite=no
dtmfmode=rfc2833
context=incoming-calls-from-customers

Good luck
Markus
_______________________________________________
VoiceOps mailing list
[email protected]
https://puck.nether.net/mailman/listinfo/voiceops

Reply via email to