inbound-calls-management Request Simple Dial plan !!

Catalog of dial plans
Post Reply
ramesh
Posts: 3
Joined: Tue Mar 10, 2009 12:10 am
Location: Canada

inbound-calls-management Request Simple Dial plan !!

Post by ramesh » Fri Mar 20, 2009 5:52 pm

Hi

I am trying to call forward to difference number

i was trying this topic :


from this help i got the dial plan error 64Bits i can't update my dial plan
http://www.mysipswitch.com/wordpress/in ... ip-switch/

and
This one i got in Response page : Error
http://www.mysipswitch.com/forum/viewtopic.php?t=725

So please help me !!!
i will explain to you what i like it

I have Registered with MSS : provider1, provider2,provider3

When call coming from 0032207123456 or 0207123456
Just Call forward to 00492315251234 (cost of provider1)

if any calls coming from another number it has to forward to 14168201234@ (cost of provider2)




All out going call provider 3



thanks
Ramesh

gbonnet
Site Admin
Posts: 680
Joined: Wed Jul 11, 2007 2:58 pm
Location: Bologna
Contact:

Post by gbonnet » Mon Mar 23, 2009 9:18 am

Hi Ramesh,

If you look at this thread you'll have a dial plan close to what you need : http://www.mysipswitch.com/forum/viewtopic.php?t=1186

This should do (I have not tested though):

Code: Select all

#Ruby

# SIP tracing : true or false
sys.Trace = false

sys.Log("call from #{req.Header.From.FromURI.ToString()} to #{req.URI.User}.")


if sys.In then
 # Do your INCOMING call processing customisations here. 
 caller = req.Header.From.FromURI.User
 case caller
  when /^(0032207123456|0207123456)$/
   sys.Log("Forward to  00492315251234")
   sys.Dial("00492315251234@provider1")
  else
    sys.Log("Accepting call from #{caller}")
    sys.Dial("14168201234@provider2")
  end

else 
 sys.Dial("provider3")
end
Last edited by gbonnet on Sun Mar 29, 2009 5:13 pm, edited 1 time in total.
Blueface [url=http://www.blueface.ie/]Phone[/url] Service

ramesh
Posts: 3
Joined: Tue Mar 10, 2009 12:10 am
Location: Canada

Not working

Post by ramesh » Sat Mar 28, 2009 9:29 pm

Hi gbonnet

that is not working .. i got the error and .. he say dial plan error

any solution for this ?

Thanks
Ramesh

gbonnet
Site Admin
Posts: 680
Joined: Wed Jul 11, 2007 2:58 pm
Location: Bologna
Contact:

Post by gbonnet » Sun Mar 29, 2009 5:14 pm

sorry I put an 'end' in extra, just before the 'else'. I've made the change above.
Blueface [url=http://www.blueface.ie/]Phone[/url] Service

ramesh
Posts: 3
Joined: Tue Mar 10, 2009 12:10 am
Location: Canada

Worked !!!

Post by ramesh » Tue Mar 31, 2009 12:37 pm

Hi



It's working 100%

Thanks
Ramesh

gbonnet
Site Admin
Posts: 680
Joined: Wed Jul 11, 2007 2:58 pm
Location: Bologna
Contact:

Post by gbonnet » Tue Mar 31, 2009 1:13 pm

Glad to hear that.
Enjoy
Blueface [url=http://www.blueface.ie/]Phone[/url] Service

Post Reply