[asterisk-users] invalid From/Contact header values

2013-12-11 Thread Muhammad Faheem
Hi,
I'm observing wrong From/Contact header values. When I try to set
CallerID(num) it has no effect in the From and Contact Headers, and these
values are the same as the dialed number.
SIP Peers are defined using asterisk realtime. If I define the SIP Peers
using sip.conf then From/Contact header value are correct.

extentions.conf
[test]
exten= 1000, 1,NoOp()
same= n,Set(CALLERID(num)=)
same= n,Set(CALLERID(name)=)
same= n,Dial(SIP/1000)

exten= 2000, 1,NoOp()
same= n,Set(CALLERID(num)=)
same= n,Set(CALLERID(name)=)
same= n,Dial(SIP/2000)


Here is the sip trace...
--- Executing [2000@test:1] NoOp(SIP/1000-0014, ) in
new stack
-- Executing [2000@test:2] Set(SIP/1000-0014,
CALLERID(num)=) in new stack
-- Executing [2000@test:3] Set(SIP/1000-0014,
CALLERID(name)=) in new stack
-- Executing [2000@test:4] Dial(SIP/1000-0014, SIP/2000) in new
stack
  == Using SIP RTP CoS mark 5
Audio is at 16264
Adding codec 14 (alaw) to SDP
Adding codec 13 (ulaw) to SDP
Adding codec 12 (gsm) to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (no NAT) to 10.10.7.218:5060:
INVITE sip:2000@10.10.7.218:5060 SIP/2.0
Via: SIP/2.0/UDP my-ip:5060;branch=z9hG4bK73e9c721
Max-Forwards: 70
From:  sip:2...@sipdev.mydomain.com;tag=as2a72da29
To: sip:2000@10.10.7.218:5060
Contact: sip:2000@my-ip:5060
Call-ID: 1f75fe937c6194227e6b5a5c29f41...@sipdev.mydomain.com
CSeq: 102 INVITE
User-Agent: Asterisk PBX 11.5.1
Date: Wed, 11 Dec 2013 16:23:07 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO,
PUBLISH
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 309

v=0
o=root 604923607 604923607 IN IP4 my-ip
s=Asterisk PBX 11.5.1
c=IN IP4 my-ip
t=0 0
m=audio 16264 RTP/AVP 8 0 3 101
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=silenceSupp:off - - - -
a=ptime:20
a=sendrecv

---
uname -a
Linux 6g-asterisk-devel 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21
UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

asterisk -rx core show version
Asterisk 11.5.1 built by root @ 6g-asterisk-devel on a x86_64 running Linux
on 2013-10-07 10:50:45 UTC

Please suggest me, either I put the issue in issue tracker or there is some
workaround.

Thank you!
Muhammad Faheem
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] RTP from pcap file

2013-07-29 Thread Muhammad Faheem
You can take the pcap trace using tshark or tcpdump command line linux
based tool and open the trace in wireshark. Wireshak is visual tool of
tcpdum/tshark(corss platform) and you can listen audio of each call.



On Fri, Jul 26, 2013 at 10:17 PM, Gianluca Merlo
gianluca.me...@gmail.comwrote:

 Hello James,

 Il giorno 26/lug/2013 15:50, James Bensley jwbens...@gmail.com ha
 scritto:

 
  Howdy all,
 
  Does anyone know of a niffty CLI tool for Linux that can take a PCAP
  file that was created on a SIP PBX for example, and then dump the
  payload of the various RTP streams in there into seperate files so I
  can listen to them?
 
  I can go this graphically with Wireshark, but I'd like to script it
  for automation.
 
  Cheers,
  James.

 I personally use rtpbreak

 http://dallachiesa.com/code/rtpbreak/doc/rtpbreak_en.html

 For similar tasks

 Gianluca

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Handoff dial control to dialplan after AMI Originate

2013-06-19 Thread Muhammad Faheem
Your both channels legs are identical strings. It should be like this.

Action: Originate

Channel: Local/outbound1@originateDialContext

CallerID: 00311234567

Context: originateDialContext2

Exten: outbound1

Priority: 1

Variable: recipient=0031612345678,callerid1=00311234567

Timeout: 1

** **

[originateDialContext]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Set(recipient=${recipient})

exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

[originateDialContext2]

exten = outbound1,1,Wait(1)

exten = outbound1,n,Dial(SIP/${callerid1}@originateChannel)



On Wed, Jun 19, 2013 at 11:20 AM, Grant Bagdasarian g...@cm.nl wrote:

 Hello,

 ** **

 I’d like to use the AMI interface to originate a call to a context in a
 dialplan, and handoff the dial control to the context.

 ** **

 Whenever I execute the below action, the recipient does ring, but when I
 answer it dials the recipient again. I believe this is because once
 answered the system is going to execute the Context/Exten/Prio in the
 Originate action?

 ** **

 Action: Originate

 Channel: Local/outbound1@originateDialContext

 CallerID: 00311234567

 Context: originateDialContext

 Exten: outbound1

 Priority: 1

 Variable: recipient=0031612345678

 Timeout: 1

 ** **

 [originateDialContext]

 exten = outbound1,1,Wait(1)

 exten = outbound1,n,Set(recipient=${recipient})

 exten = outbound1,n,Dial(SIP/${recipient}@originateChannel)

 ** **

 Anyone have an idea how to fix this?

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Call Transfer question

2013-05-16 Thread Muhammad Faheem
Hi,
is possible that two sip extensions: user-1 and user-2 are connected and I
want to transfer the call from user-1 to a third user user-3.
I know it is possible through feature keys mapping in features.conf, but I
want to do this through AMI or Asterisk CLI Commands?

Please suggest if possible?

Thank you!
Muhammad Faheem
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] AMI Originate issue

2013-05-11 Thread Muhammad Faheem
Hi,
I'm getting an issue while executing AMI Originate.
I'm getting extension does not exists on Originate's Response, and on the
other hand Asterisk CLI say fwrite() returned error: Broken pipe
Please suggest me what is wrong.

Muhammad Faheem

### my originate code block ...
---
# ami-script.pl
my $astman = Asterisk::AMI-new(PeerAddr = '127.0.0.1', PeerPort =
'5038', Username = 'faheem', Secret = 'secret');
die Unable to connect to asterisk unless
($astman);
my $resp_code = $astman-send_action({Action =
'Originate',
Channel =
'Local/11223344',
Context = 'users',
Exten = 100,
Priority =1 });
sleep(2);
my $response = $astman-get_response($resp_code);
print $response-{'Response'} .\n;
print $response-{'Message'} .\n;
$astman-disconnect ();

Script Output...
*Error*
*Extension does not exist*
--
;extensions.conf
;;; Asterisk Dialplan
[default]
exten = 11223344,1,NoOp(welcome)
exten = 11223344,n,Answer()
exten = h,1,NoOp(hangup...)

-
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Get Channel Variables in AMI Event NewExten

2013-05-10 Thread Muhammad Faheem
Thanks! Matthew and Dan.


On Thu, May 9, 2013 at 10:18 PM, Matthew Jordan mjor...@digium.com wrote:

 On 05/09/2013 08:16 AM, Dan Cropp wrote:
  I believe you will have to monitor for the Newexten event, then send an
  AMI Getvar command.
 
  It doesn’t make sense to pass all the possible channel variables along
  with a Newexten event.  There may be a ton of extra variables that
  someone may not want or need on the AMI.  Better to have them ask for
  specific variables that are not standard.
 
 
 
  Action: Getvar
 
  ActionID: ValueYouCanIdentify
 
  Channel: IAX2/X.X.X.X:4572-5011
 
  Variable: fu_callerid
 
 
 
  This will result in a response from AMI…
 
 
 
  Response: Success
 
  ActionID: ValueYouCanIdentify
 
  Variable: fu_callerid
 
  Value: 141688xyxzz
 
 
 
  The ActionID is very important if you want to watch for an exact
 response to your request.
 

 If you know the names of the channel variables, you can also configure
 manager to send them with every channel event.

 From manager.conf:

 ;
 ; Display certain channel variables every time a channel-oriented
 ; event is emitted:
 ;
 ;channelvars = var1,var2,var3

 So if you want fu_callerid, set:

 channelvars = fu_callerid

 And, once that variable is set, you should get a NewExten event, you
 should see the following key/value pair:

 ChanVariable(SIP/1234-0001): fu_callerid=foobar


 --
 Matthew Jordan
 Digium, Inc. | Engineering Manager
 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
 Check us out at: http://digium.com  http://asterisk.org



 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

 asterisk-users mailing list
 To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users