[SR-Users] What is a good strategy to build Kamailio <--> pbx

Alex Balashov abalashov at evaristesys.com
Sun Aug 16 20:10:50 CEST 2020


Why not relay registrations to Kamailio after injecting a Path header? It seems like you’re taking the long, circuitous, and rickety way around.

—
Sent from mobile, with due apologies for brevity and errors.

> On Aug 16, 2020, at 2:08 PM, Johnny Ritzer <sudoritz at gmail.com> wrote:
> 
> 
> 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]
> 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 at xxxxx.com 4242 at 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.
>  
>  
>  
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20200816/894b96ff/attachment.htm>


More information about the sr-users mailing list