[Serusers] forwarding selected invites to sems

x-ser at sidell.org x-ser at sidell.org
Fri Jun 13 00:18:21 CEST 2008


Greetings.

I'm in the processing of converting my ser.cfg file from 0.9 to 2.0,
and am trying to use ser-oob.cfg as a starting point.

I want to forward selected inbound invites to a sems server.  In 0.9,
I tested the invite message's uri and forwarded the invites using code
like this:

   # Test for a particular DID from the PSTN gateway
   #
   if (uri =~ "sip:7605796638@")  {    
      log("Forwarding to eliza");

      # Do NAT traversal                
      route(4);

      # Tell sems what application to run
      append_hf("P-App-Name: fivr\r\n");
      append_hf("P-App-Param: cfg_production\r\n");

      # Relay the invite to sems
      rewritehostport("12.34.56.78:5070");
      t_relay_to_udp("12.34.56.78","5070");

      break;
   }

Will the same code work in ser-oob.cfg?  At what point in the script
should I insert these tests?  Also, does the script and associated
mysql database provide any way to do this sort of forwarding in a more
generic, table-driven, way?

Many thanks!

-- 
Mark Sidell
Partner
Forte, Inc.
919-942-7068
fax 919-969-2844
www.forteinc.com



More information about the sr-users mailing list