* You are viewing Posts Tagged ‘sip’

Script to automatically update externip. Useful for a host with dynamic public IP

On Monday 06 Feb 2012, John Cahill wrote:
> logger -s “checksetexternip.sh: External IP address
> has changed, changing /etc/asterisk/sip_general_custom.conf” grep -v
> “externip” /etc/asterisk/sip_general_custom.conf >
> /etc/asterisk/sip_general_custom.conf.tmp echo “externip=$EXTERNIP”
> >> /etc/asterisk/sip_general_custom.conf.tmp cp
> /etc/asterisk/sip_general_custom.conf.tmp
> /etc/asterisk/sip_general_custom.conf rm
> /etc/asterisk/sip_general_custom.conf.tmp

You could also do something like:

sed -i -e “s/^externip *=.*/externip = $EXTERNIP/”
/etc/asterisk/sip.conf

Apologies for the wrapped code.

Regards,

Callmanager 4 Asterisk Malformed/Missing URL

Hi,
 
I am currently trying to get a Cisco Callmanager 4.1 and an Asterisk server (1.6.2.21) to talk via a SIP trunk so I can use the Voicemail component of the Asterisk (all the phones are associated with the Callmanager).
The connection seem to be there. When I do a “sip show peers” on the Asterisk server I see the Callmanager as Monitored and online however I can’t get any calls to pass from the CM to the Asterisk. If I debug the SIP I get a regular “SIP/2.0 400 Bad Request – ‘Malformed/Missing URL’” which is from the Callmanager.
Can anybody tell me the cause of this message and/or how I can resolve the problem ?
Any help would be greatly appreciated
 
Many thanks
 
Nigel

Dialing multiple numbers

Hi,

When dialing multiple numbers, we get connected to the first channel that answers and others are hung up.
exten => 100,1,Dial(SIP/provider/14153456789&SIP/provider/15606305670)

How can I find out the channel (actually which destination no) the connection is made to (so that I can write it to CDR)?

Thanks,
Matt

Quick bash tip for finding free SIP extensions from your sip.conf

Created this function on one of my machines today, thought others might
find it useful:

freesip() {
comm -2 < (seq $2 $3) <(cat $1 | grep ^\[ | sort | uniq | tr -d [ | tr -d
]) | grep ^[[:digit:]]
}

On RedHat/CentOS based systems you can create the following file to have
the function available on login:

/etc/profile.d/freesip.sh
# Free SIP extensions
freesip() {
comm -2 < (seq $2 $3) <(cat $1 | grep ^\[ | sort | uniq | tr -d [ | tr
-d ]) | grep ^[[:digit:]]
}

Then if you have a large sip.conf and want to find a free extension between
200 and 299 you can login and do the following:


[host]$ freesip /etc/asterisk/sip.conf 200 299
200
201
233
245
[host]$

T38 faxing – UDPTL creation failed

Hello guys.

When I am trying to send fax through T38 to linksys SPA (properly
configured etc. – I have tried it with other systems), I’m getting error
and fax is not delivered.

I’m getting this errors in asterisk.log:
WARNING[687] udptl.c: No UDPTL ports remaining
ERROR[687] chan_sip.c: UDPTL creation failed
WARNING[687] udptl.c: No UDPTL ports remaining

then, couple lines down:
WARNING[3514] chan_sip.c: Unsupported SDP media type in offer: image 16400
udptl t38
WARNING[3514] chan_sip.c: Failing due to no acceptable offer found

sip_general_custom.conf contains t38pt_udptl=yes

udptl.conf contains:
[general]
udptlstart=4000
udptlend=4999
T38FaxUdpEC = t38UDPRedundancy

Asterisk version is 1.8.5.0

When I restart asterisk, everything is working good. Then, after some
time, fax stop working.
Do you have any idea what it could be?

Thanks in advance.