Swisslinux.org

− The GNU/Linux crossroads in Switzerland −

 

Language

 

The Forum

You are not logged in.

#1 04 Nov 2009 22:41:25

titeuf898
Prêcheu(r|se) du libre
 
From: Jura Suisse
Registered: 13 Dec 2004
Posts: 177

comment faire pour avoir 2 compte SIP 1 entrant, 1 sortant

Bonjour,
J'utilise www.mysipswitch.com pour pouvoir passer mes appels avec voipbuster et j'aimerais intégré un uméro de téléphone, (donc j'appelle avec voipbuster et je reçois avec phonestar où j'ai pu avoir un numéro Suisse.)

mais j'y connais rien en Bash... j'ai fais ce script là pour pouvoir utiliser pour les appels sortants, par contre quelqu'un peut m'aider pour les appels sortants?

Code:

#Ruby
# Dial Plan Generated by Rubyzard v0.1 
# If you need help, please post in our forum
# http://www.mysipswitch.com 

# 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.

 
else
  # Do your OUTGOING call processing customisations here.

     case req.URI.User
         when /^+41/ then sys.Dial("voipbuster") 
         when /^0041/ then sys.Dial("voipbuster") 
                 when /^+34/ then sys.Dial("voipbuster") 
         when /^0034/ then sys.Dial("voipbuster")
         else sys.Dial("voipbuster")
     end
 
end

j'ai essayé avec ceci mais rien à faire : https://www.mysipswitch.com/forum/viewtopic.php?t=169

Last edited by titeuf898 (04 Nov 2009 22:43:04)

Offline

 

#2 09 Nov 2009 21:28:09

titeuf898
Prêcheu(r|se) du libre
 
From: Jura Suisse
Registered: 13 Dec 2004
Posts: 177

Re: comment faire pour avoir 2 compte SIP 1 entrant, 1 sortant

en faite, j'ai trouvé:

Code:

#Ruby by Bryan


# 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.

  sys.Dial("#{sys.Username}@local")
 
else
  # Do your OUTGOING call processing customisations here.

     case req.URI.User
         when /^+41/ then sys.Dial("sip1") 
         when /^0041/ then sys.Dial("sip1") 
                 when /^+34/ then sys.Dial("sip1") 
         when /^0034/ then sys.Dial("sip1")
  when /^117/ then sys.Dial("sip2")
  when /^118/ then sys.Dial("sip2")
  when /^144/ then sys.Dial("sip2")
  when /^112/ then sys.Dial("sip2")
  when /^143/ then sys.Dial("sip2")
  when /^147/ then sys.Dial("sip2")
         else sys.Dial("sip1")
     end
 
end

cela me permet de téléphoner avec le sip1 et les appels d'urgence avec le sip2, et de tout recevoir sur mon compte sip de sorcery ...

enjoy!

Offline

 

Board footer

Powered by FluxBB