[asterisk-users] Help - Asterisk SIP Messages Parameter Modification

2015-10-19 Thread WALEED AHMED KHAN
Dear All,

I have a query.

I want to know if there is any possiblity to modify SIP Messages Parameters
using the asterisk CLI mode.

I want to change the parameters for e.g in INVITE  message. How it can be
done in asterisk.

Kindly assist me.

Regards,

*Waleed A. Khan*
-- 
_
-- 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] Modify Contact in PJsip

2015-10-19 Thread Andrew Colin
Hi Joshua
If i put the default_user option per endpoint would it work? 
So what exactly does the contact_user option do?
I know that in freeswitch there is the option extension-in-contact.We  
basically need to achieve the same functionality 
Thanks

 Original message 
From: Joshua Colp  Date: 
2015/10/19  13:03  (GMT+02:00) To: asterisk-users@lists.digium.com 
Subject: Re: [asterisk-users] Modify Contact in PJsip 
On 15-10-19 07:41 AM, Andrew Colin wrote:
> Hi Guys
>
> We are using the wizard to configure our pjsip trunk(see below)
>
> How do we get this setting to work
>
> contact_user=username
>
> We want to change the contact field in the sip invite to display the
> username of the trunk
>

The Contact header can not currently be modified on a per-endpoint basis 
and takes its values from the generated From header. On a global scale 
it could be controlled using the default_user global option. Otherwise 
there's no real way without adding explicit support for it.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.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

Re: [asterisk-users] Modify Contact in PJsip

2015-10-19 Thread Andrew Colin
Do you know if this can be achieved with the standard sip stack in asterisk?


Kind Regards
Andrew Colin
Converged Telecoms (Pty) Ltd.
Licensed Telecoms Operator : (0258/IECS/JAN/09) (0258/IECNS/JAN/09)

Switchboard: +27 (0)10 591 4600
Email:  and...@convergedgroup.net
Web:  http://www.convergedgroup.net
75 Witkoppen Road, Northriding, Johannesburg, 2169
P O Box 7246, Weltevredenpark, 1715
This communication is confidential and intended solely for the addressee(s).
Any unauthorized review, use, disclosure or distribution is prohibited. If
you believe this message has been sent to you in error, please notify the
sender by replying to this transmission and delete the message without
disclosing it. Thank you. E-mail including attachments is susceptible to
data corruption, interception, unauthorized amendment, tampering and
viruses, and we only send and receive emails on the basis that we are not
liable for any such corruption, interception, amendment, tampering or
viruses or any consequences thereof.



-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joshua Colp
Sent: Monday, October 19, 2015 2:05 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Modify Contact in PJsip

On 15-10-19 08:17 AM, Andrew Colin wrote:
> Hi Joshua
>
> If i put the default_user option per endpoint would it work?

No, it's a global only option.

>
> So what exactly does the contact_user option do?

It sets the Contact user in an outbound registration so that the URI dialed
by the remote SIP server may contain that user (or may not, depending on
their configuration/deployment).

>
> I know that in freeswitch there is the option extension-in-contact.
> We  basically need to achieve the same functionality

It would require modifying the code and adding support.

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.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


Re: [asterisk-users] Modify Contact in PJsip

2015-10-19 Thread Andrew Colin
Ok thanks Joshua

Do you know what this error means when I dial out in pjsip and the call
fails

Unable to create request with auth.No auth credent als for any realms in
challenge





Kind Regards
Andrew Colin
Converged Telecoms (Pty) Ltd.
Licensed Telecoms Operator : (0258/IECS/JAN/09) (0258/IECNS/JAN/09)

Switchboard: +27 (0)10 591 4600
Email:  and...@convergedgroup.net
Web:  http://www.convergedgroup.net
75 Witkoppen Road, Northriding, Johannesburg, 2169
P O Box 7246, Weltevredenpark, 1715
This communication is confidential and intended solely for the addressee(s).
Any unauthorized review, use, disclosure or distribution is prohibited. If
you believe this message has been sent to you in error, please notify the
sender by replying to this transmission and delete the message without
disclosing it. Thank you. E-mail including attachments is susceptible to
data corruption, interception, unauthorized amendment, tampering and
viruses, and we only send and receive emails on the basis that we are not
liable for any such corruption, interception, amendment, tampering or
viruses or any consequences thereof.



-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joshua Colp
Sent: Monday, October 19, 2015 2:21 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Modify Contact in PJsip

On 15-10-19 09:12 AM, Andrew Colin wrote:
> Do you know if this can be achieved with the standard sip stack in
asterisk?

If you are referring to chan_sip I don't believe so but it is possible there
is some obscure option or method to do it that I am aware of.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at:
www.digium.com & www.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


Re: [asterisk-users] pjsip show xxxx like endpoint?

2015-10-19 Thread Bryant Zimmerman
George, and Matthew
  
 I can open an issue later today, but if you want to do it that would be 
awesome as well. Please post the issue number back to this thread so I can 
follow it.
  
 Ideally the Like would work with all pjsip show commands   so we can 
reduce the list and drill down just like we could with sip show 
commands  This is a big missing for me right now and is really stopping 
me from going production along with the realtime performance issues already 
being talked about.
  
 Thanks for your assistance. I greatly appreciate it.
  
 Thanks

Bryant 


 From: "Matthew Jordan" 
Sent: Sunday, October 18, 2015 7:08 PM
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 

Subject: Re: [asterisk-users] pjsip show  like endpoint?   
On Sun, Oct 18, 2015 at 12:39 PM, George Joseph
 wrote:
> Did you open a Jira issue for this yet? I can actually work on this this
> week.
>

I think it'd be pretty cool.

George: want me to open an issue?

--
Matthew Jordan
Digium, Inc. | Director of Technology
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

Re: [asterisk-users] Modify Contact in PJsip

2015-10-19 Thread Joshua Colp

On 15-10-19 09:12 AM, Andrew Colin wrote:

Do you know if this can be achieved with the standard sip stack in asterisk?


If you are referring to chan_sip I don't believe so but it is possible 
there is some obscure option or method to do it that I am aware of.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.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


Re: [asterisk-users] Modify Contact in PJsip

2015-10-19 Thread Joshua Colp

On 15-10-19 07:41 AM, Andrew Colin wrote:

Hi Guys

We are using the wizard to configure our pjsip trunk(see below)

How do we get this setting to work

contact_user=username

We want to change the contact field in the sip invite to display the
username of the trunk



The Contact header can not currently be modified on a per-endpoint basis 
and takes its values from the generated From header. On a global scale 
it could be controlled using the default_user global option. Otherwise 
there's no real way without adding explicit support for it.


--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.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


Re: [asterisk-users] Modify Contact in PJsip

2015-10-19 Thread Joshua Colp

On 15-10-19 08:17 AM, Andrew Colin wrote:

Hi Joshua

If i put the default_user option per endpoint would it work?


No, it's a global only option.



So what exactly does the contact_user option do?


It sets the Contact user in an outbound registration so that the URI 
dialed by the remote SIP server may contain that user (or may not, 
depending on their configuration/deployment).




I know that in freeswitch there is the option extension-in-contact.
We  basically need to achieve the same functionality


It would require modifying the code and adding support.

--
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.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


Re: [asterisk-users] pjsip show xxxx like endpoint?

2015-10-19 Thread Bryant Zimmerman
George and Mat
  
 Here is the link to the Jar Issue.
  
 https://issues.asterisk.org/jira/browse/ASTERISK-25477
  
 Thanks

Bryant
  


 From: "George Joseph" 
Sent: Sunday, October 18, 2015 10:17 PM
To: "Asterisk Users Mailing List - Non-Commercial Discussion" 

Subject: Re: [asterisk-users] pjsip show  like endpoint?   
 On Sun, Oct 18, 2015 at 5:07 PM, Matthew Jordan  
wrote:  On Sun, Oct 18, 2015 at 12:39 PM, George Joseph
 wrote:
> Did you open a Jira issue for this yet?  I can actually work on this 
this
> week.
>

I think it'd be pretty cool.

George: want me to open an issue?
   Thanks Matt.   Bryant said he'd do it tonight.
  
  


-- 
_
-- 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] Why I get repeat messages many times

2015-10-19 Thread Thyda ENG
No, It directly goes the context astsms when we send the message. but it
still repeats the message sometimes.

On Mon, Oct 19, 2015 at 3:25 PM, jg  wrote:

>
> I am using the asterisk 13 and I config my dialplan for the SIP messaging
> as the following :
>
> http://highsecurity.blogspot.com/2012/03/asterisk-10-110-sms-messaging-or-sip.html
> [astsms]
> exten => _.,1,NoOp(SMS receiving dialplan invoked)
> exten => _.,n,NoOp(To ${MESSAGE(to)})
> exten => _.,n,NoOp(From ${MESSAGE(from)})
> exten => _.,n,NoOp(Body ${MESSAGE(body)})
> exten => _.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
> exten => _.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
> exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
> exten => _.,n,GotoIf($["${MESSAGE_SEND_STATUS}" !=
> "SUCCESS"]?sendfailedmsg)
> exten => _.,n,Hangup()
>
> With this configuration I could send message, but I don't know what wrong
> with it as sometimes I get the repeat messages many times. do you have any
> idea?
>
>
> Are the calls answered before jumping to astsms?
>
> jg
>
> --
> _
> -- 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] Modify Contact in PJsip

2015-10-19 Thread Andrew Colin
Hi Guys

 

We are using the wizard to configure our pjsip trunk(see below)

How do we get this setting to work

contact_user=username

 

We want to change the contact field in the sip invite to display the
username of the trunk

 

[trunk_defaults](!)

type = wizard

transport = transport-udp

endpoint/allow_subscribe = no

endpoint/allow = !all,g729

aor/qualify_frequency = 30

registration/expiration = 1800

contact_pattern=xxx

 

[xxx](trunk_defaults)

sends_auth = yes

sends_registrations = yes

endpoint/context = extensions

remote_hosts = xxx.xx.xx.xx

accepts_registrations = no

endpoint/send_rpid = yes

endpoint/send_pai = yes

outbound_auth/username = xxx

outbound_auth/password = xxx

contact_pattern=xxx

-- 
_
-- 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] Why I get repeat messages many times

2015-10-19 Thread jg



I am using the asterisk 13 and I config my dialplan for the SIP messaging as 
the following :
http://highsecurity.blogspot.com/2012/03/asterisk-10-110-sms-messaging-or-sip.html
[astsms]
exten => _.,1,NoOp(SMS receiving dialplan invoked)
exten => _.,n,NoOp(To ${MESSAGE(to)})
exten => _.,n,NoOp(From ${MESSAGE(from)})
exten => _.,n,NoOp(Body ${MESSAGE(body)})
exten => _.,n,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => _.,n,NoOp(Send status is ${MESSAGE_SEND_STATUS})
exten => _.,n,GotoIf($["${MESSAGE_SEND_STATUS}" != "SUCCESS"]?sendfailedmsg)
exten => _.,n,Hangup()

With this configuration I could send message, but I don't know what wrong with it as sometimes 
I get the repeat messages many times. do you have any idea?




Are the calls answered before jumping to astsms?

jg
-- 
_
-- 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] Asterisk HA with heartbeat and systemd

2015-10-19 Thread Telium Technical Support
If you’re still in the planning stage, there’s a lot more to think about.  Your 
Asterisk failure detection will be very simplistic (is the process dead).  
Synchronization of data – without risking synchronization of corrupt data to a 
peer.  Prevent a deteriorating/failing peer corruption from corrupted the other 
peer (i.e. now shared resources).  Awareness of upstream (e.g.: route/network) 
failures making the peer unavailable – and how to detect that.  Etc. etc.

 

Here’s a good checklist of things to consider in your design:  
http://www.voip-info.org/wiki/view/Asterisk+High+Availability+Design

 

If you are building a small/home office HA then the free version of commercial 
tools may be the way to go.  If have a $0 budget but for a larger installation, 
use the design guide above to help figure out which compromises to make.  
(Heartbeat / Linux HA is better than nothing).

 

-M-

-- 
_
-- 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] Asterisk HA with heartbeat and systemd

2015-10-19 Thread Olivier
Hello,

I'm setting up an active-passive Asterisk solution on Debian Jessie
platforms.
I'm using heartbeat package.

As I'm not yet familiar with either systemd or heartbeat, I've got a couple
of questions:

1. At the moment, I'm using /usr/share/heartbeat/hb_standby or
/usr/share/heartbeat/hb_takeover scripts to both :
- allocate "floating" IP addresses to active server
- start/stop asterisk daemon.

Is this appropriate ? What would you recommand instead ?


2. My /etc/ha.d/haresources file contains:
machine1 192.168.1.3 asterisk

With this, I can see that asterisk daemon is correctly started and stopped
when hb_standby/hb_takeover commands are typed but "service
asterisk,status" is a bit misleading with:

service asterisk status
● asterisk.service - LSB: Asterisk PBX
   Loaded: loaded (/etc/init.d/asterisk)
   Active: active (exited) since lun. 2015-10-19 18:02:58 CEST; 41min ago
  Process: 19576 ExecStop=/etc/init.d/asterisk stop (code=exited,
status=0/SUCCESS)
  Process: 19583 ExecStart=/etc/init.d/asterisk start (code=exited,
status=0/SUCCESS)

How can I best improve this and configure heartbeat to use "service
asterisk start/stop" ?

Regards
-- 
_
-- 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] Asterisk / PJSIP unexpectedly opens additional UDP port

2015-10-19 Thread Recursive
Dear all,

I have drastically stripped down my Asterisk installation to about 70 modules 
since I wanted it to be as slim as possible.

Nevertheless, Asterisk still opens an unwanted port:

root@spock:/install/asterisk-13.6.0# netstat -apnv|grep asterisk
...
udp0  0 192.168.20.48:5060  0.0.0.0:*  26419/asterisk  
udp0  0 0.0.0.0:38827   0.0.0.0:*  26419/asterisk  
...

Port 5060 is expected, of course, and the address where it is bound to is 
correct. But even after having a glance at the source, I can't imagine why it 
opens another port on all addresses. I have done some debugging with the 
following results:

1) The unwanted port changes every time Asterisk is restarted. I can't remember 
a situation where the port changed *while* Asterisk was running.

2) The opening of the port seems to be caused by res_pjsip. At least, if I 
don't load res_pjsip when starting Asterisk, the port isn't there (port 5060 
then is gone as well, of course). I am not sure if we should conclude that 
res_pjsip actually causes the port being opened; it could well be another 
module which depends on res_pjsip and gets loaded if and only if res_pjsip gets 
loaded. Nevertheless, I've spent quite a few hours with trying to find that 
mysterious other module, but I didn't find one.

Could please somebody who knows Asterisk's architecture and the relationship 
between Asterisk and PJSIP look into that or give an explanation? I am quite 
sure that this affects every Asterisk / PJSIP installation ...

Thank you very much,

Recursive

-- 
_
-- 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] ARI all subscribe

2015-10-19 Thread James Cloos
I wasn't able to make it back to the devcon after lunch or to as many of
the talks as I'd have liked (the excessive a/c exacerbated by symptoms
enough to be painful), so I probably missed something relevant to
this...

What is the syntax of an ALL subscription websocket url in ari?

I'd like to use wscat with such a sub to get a better idea of what the
various events look like.

Thanks,

-JimC
-- 
James Cloos  OpenPGP: 0x997A9F17ED7DAEA6

-- 
_
-- 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