originate command

General discussions about Asterisk.

Moderators: Moderator, Support

originate command

Postby wdaniel » Tue Dec 15, 2015 11:10 am

Hello,
I'm trying to dial out from the terminal using the originate command.

internal works fine
asterisk -rx "originate SIP/701 application Playback hello-world"

but when trying to dial out nothing
asterisk -rx "originate SIP/(trunk name)/(external number) application Playback hello-world"

i know its not much of an explanation, but I'm not sure what I'm missing from the external. i know my trunk works, i can call out on it.
my goal is to call a phone number and play a message.
Thanks.
wdaniel
Newsterisk
 
Posts: 7
Joined: Mon Nov 15, 2010 12:25 pm

Re: originate command

Postby navaismo » Tue Dec 15, 2015 11:15 am

Most ISP do not allow the calls from cli because you are sending like anonymous, but better to check the sip debug and find where the call fails
navaismo
Salt of the Asterisk
 
Posts: 1610
Joined: Mon Dec 07, 2009 1:30 pm
Location: Mexico City, Mexico

Re: originate command

Postby david55 » Tue Dec 15, 2015 12:30 pm

ITSPs rejecting anonymous calls isn't something I have heard of before. On the other hand, too many of them accept faked caller IDs!

If that really is the problem, use a local channel on the A side, so that you can explicitly set the caller ID.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: originate command

Postby ambiorixg12 » Tue Dec 15, 2015 5:19 pm

When you use originate command to initiate the call, anonymous is used as the username on the sip uri : example '"Anonymous<sip:anonymous@sip.rapidvox.com>;

as anonymous is not a valid user

For this reason your carrier will reject the call. Most of the time this problem can be solved adding the fromuser option in your trunk settings.
ambiorixg12
Astmaster
 
Posts: 967
Joined: Sun Mar 04, 2007 9:32 pm
Location: Dominican Republic

Re: originate command

Postby david55 » Wed Dec 16, 2015 5:00 am

Some ITSPs may reject the call.

Generally fromuser covers cases where the ITSP uses the From header to identify the account, typically in the case of ITSPs that are providing a service for individual phones, not for PABXes. Normally if they do that, you will need to use fromuser even if a caller ID is available to Asterisk.

In Asterisk terms, the ITSP end is configured as host=dynamic; type=user, whereas, for PABX support, host=dynamic, type=peer is better.
david55
Moves Like Spencer
 
Posts: 12570
Joined: Fri Sep 26, 2008 5:03 am

Re: originate command

Postby wdaniel » Thu Dec 17, 2015 11:03 am

thanks all, i got it to work just by adding local and forwarding 701 to external phone number. its a hack but it works.

asterisk -rx "originate local/701 application Playback hello-world"

i will try other ways.

on a side note, how would all of you initiate an external call from the linux command line and play a message to the receiver.
wdaniel
Newsterisk
 
Posts: 7
Joined: Mon Nov 15, 2010 12:25 pm


Return to Asterisk General

Who is online

Users browsing this forum: No registered users and 1 guest