Hi all,
i’ve configured an Asterisk box as B2BUA between VoIP Trunk and our OpenSIPS. It’s quite simple,
two context (from-toip and from-voip), defined as follow using PJSIP:
[trunk_defaults](!)
type = wizard
transport = transport-udp
endpoint/allow_subscribe = no
endpoint/allow=!all,g729,g722,alaw
aor/qualify_frequency = 30
registration/expiration = 1800
ignore_uri_user_options = yes
has_hint = no
allow_transfer = yes
redirect_method = uri_core
[toip](trunk_defaults)
;hint_context = from-toip
endpoint/context = from-toip
remote_hosts = [TOIP IP]
sends_registrations = no
accepts_registrations = no
sends_auth = no
accepts_auth = no
[voip](trunk_defaults)
;hint_context = from-voip
endpoint/context = from-voip
remote_hosts = [OPENSIPS IP]
sends_registrations = no
accepts_registrations = no
sends_auth = no
accepts_auth = no
and on extensions, just a bypass:
[from-toip]
exten => _0X.,1,Noop("Call from TOIP ${EXTEN}")
exten => _0X.,n,Answer()
exten => _0X.,n,Dial(PJSIP/${EXTEN}@voip)
[from-voip]
exten => _0X.,1,Noop("Call from VOIP ${EXTEN}")
exten => _0X.,n,Answer()
exten => _0X.,n,Dial(PJSIP/${EXTEN}@toip)
I have to do this because i need to support Replaces, that ToIP SBC doesn’t.
At the moment, calls were passed between ToIP and VoIP, ad expected, but on Replaces by a phone on from-voip side, Asterisk tell me:
NOTICE[156836]: res_pjsip_session.c:3962 new_invite: voip: Call (UDP:[OPENSIPS IP]:5060) to extension 'asterisk' rejected because extension not found in context 'from-voip'.
and, analyzing the flow using sngrep, i saw that the Replaces header is correct, but on the INVITE i got sip:asterisk…:
Obivously, Replaces where ignored and i got a “404 Not Found”.
Any help?