[SR-Users] Help with Asterisk RT integration

Daniel Tryba daniel at pocos.nl
Thu Feb 28 15:40:59 CET 2013


On Wednesday 12 December 2012 04:19:48 Jon Morby wrote:
> For legacy reasons Asterisk needs to be in the critical path on this
> particular build … what I'm looking for is a simple recipe and some
> helpful pointers on how to implement it that will allow enable me to swing
> (K) into the path between our end user SIP devices and the existing
> asterisk back ends without losing the ability to deliver hundreds of
> numbers down a single SIP trunk to a subscriber, and that doesn't require
> them to make any changes on their end as they will still see the
> equivalent of SIP:${DNID}@example.com arriving on their PBX
> 
> This should be simple, but I'm obviously missing something :)

Though it took me some time to figure this out, it really is very simple:

route[RELAY] {
	if(is_method("INVITE") && $avp(rewriterUtU))
	{
		$rU=$tU;
	}
...

Seems to work perfectly for an Avaya IP Office:

INVITE sip:avayademo at 172.16.0.4:5060;transport=udp SIP/2.0.
...
To: <sip:0123456789 at 172.16.32.42>.

will be rewritten to 

INVITE sip:0123456789 at 172.16.0.4:5060;transport=udp SIP/2.0.
...
To: <sip:0123456789 at 172.16.32.42>.

The "hard part" it so set the avp for the legacy subscribers :)

-- 

POCOS B.V. - Croy 9c - 5653 LC Eindhoven
Telefoon: 040 293 8661 - Fax: 040 293 8658
http://www.pocos.nl/   - http://www.sipo.nl/
K.v.K. Eindhoven 17097024



More information about the sr-users mailing list