11.08.2017, 14:56, "Daniel Tryba" <d.tr...@pocos.nl>:


There is nothing special about this scenario, asterisk is an enduser for
kamailio. Have it register to kamailio and use for example the alias_db
module to send 7XXX numbers to the registered asterisk user. All this is
in the supplied example config kamailio-advanced.cfg.

 
Thanks!
 
Using alias_db - 7XXX calls were succesfully aliased and routed to Asterisk through 4444 user (asterisk server did not accept connections to sip ports from Internet due to security reasons).
On asterisk side, all this calls had equal extension, configured in sip.conf "REGISTER =>.../exten" string.
 
So I had to extract right exten from TO: header in dialplan like this:
 
[from_kamailio]
exten => 4444,1,Noop(Call EXTEN:${EXTEN} TO:${SIP_HEADER(TO)})
same => n,Set(newext=${SIP_HEADER(To)})
same => n,Set(newext=${CUT(newext,@,1)})
same => n,Set(newext=${CUT(newext,:,2)})
same => n,Goto(from_kamailio,${newext},1)
 
exten => _7XXX,1,Noop(Call to ${EXTEN})
same  => n,Dial(SIP/${EXTEN});
same  => n,Hangup()
 
 
One disadvantage with alias_db - is that i cant use regex to alias all 7XXX numbers with 4444 user, so i need to create aliases for every 7XXX user in dbaliases table using this scenario.
 
Is the any other not very difficult way to route all 7XXX calls in Kamailio to Asterisk through 4444 user without creating alias dbrecords for every number?
 
 
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to