VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
tilghman at mail.jeffa... Guest
|
Posted: Mon Jun 09, 2008 9:50 pm Post subject: [asterisk-users] Asterisk : using setvar with IP Realtime an |
|
|
On Monday 09 June 2008 20:01:53 Mike wrote:
Quote: | I have what I think is a relatively advanced question. Any help is
appreciated, even if it's not a complete answer.
I am using Asterisk in mostly realtime fashion, specifically SIP
registrations are in a MySQL table. This works fine (mostly). I also set
a few variables in the setvar column, like this:
callerid_internal=test <710>;did=5555551234
Again, this works fine. The problem is when I forward my calls to another
outside line (using Polyocm phones), and need to know the ${did} value at
that point. It's empty.
|
Right, so the call path is:
Provider -- Asterisk -- Polycom -- Asterisk--Provider
The problem is that Polycom is in the call path. It doesn't know anything
about Asterisk variables and so it doesn't pass them on. What you can do,
however, is do the forwarding not within the phone, but within Asterisk
itself, something like:
exten => _*71NXX-NXX-XXXX,1,Set(DB(forward/myexten)=${EXTEN:3})
exten => *70,1,NoOp(${DB_DELETE(forward/myexten)})
and then in your dialplan:
exten => 101,1,GotoIf($["${DB(forward/myexten)}" != ""]?forward)
exten => 101,n,Dial(SIP/mypolycom)
exten => 101,n,Voicemail(101,u)
exten => 101,n,Hangup
exten => 101,n(forward),Goto(outgoing,${DB(forward/myexten)},1)
or something like that.
--
Tilghman |
|
Back to top |
|
|
dbackeberg at gmail.com Guest
|
Posted: Tue Jun 10, 2008 8:21 am Post subject: [asterisk-users] Asterisk : using setvar with IP Realtime an |
|
|
Quote: | callerid_internal=test <710>;did=5555551234
Again, this works fine. The problem is when I forward my calls to another
outside line (using Polyocm phones), and need to know the ${did} value at
that point. It's empty.
|
The other answer looks pretty good. If that doesn't work, do a sip
debug on your console, and see if the values you want are in the
traffic at all. You can set up some more complicated rules to parse
your SIP headers if the values are just in a different field. |
|
Back to top |
|
|
leif.madsen at asteris... Guest
|
Posted: Tue Jun 10, 2008 8:34 am Post subject: [asterisk-users] Asterisk : using setvar with IP Realtime an |
|
|
Mike wrote:
Quote: | If I hardcode this value in my dialplan using two underscores before it (i.e
Setvar(__did=5555551234) ) this works. But I can't hardcode it, I need to
fetch it from the table.
|
Have you tried:
Set(__did=${did})
That might work.
--
Leif Madsen
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk |
|
Back to top |
|
|
list at virtutel.ca Guest
|
Posted: Tue Jun 10, 2008 3:26 pm Post subject: [asterisk-users] Asterisk : using setvar with IP Realtime an |
|
|
I did, as a test, and it did work. The problem if that since the SIP phone
(Polycom in my case) is handling the transfer, I have nowhere to put this
line.
What I did, which I thought was the same, as put the underscores in the SIP
registrations table's setvar column. But THAT didn't work.
I`ll take a look at the other solution this evening. Hopefully it's not as
complicated as it looks at first glance.
Regards,
Mick
Quote: | -----Original Message-----
From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
bounces at lists.digium.com] On Behalf Of Leif Madsen
Sent: Tuesday, June 10, 2008 09:34
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Asterisk : using setvar with IP Realtime and
variable inheritance
Mike wrote:
Quote: | If I hardcode this value in my dialplan using two underscores before it
| (i.e
Quote: | Setvar(__did=5555551234) ) this works. But I can't hardcode it, I need
| to
Quote: | fetch it from the table.
|
Have you tried:
Set(__did=${did})
That might work.
--
Leif Madsen
http://www.leifmadsen.com
http://www.oreilly.com/catalog/asterisk
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users |
|
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|