How to temporarly execute a command by dialing a prefix?

Catalog of dial plans
Post Reply
webtron
Posts: 36
Joined: Thu Jan 15, 2009 1:35 am

How to temporarly execute a command by dialing a prefix?

Post by webtron » Fri Jan 16, 2009 12:03 am

Hi,
I had a question after going through this amazing command scripting feature.

Suppose, I want to change the header to sip:xxxxxxx@sip.xxxxxx.com when I dial a number with a prefix *7 or I want to change the header to sip:yyyyyyy@sip.yyyyy.com when I dial a number with a prefix *9.

What command should I type in? Please see that all changes are temporary and affter I end my call I want the header to return to its default entry.

Is there a way that I can start a conference between two numbers which I would like to dial from my phone and MySipSwitch executes the call by dialing the two numbers and connecting it to me?

Thanks

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: How to temporarly execute a command by dialing a prefix?

Post by Aaron » Fri Jan 16, 2009 12:39 am

webtron wrote:Hi,
I had a question after going through this amazing command scripting feature.

Suppose, I want to change the header to sip:xxxxxxx@sip.xxxxxx.com when I dial a number with a prefix *7 or I want to change the header to sip:yyyyyyy@sip.yyyyy.com when I dial a number with a prefix *9.

What command should I type in? Please see that all changes are temporary and affter I end my call I want the header to return to its default entry.
If you're talking about changing the SIP URI for the forwarded call it's all done in the sys.Dial command.

For example if a call arrives into mss as sip:joe.bloggs@sip.mysipswitch.com you can forward it to a different URI using:

sys.Dial("jane.doe@somewhereelse.com")
webtron wrote: Is there a way that I can start a conference between two numbers which I would like to dial from my phone and MySipSwitch executes the call by dialing the two numbers and connecting it to me?
No it's not possible to do that from mysipswitch. In theory it would be possible to have a dialplan application that set up two calls with two different media streams going back to your phone bit in pratice that would most likely result in your phone only using one of the streams or behaving unpredicably.

To combine more than two end points on a call audio mixing functionality is required. A conference server provides audio mixing for a large number of calls. Some IP phones, such as Cisco and Polycom, do support 3-way calling and do the audio mixing for the 3 different audio signals within the phone. I doubt that many ATAs support 3-way calling.

For an IP phone to set up a 3-way call it would have to be the one initiating each call so that it knew what was going on. If a SIP server such as mss just dumped two media paths onto it it would not be aware of what was going on. Alternatively a PBX of softswitch such as Asterisk or FreeSwitch can do the audio mixing for as many calls as the hardware can handle and your phone or ATA does not need to have an inbuilt audio-mixer.

In other words because mss is signalling only it cannot help you with any audio mixing and therefore can only set up bi-legged calls.

Regards,

Aaron

webtron
Posts: 36
Joined: Thu Jan 15, 2009 1:35 am

Thanks

Post by webtron » Fri Jan 16, 2009 1:09 am

Hey,
Thanks for your reply.

My second question was answered. Thank you!

My first question I was not able to make you understand it. I want to change the header so that the person I call is gets a number I choose by dialing a prefix.

Thanks

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Re: Thanks

Post by Aaron » Fri Jan 16, 2009 1:56 am

webtron wrote:My first question I was not able to make you understand it. I want to change the header so that the person I call is gets a number I choose by dialing a prefix.
Which header? There's lots of them.

webtron
Posts: 36
Joined: Thu Jan 15, 2009 1:35 am

Post by webtron » Fri Jan 16, 2009 2:05 am

While adding a sip provider when you check 'Show Provider Advanced Call Settings' you see this option:"From Header [optional]"

This field is the area where you can type in the number you want the person you are calling to see.

What I want is that I have two providers, so when I dial a prefix before a number it selects the number I want but dials from the default provider.

Example:
Dialing from provider 1 but I add *99 before the number and it chooses the "From Header [optional]" of provider 2.

Thanks

Aaron
Site Admin
Posts: 4652
Joined: Thu Jul 12, 2007 12:13 am

Post by Aaron » Fri Jan 16, 2009 2:28 am

The From header can be set on a per provider basis from the Advanced Settings but at the moment due to some tricky little coding issues it can't be set within a Ruby dialplan script. It's planned to fix this in the next release due in February sometime.

If you use the Advnaced Settings option it only sets the From header for the call forwarded to that provider and won't have any impact on any other forwarded calls.

Regards,

Aaron

BigTex
Posts: 32
Joined: Sat Aug 30, 2008 9:16 pm

Post by BigTex » Mon Jan 26, 2009 8:06 pm

I've gotten the same end result (have the callerID change depending upon a prefix) by creating two sub-accounts with my provider, and specifying the a different callerID for each. I registered both sub-accounts with mss and coded up mss to direct the call to one of the two accounts depending upon the prefix. CallWithUs, Vitelity, and Link2Voip support multiple accounts at no extra charge.

Post Reply