[Serusers] re-write number before sending to asterisk

Barry Murphy barry at unix.co.nz
Sun Apr 10 23:42:39 CEST 2005


Below is what I currently have in my ser.cfg , What can I do to make it add
additional numbers infront?
I.e.
1./User dials 00 (ser knows to forwards to asterisk)
2./ Ser adds an additional extension 2202 to the 00 before sending to
asterisk (this is the pin asterisk requires to make the call)
3./ Asterisk receives 002202......
4./ Call proceeds.

So what I'm after is adding the additional 'hidden' number that people dont
see.


# send out 00 prefix to wholesale voip.brujula.net termination
      if (uri=~"^sip:00[0-9].*@voip.fast.co.nz") {
             if (!is_user_in("From", "ld")) {
                     sl_send_reply("403", "Payment required");
              break;

              };
              setflag(1);
              rewritehostport("asterisk.fast.co.nz:5060");
              if (!t_relay()) {
                      sl_reply_error();
              };
              break;
        };




More information about the sr-users mailing list