Using a Different phone number for different destinations

JustinDupree -

If you have multiple SMS-enabled numbers on your account, you may want to use a different number when sending to some destinations than you do for others. For example, use one number when sending to the US, but a different number to send to Germany.

In Tropo's Tropo.com environment, Canadian phone numbers have better access to send SMS around the world than our US numbers. For Tropo.eu, any SMS-enabled number can be used for any destination, but you still might want to use a number from the end user's local country for usability reasons.

To switch the number you send from based on where you send to, try the following method.

if (numberToDial[:5] == "14074") : 
    call("+" + numberToDial, { 
        "network":"SMS", 
        "callerID":"14075550100" 
    }) 
    say(msg) 
else : 
    call("+" + numberToDial, { 
        "network":"SMS", 
        "callerID":"16135550100" 
    }) 
    say(msg)

The above code is in Python, but the logic is applicable to all languages.

Have more questions? Submit a request

0 Comments

Article is closed for comments.