What are your thoughts on architecture build of the following scenarios.
The PBX doesn’t support websockets and we want to use sip.js / jsSip. (use Kama as wss:// SIP proxy) PBX has direct PRI/sip Trunks/ DID control/ Voicemail. PBX hosts SIP extensions.
UA --> Kamailio --> PBX
--------SCENARIO A.) ------- Host SIP[xxxx] extensions on Kama box but same SIP extensions are also on PBX [xxxx]
1. Build some sort of control to register handle kama to pbx …. (but reg webclients)
Kama [1100] SIP-PBX [1100]
Does kama act as the UA 1100 / registered to PBX
What about UA to kamailio (do we do 1100a so UA-kama is 1100a) but kama is maintain REG/status/ but passing that IF client is online ?
MWI (voicemail is hosted on PBX) so how does that move through can it.
------- SCENARIO B.) ------ Proxy all/ everything . use route[REGFW] Forward all REG to PBX..
Issues ---- MWI (SIP notify ?) SIP Incoming CALL incoming calls to work. (if UA holds REG to outbound proxy on PBX or ) DTMF (sipINFO) doesn’t work (I see it sending) I noticed I crashed the PBX because all the SIP scanners started pounding my Kamailio box after 2 days when I added route[REGFW] it starting eating up SIP trunk channels on PBX cause started forwarding everything. Like it starting 4241@xxxxx.com 4242@xxxxx.com .
Or might need to look at fail2ban pike module to oget this but still had issues I just don’t know where to look or code to fix on SCENARIO B
Snippets on my testing .
route[REGFWD] { if(!is_method("REGISTER")) { return; }
$var(rip) = $sel(cfg_get.PBX.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.PBX.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + "kamaproxy"; # $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); } #!endif
---------------
So this led me to extra security should I host SIP extensions on kamailio as an extra security but then what about MWI/inbound then) or do I have 1100 on kama which mitel is 1100 but I pass all info from inbound.